Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[Sword Part Class]]

--
	
local SwordPart =
{
	Damage = 20,
	AttackTime = 1,
	CoolDown = 0.01,
	
	LastSwing = 0,
	LastHit = 0,

	Part= nil,
	Owner = nil,--player object that owns this sword
	
	OnHit = nil,
	OnHitHumanoid = nil,
	OnAttackReady = nil,
	OnAttack = nil,
	
	
	SwingSound = nil,
	HitSound = nil,
	SwingAnimation = nil, --animation track!
	
	ActiveConnections = {},
	
}
do
	UTIL.MakeClass(SwordPart)
	function SwordPart.New(npart,nowner)
		local init= UTIL.DeepCopy(SwordPart)
		init.Part= npart
		init.Owner = nowner
		table.insert(init.ActiveConnections,init.Part.Touched:connect(function(hit) init:SwordTouch(hit) end))
		
		init.OnHit = InternalEvent.New()
		init.OnHitHumanoid = InternalEvent.New()
		init.OnAttackReady = InternalEvent.New()
		init.OnAttack = InternalEvent.New()
		
		return init
	end
	
	function SwordPart:SwordTouch(hit)
		if tick()-self.LastSwing >self.AttackTime or tick()-self.LastHit<self.AttackTime then return end
		self.OnHit:Fire(hit)
		local character,humanoid = UTIL.FindCharacterAncestor(hit)
		if character and character ~= self.Owner.Character then
			humanoid:TakeDamage(self.Damage)
			self.OnHitHumanoid:Fire(humanoid,hit)
			self.LastHit = tick()
			if self.HitSound then
				self.HitSound:Play()
			end
		end
		
	end
	
	function SwordPart:DoSwing()
		if tick()-self.LastSwing<self.AttackTime+self.CoolDown then
			return
		end
		
		if self.SwingAnimation then
			self.SwingAnimation:Play()
		end
		if self.SwingSound then
			self.SwingSound:Play()
		end
		self.LastSwing = tick()
		self.OnAttack:Fire()
	end
	
	function SwordPart:Destroy()
		for _,i in pairs(self.ActiveConnections) do
			i:disconnect()
		end
	end
end
do
	local Handle = script.Parent
	local Tool = Handle.Parent
	
	local Player = game.Players.LocalPlayer
	local Character = UTIL.WaitForValidCharacter(Player)
	local SwingAni = UTIL.Instantiate"Animation"
	{AnimationId = "http://www.roblox.com/Asset?ID=89289879"}
	
	local HitSound = Handle:WaitForChild('Hit')
	local SwingSound = Handle:WaitForChild('Swing')
	
	local SwingAniTrack
	
	local Sword
	
	
	Tool.Equipped:connect(function(mouse)
		Sword = SwordPart.New(Handle,Player)
		Sword.Damage = 40
		Sword.HitSound = HitSound
		Sword.SwingSound = SwingSound
		Character = UTIL.WaitForValidCharacter(Player)
		local Humanoid = Character:FindFirstChild('Humanoid')

		SwingAniTrack = Humanoid:LoadAnimation(SwingAni)
		Sword.SwingAnimation = SwingAniTrack
		
		Sword.OnHitHumanoid:Connect(function(humanoid,hit)
			local myTorso = Character:FindFirstChild('Torso')
			local torso = humanoid.Parent:FindFirstChild('Torso')
			if not torso or not myTorso then return end
			
			if hit.Name=='idk' or hit.Name=='idk' or hit.Name=='idk' or hit.Name=='idk' then
				hit:BreakJoints()
				WeldUtil.WeldBetween(hit, Handle)
				Delay(1,function() hit:BreakJoints() end )
			end
		end)
		
		mouse.Button1Down:connect(function()
			Sword:DoSwing()
		end)
	end)
	Tool.Unequipped:connect(function()
		Sword:Destroy()
	end)

end
--					warn(b, b:GetChildren())


				
					local val = b.text.Value	-- обязательный элемент
					local new = sample:Clone()	--Make a clone of the sample frame
					new.PName.Text = val		-- устанавливаем текст
					-- new.LayoutOrder = num + a	--UIListLayout используется для корректной сортировки списка
					local x = b:FindFirstChild("image")
					if x then
						image = x.Value
					end
					if image then 
						new.Image.Image = image	-- установка картинки
					else
						new.Image.Parent = nil
						new.Pname.Position.X = UDim.new(0,0)
						new.Pname.Size = UDim2.new(1,0,1,0)
					end
					
							-- подключение скрипта самоуничтожения
					local des = dm:Clone()
					des.Parent = new
					des.Disabled = false
					-- вывод на экран
					new.Parent = sf--Parent to scrolling frame
					new.DestroyMe.Disabled = false	-- стартуем скрипт самоуничтожения
				end
				b.Parent = nil
			end
							-- уничтожаем элементы
			for a,b in pairs(tmp) do
--// # key, Else


mouse.KeyDown:connect(function(key)
	if key=="n" then 
		if veh.Lightbar.middle.Else.IsPlaying == true then
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Else:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.meme.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Else:Play()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Else.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
--				{ id = "slash.xml", weight = 10 }


			},
	toollunge = {
				{ id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
			},
	wave = {
				{ id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
			},
	point = {
				{ id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
			},
	dance = {
				{ id = "http://www.roblox.com/asset/?id=130018893", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=132546839", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=132546884", weight = 10 }
			},
	dance2 = {
				{ id = "http://www.roblox.com/asset/?id=160934142", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=160934298", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=160934376", weight = 10 }
			},
	dance3 = {
				{ id = "http://www.roblox.com/asset/?id=160934458", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=160934530", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=160934593", weight = 10 }
			},
	laugh = {
				{ id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
			},
	cheer = {
				{ id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
			},
}
--[[
local function touchEnded(otherPart)
	if(otherPart.Name == "HumanoidRootPart" ) then
		local player = game.Players:FindFirstChild(otherPart.Parent.Name)
		if(player) then
			--print("touch ended")	
			playersNear[player] = nil
			
			if(next(playersNear) == nil) then
				if(doorState == DoorState.Open) then
					StartClosing()
				end
			end
		end
	end
end]]



trigger.Touched:Connect(touched)
--[[*
 * Converts a list of globs into a function that matches a path against the
 * globs.
 *
 * Every time picomatch is called, it will parse the glob strings and turn
 * them into regexp instances. Instead of calling picomatch repeatedly with
 * the same globs, we can use this function which will build the picomatch
 * matchers ahead of time and then have an optimized path for determining
 * whether an individual path matches.
 *
 * This function is intended to match the behavior of `micromatch()`.
 *
 * @example
 * const isMatch = globsToMatcher(['*.js', '!*.test.js']);
 * isMatch('pizza.js'); // true
 * isMatch('pizza.test.js'); // false
 ]]


local function globsToMatcher(globs: Array<Config_Glob>): MatcherFn
	if #globs == 0 then
		-- Since there were no globs given, we can simply have a fast path here and
		-- return with a very simple function.
		return function()
			return false
		end
	end

	local matchers = Array.map(globs, function(glob)
		if not globsToMatchersMap:has(glob) then
			local isMatch = picomatch(glob, picomatchOptions, true) :: Matcher

			local matcher = {
				isMatch = isMatch,
				-- Matchers that are negated have different behavior than matchers that
				-- are not negated, so we need to store this information ahead of time.
				negated = isMatch.state.negated or Boolean.toJSBoolean(isMatch.state.negatedExtglob),
			}

			globsToMatchersMap:set(glob, matcher)
		end

		return globsToMatchersMap:get(glob) :: { isMatch: Matcher, negated: boolean }
	end)

	return function(path)
		-- ROBLOX FIXME START: implement replacePathSepForGlob
		local replacedPath = path
		-- local replacedPath = replacePathSepForGlob(path)
		-- ROBLOX FIXME END
		local kept = nil
		local negatives = 0

		for i = 1, #matchers do
			local isMatch, negated
			local ref = matchers[i]
			isMatch, negated = ref.isMatch, ref.negated

			if negated then
				negatives += 1
			end

			local matched = isMatch(replacedPath)

			if not matched and negated then
				-- The path was not matched, and the matcher is a negated matcher, so we
				-- want to omit the path. This means that the negative matcher is
				-- filtering the path out.
				kept = false
			elseif matched and not negated then
				-- The path was matched, and the matcher is not a negated matcher, so we
				-- want to keep the path.
				kept = true
			end
		end

		-- If all of the globs were negative globs, then we want to include the path
		-- as long as it was not explicitly not kept. Otherwise only include
		-- the path if it was kept. This allows sets of globs that are all negated
		-- to allow some paths to be matched, while sets of globs that are mixed
		-- negated and non-negated to cause the negated matchers to only omit paths
		-- and not keep them.
		return if negatives == #matchers then kept ~= false else Boolean.toJSBoolean(kept)
	end
end
exports.default = globsToMatcher

return exports
-- << VARIABLES >>


local topBar = main.gui.CustomTopBar
local coreToHide = {"Chat", "PlayerList"}
local originalCoreStates = {};
local cmdBar = main.gui.CmdBar
local currentProps = {}
local originalTopBarTransparency = 1
local originalTopBarVisibility = true
local mainProps
mainProps = {
	maxSuggestions = 5;
	mainParent = cmdBar;
	textBox = cmdBar.SearchFrame.TextBox;
	rframe = cmdBar.ResultsFrame;
	suggestionPos = 1;
	suggestionDisplayed = 0;
	forceExecute = false;
	highlightColor = Color3.fromRGB(50,50,50);
	otherColor = Color3.fromRGB(80,80,80);
	suggestionLabels = {};
	currentBarCommand = nil;
}
--[[ The Module ]]

--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local Gamepad = setmetatable({}, BaseCharacterController)
Gamepad.__index = Gamepad

function Gamepad.new(CONTROL_ACTION_PRIORITY)
	local self = setmetatable(BaseCharacterController.new(), Gamepad)

	self.CONTROL_ACTION_PRIORITY = CONTROL_ACTION_PRIORITY

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0

	self.activeGamepad = NONE	-- Enum.UserInputType.Gamepad1, 2, 3...
	self.gamepadConnectedConn = nil
	self.gamepadDisconnectedConn = nil
	return self
end

function Gamepad:Enable(enable: boolean): boolean
	if not UserInputService.GamepadEnabled then
		return false
	end

	if enable == self.enabled then
		-- Module is already in the state being requested. True is returned here since the module will be in the state
		-- expected by the code that follows the Enable() call. This makes more sense than returning false to indicate
		-- no action was necessary. False indicates failure to be in requested/expected state.
		return true
	end

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0
	self.moveVector = ZERO_VECTOR3
	self.isJumping = false

	if enable then
		self.activeGamepad = self:GetHighestPriorityGamepad()
		if self.activeGamepad ~= NONE then
			self:BindContextActions()
			self:ConnectGamepadConnectionListeners()
		else
			-- No connected gamepads, failure to enable
			return false
		end
	else
		self:UnbindContextActions()
		self:DisconnectGamepadConnectionListeners()
		self.activeGamepad = NONE
	end

	self.enabled = enable
	return true
end
--- FUNCTIONS ---



function lookAt(eye, target)
	local forwardVector = (target - eye).Unit
	local upVector = Vector3.new(0, 1, 0)
	-- You have to remember the right hand rule or google search to get this right
	local rightVector = forwardVector:Cross(upVector)
	local upVector2 = rightVector:Cross(forwardVector)

	return CFrame.fromMatrix(eye, rightVector, upVector2)
end
--[[Handlebars]]

--
	Tune.SteerAngle		= 18		-- Handlebar angle at max lock (in degrees)
	Tune.MSteerExp		= 1 		-- Mouse steering exponential degree
	Tune.LowSpeedCut	= 60 		-- Low speed steering cutoff, tune according to your full lock, a bike with a great handlebar lock angle will need a lower value (E.G. If your full lock is 20 your cutoff will be 40/50, or if your full lock is 40 your cutoff will be 20/30)
	
	Tune.SteerD			= 50 		-- Dampening of the Low speed steering
	Tune.SteerMaxTorque	= 4000 		-- Force of the the Low speed steering
	Tune.SteerP			= 500 		-- Aggressiveness of the the Low speed steering
--// Global Wrapping


Enum = service_Wrap(Enum, true)
rawequal = service.RawEqual
script = service_Wrap(script, true)
game = service_Wrap(game, true)
workspace = service_Wrap(workspace, true)
Instance = {
	new = function(obj, parent)
		return service_Wrap(oldInstNew(obj, service_UnWrap(parent)), true)
	end,
}
require = function(obj, noWrap: boolean?)
	return if noWrap == true then oldReq(service_UnWrap(obj)) else service_Wrap(oldReq(service_UnWrap(obj)), true)
end

client.Service = service
client.Module = service_Wrap(client.Module, true)
-- RANK, RANK NAMES & SPECIFIC USERS


Ranks = {
	{5,	"Owner",		};
	{4,	"HeadAdmin",	{"Player1","",0},	};
	{3,	"Admin",		{"",0},	};
	{2,	"Mod",			{"",0},	};
	{1,	"VIP",			{"",0},	};
	{0,	"NonAdmin",		};
};
-- Create component


local ToolButton = Roact.PureComponent:extend(script.Name)

function ToolButton:init()
    self:UpdateHotkeyTextSize(self.props.HotkeyLabel)
end

function ToolButton:willUpdate(nextProps)
    if self.props.HotkeyLabel ~= nextProps.HotkeyLabel then
        self:UpdateHotkeyTextSize(nextProps.HotkeyLabel)
    end
end

function ToolButton:UpdateHotkeyTextSize(Text)
    self.HotkeyTextSize = TextService:GetTextSize(
        Text,
        9,
        Enum.Font.Gotham,
        Vector2.new(math.huge, math.huge)
    )
end

function ToolButton:render()
    return new('ImageButton', {
        BackgroundColor3 = self.props.Tool.Color.Color;
        BackgroundTransparency = (self.props.CurrentTool == self.props.Tool) and 0 or 1;
        BorderSizePixel = 0;
        Image = self.props.IconAssetId;
        AutoButtonColor = false;
        [Roact.Event.Activated] = function ()
            self.props.Core.EquipTool(self.props.Tool)
        end;
    }, {
        Corners = new('UICorner', {
            CornerRadius = UDim.new(0, 3);
        });
        Hotkey = new('TextLabel', {
            BackgroundTransparency = 1;
            Position = UDim2.new(0, 3, 0, 3);
            Size = UDim2.fromOffset(self.HotkeyTextSize.X, self.HotkeyTextSize.Y);
            Font = Enum.Font.Gotham;
            Text = self.props.HotkeyLabel;
            TextColor3 = Color3.fromRGB(255, 255, 255);
            TextSize = 9;
            TextXAlignment = Enum.TextXAlignment.Left;
            TextYAlignment = Enum.TextYAlignment.Top;
        });
    })
end

return ToolButton
--- Registers a command based purely on its definition.
-- Prefer using Registry:RegisterCommand for proper handling of server/client model.


function Registry:RegisterCommandObject (commandObject)
	for key in pairs(commandObject) do
		if self.CommandMethods[key] == nil then
			error("Unknown key/method in command " .. (commandObject.Name or "unknown command") .. ": " .. key)
		end
	end

	if commandObject.Args then
		for i, arg in pairs(commandObject.Args) do
			for key in pairs(arg) do
				if self.CommandArgProps[key] == nil then
					error(('Unknown propery in command "%s" argument #%d: %s'):format(commandObject.Name or "unknown", i, key))
				end
			end
		end
	end

	if RunService:IsClient() and commandObject.Data and commandObject.Run then
		error(('Invalid command implementation provided for "%s": "Data" and "Run" sections are mutually exclusive'):format(commandObject.Name or "unknown"))
	end

	if commandObject.AutoExec and RunService:IsClient() then
		table.insert(self.AutoExecBuffer, commandObject.AutoExec)
		self:FlushAutoExecBufferDeferred()
	end

	-- Unregister the old command if it exists...
	local oldCommand = self.Commands[commandObject.Name:lower()]
	if oldCommand and oldCommand.Aliases then
		for _, alias in pairs(oldCommand.Aliases) do
			self.Commands[alias:lower()] = nil
		end
	elseif not oldCommand then
		self.CommandsArray[#self.CommandsArray + 1] = commandObject
	end

	self.Commands[commandObject.Name:lower()] = commandObject

	if commandObject.Aliases then
		for _, alias in pairs(commandObject.Aliases) do
			self.Commands[alias:lower()] = commandObject
		end
	end
end
--Если нажата


Mos.KeyDown:connect(function(key)
	if key:lower() == string.char(48) then
		game.Workspace.Camera.FieldOfView = game.Workspace.Camera.FieldOfView + 1.6
		local Player1 = game.Players.LocalPlayer.Character.Humanoid
		if Player1 then
			Player1.WalkSpeed = 25
		end
	end
end)
--[[
	Utility function to log a Fusion-specific error.
]]



local Package = script.Parent.Parent
local Types = require(Package.Types)
local messages = require(Package.Logging.messages)

local function logError(messageID: string, errObj: Types.Error?, ...)
	local formatString: string

	if messages[messageID] ~= nil then
		formatString = messages[messageID]
	else
		messageID = "unknownMessage"
		formatString = messages[messageID]
	end

	local errorString
	
	if errObj == nil then
		errorString = string.format("[Fusion] " .. formatString .. "\n(ID: " .. messageID .. ")", ...)
	else
		formatString = string.gsub(formatString, "ERROR_MESSAGE", errObj.message)
		errorString = string.format("[Fusion] " .. formatString .. "\n(ID: " .. messageID .. ")\n---- Stack trace ----\n" .. errObj.trace, ...)
	end
	
	error(string.gsub(errorString, "\n", "\n    "), 0)
end

return logError
-- Local Functions


local function makePurchase()
	local newLevel = upgrades.Value + 1

	BuyUpgradeEvent:FireServer()
	showLevelUpBanner()
end

local function updateUpgrades()
	local cost = GameSettings.upgradeCost(upgrades.Value)
	local upgradeProgress = points.Value/cost
	local starProgress = (points.Value % (cost / 3)) / (cost / 3)
	
	prevStarProgress = currStarProgress
	currStarProgress = starProgress

	local tweenTime = 1 * math.abs(starProgress - prevStarProgress)
	if starProgress <= prevStarProgress then
		local tweenTimeToFull = 1 * (1-prevStarProgress)
		tweenTime = 1 * (starProgress)

		ProgressBarContainer:TweenPosition(UDim2.fromScale(0, 0), 
			Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweenTimeToFull, true)
		ProgressBarFill:TweenPosition(UDim2.fromScale(0, 0), 
			Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweenTimeToFull, true)
			
		wait(tweenTime)
		if starProgress == currStarProgress then
			ProgressBarContainer.Position = UDim2.fromScale(-0.56, 0)
			ProgressBarFill.Position = UDim2.fromScale(0.56, 0)

			ProgressBarContainer:TweenPosition(UDim2.fromScale(-0.56 + math.min(1, starProgress) * 0.56, 0), 
				Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweenTime, true)
			ProgressBarFill:TweenPosition(UDim2.fromScale(0.56 - math.min(1, starProgress) * 0.56, 0), 
				Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweenTime, true)
		end	
	else
		ProgressBarContainer:TweenPosition(UDim2.fromScale(-0.5 + math.min(1, starProgress) * 0.5, 0), 
			Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweenTime, true)
		ProgressBarFill:TweenPosition(UDim2.fromScale(0.5 - math.min(1, starProgress) * 0.5, 0), 
			Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweenTime, true)
	end
	
	if points.Value >= cost then
		-- 3 Stars, slight pause, upgrade
		Star1.Visible = true
		Star2.Visible = true
		Star3.Visible = true
		wait()
		makePurchase()
	elseif points.Value >= 2*cost / 3 then
		-- 2 Stars
		Star1.Visible = true
		Star2.Visible = true
	elseif points.Value >= cost / 3 then
		-- 1 Star
		Star1.Visible = true
	else
		-- 0 Stars
		Star1.Visible = false
		Star2.Visible = false
		Star3.Visible = false
	end
end

local function toggleEnabled()	
	if GameplayUi.Enabled then
		ChangeController:FireServer(false)
	else
		ChangeController:FireServer(true)
	end
end

local function toggleLobby()
	if GameplayUi.Enabled then
		-- Enter lobby and exit game
		humanoidRoot.CFrame = SpawnLocation.CFrame + Vector3.new(0, 3, 0)
		humanoid.WalkSpeed = 16
		
		GameplayUi.Enabled = false
		Tutorial.Enabled = false
		Controller.Disabled = true
		InteractionBillboard.Enabled = true
		
		LobbyButton.Visible = false
	end
end
-- Waits for the child of the specified parent


local function WaitForChild(parent, childName)
	while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
	return parent[childName]
end

local Tool = script.Parent

local Animations = {}
local MyHumanoid
local MyCharacter


local function PlayAnimation(animationName)
	if Animations[animationName] then
		Animations[animationName]:Play()
	end
end

local function StopAnimation(animationName)
	if Animations[animationName] then
		Animations[animationName]:Stop()
	end
end


function OnEquipped(mouse)
	MyCharacter = Tool.Parent
	MyHumanoid = WaitForChild(MyCharacter, 'Humanoid')
	if MyHumanoid then
		Animations['EquipAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'EquipAnim5'))
		Animations['IdleAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'IdleAnim3'))
		Animations['OverheadAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'OverheadAnim2'))
		Animations['SlashAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'SlashAnim2'))
		Animations['ThrustAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'ThrustAnim2'))
		Animations['UnequipAnim'] = MyHumanoid:LoadAnimation(WaitForChild(Tool, 'UnequipAnim2'))
	end
	PlayAnimation('EquipAnim')
	PlayAnimation('IdleAnim')
end

function OnUnequipped()
	for animName, _ in pairs(Animations) do
		StopAnimation(animName)
	end
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)

WaitForChild(Tool, 'PlaySlash').Changed:connect(
	function (value)
		--if value then
			PlayAnimation('SlashAnim')
		--else
		--	StopAnimation('SlashAnim')
		--end
	end)

WaitForChild(Tool, 'PlayThrust').Changed:connect(
	function (value)
		--if value then
			PlayAnimation('ThrustAnim')
		--else
		--	StopAnimation('ThrustAnim')
		--end
	end)

WaitForChild(Tool, 'PlayOverhead').Changed:connect(
	function (value)
		--if value then
			PlayAnimation('OverheadAnim')
		--else
		--	StopAnimation('OverheadAnim')
		--end
	end)
--[[Brakes]]


	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 400		-- Front brake force
	Tune.RBrakeForce	= 500		-- Rear brake force
	Tune.PBrakeForce	= 4000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
--police+sec


game.Players.PlayerAdded:Connect(function(Player)  
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Smoky grey") then
			Character.Humanoid.MaxHealth = 135
			Character.Humanoid.Health = 135
		end
	end)
end)
game.Players.PlayerAdded:Connect(function(Player)  
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Lily white") then
			Character.Humanoid.MaxHealth = 135
			Character.Humanoid.Health = 135
		end
	end)
end)
game.Players.PlayerAdded:Connect(function(Player)  
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Sea green") then
			Character.Humanoid.MaxHealth = 135
			Character.Humanoid.Health = 135
		end
	end)
end)
game.Players.PlayerAdded:Connect(function(Player)  
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Mid gray") then
			Character.Humanoid.MaxHealth = 135
			Character.Humanoid.Health = 135
		end
	end)
end)
-- defines subject and height of VR camera


function VRBaseCamera:GetVRFocus(subjectPosition, timeDelta)
	local lastFocus = self.lastCameraFocus or subjectPosition

	self.cameraTranslationConstraints = Vector3.new(
		self.cameraTranslationConstraints.x,
		math.min(1, self.cameraTranslationConstraints.y + timeDelta),
		self.cameraTranslationConstraints.z)

	local cameraHeightDelta = Vector3.new(0, self:GetCameraHeight(), 0)
	local newFocus = CFrame.new(Vector3.new(subjectPosition.x, lastFocus.y, subjectPosition.z):
			lerp(subjectPosition + cameraHeightDelta, self.cameraTranslationConstraints.y))

	return newFocus
end