Pinkstack/roblox-luau-corpus-text huggingface dataset:
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------



function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

local lastTick = 0

function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and (tool.RequiresHandle or tool:FindFirstChild("Handle")) then
	
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = currentTime + .3
		end

		if currentTime > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	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 } 
			},
	dance1 = {
				{ id = "http://www.roblox.com/asset/?id=182435998", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491037", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491065", weight = 10 } 
			},
	dance2 = {
				{ id = "http://www.roblox.com/asset/?id=182436842", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491248", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491277", weight = 10 } 
			},
	dance3 = {
				{ id = "http://www.roblox.com/asset/?id=182436935", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491368", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491423", 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 dances = {"dance1", "dance2", "dance3"}
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 ]]



local CurrentModule = script.Parent
local Packages = CurrentModule.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Array = LuauPolyfill.Array
local Boolean = LuauPolyfill.Boolean
local Map = LuauPolyfill.Map
type Array<T> = LuauPolyfill.Array<T>
type Map<K, V> = LuauPolyfill.Map<K, V>

local exports = {}

local picomatch = require(Packages.Picomatch)
local typesModule = require(Packages.JestTypes)
type Config_Path = typesModule.Config_Path
type Config_Glob = typesModule.Config_Glob
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 380		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[=[
	Sets the scope for the datastore to retrieve.

	:::info
	Must be done before start and after init.
	:::

	@param dataStoreScope string
]=]


function PlayerDataStoreService:SetDataStoreScope(dataStoreScope)
	assert(type(dataStoreScope) == "string", "Bad dataStoreScope")
	assert(self._started, "Not initialized")
	assert(self._started:IsPending(), "Already started, cannot configure")

	self._dataStoreScope = dataStoreScope
end
-- Public Functions


function GameManager:Initialize()
	MapManager:SaveMap()
end

function GameManager:RunIntermission()
	IntermissionRunning = true
	TimeManager:StartTimer(Configurations.INTERMISSION_DURATION)
	DisplayManager:StartIntermission()
	EnoughPlayers = Players.NumPlayers >= Configurations.MIN_PLAYERS	
	DisplayManager:UpdateTimerInfo(true, not EnoughPlayers)
	spawn(function()
		repeat
			if EnoughPlayers and Players.NumPlayers < Configurations.MIN_PLAYERS then
				EnoughPlayers = false
			elseif not EnoughPlayers and Players.NumPlayers >= Configurations.MIN_PLAYERS then
				EnoughPlayers = true
			end
			DisplayManager:UpdateTimerInfo(true, not EnoughPlayers)
			wait(.5)
		until IntermissionRunning == false
	end)
	
	wait(Configurations.INTERMISSION_DURATION)
	IntermissionRunning = false
end

function GameManager:StopIntermission()
	--IntermissionRunning = false
	DisplayManager:UpdateTimerInfo(false, false)
	DisplayManager:StopIntermission()
end

function GameManager:GameReady()
	return Players.NumPlayers >= Configurations.MIN_PLAYERS
end

function GameManager:StartRound()
	TeamManager:ClearTeamScores()
	
	PlayerManager:AllowPlayerSpawn(true)
	PlayerManager:LoadPlayers()
	
	GameRunning = true
	PlayerManager:SetGameRunning(true)
	TimeManager:StartTimer(Configurations.ROUND_DURATION)
end

function GameManager:Update()
	--TODO: Add custom custom game code here
end

function GameManager:RoundOver()
	local winningTeam = TeamManager:HasTeamWon()
	if winningTeam then
		DisplayManager:DisplayVictory(winningTeam)
		return true
	end
	if TimeManager:TimerDone() then
		if TeamManager:AreTeamsTied() then
			DisplayManager:DisplayVictory('Tie')
		else
			winningTeam = TeamManager:GetWinningTeam()
			DisplayManager:DisplayVictory(winningTeam)
		end
		return true
	end
	return false
end

function GameManager:RoundCleanup()
	PlayerManager:SetGameRunning(false)
	wait(Configurations.END_GAME_WAIT)
	PlayerManager:AllowPlayerSpawn(false)
	PlayerManager:DestroyPlayers()
	DisplayManager:DisplayVictory(nil)
	TeamManager:ClearTeamScores()
	TeamManager:ShuffleTeams()
	MapManager:ClearMap()
	MapManager:LoadMap()
	
end
--- Splits a string by a single delimeter chosen from the given set.
-- The first matching delimeter from the set becomes the split character.


function Util.SplitPrioritizedDelimeter(text, delimeters)
	for i, delimeter in ipairs(delimeters) do
		if text:find(delimeter) or i == #delimeters then
			return Util.SplitStringSimple(text, delimeter)
		end
	end
end
--[[
	Flush all pending actions since the last change event was dispatched.
]]


function Store:flush()
	if not self._mutatedSinceFlush then
		return
	end

	self._mutatedSinceFlush = false

	-- On self.changed:fire(), further actions may be immediately dispatched, in
	-- which case self._lastState will be set to the most recent self._state,
	-- unless we cache this value first
	local state = self._state

	-- If a changed listener yields, *very* surprising bugs can ensue.
	-- Because of that, changed listeners cannot yield.
	NoYield(function()
		self.changed:fire(state, self._lastState)
	end)

	self._lastState = state
end

return Store
--Miscellaneous Settings:


HANDBRAKE_ANG	= 17	--Angle of handbrake when active in degrees
PADDLE_ANG		= 15	--Angle of paddle shifter
PADDLE_INVERTED	= false	--Sets right paddle to shift down and vice versa
PEDAL_ANGLE		= 55	--Angle of pedals when active in degrees
PED_INVERTED	= true	--Inverts the pedal angle (for top mounted pedals)
SHIFTER_TYPE	= "H"	--"H" for H-Pattern, "Seq" for sequential shifter
SEQ_INVERTED	= false	--Inverts the sequential shifter motion
SHIFT_TIME		= 0.15	--Time it takes to shift between all parts (Clutch pedal, Paddle shifter, Shifter
VERTICAL_ANG	= 10	--Vertical shifter movement angle in degrees
HORIZONTAL_ANG	= 10.0	--Horizontal shifter increments in degrees (H-Pattern only)
STEER_MULT		= 7.0	--Steering multiplier angle (Arbitrary)
-- Player specific convenience variables


local MyPlayer = nil
local MyCharacter = nil
local MyHumanoid = nil
local MyTorso = nil
local MyMouse = nil


local RecoilAnim
local RecoilTrack = nil

local ReloadAnim
local ReloadTrack = nil

local IconURL = Tool.TextureId  
local DebrisService = game:GetService('Debris')
local PlayersService = game:GetService('Players')


local FireSound

local OnFireConnection = nil
local OnReloadConnection = nil

local DecreasedAimLastShot = false
local LastSpreadUpdate = time()

local flare = script.Parent:WaitForChild("Flare")
---It's a while wait() because of how badly it interacts with framerate changes


while wait(0.2) do
	
	---Activating/Dezactivating the mobile controls
	if script.Parent.Parent.Parent:FindFirstChild("TouchGui") then
		script.Parent.Parent.Parent["TouchGui"].Enabled = false
		script.Parent.Parent.MobileControls.Visible = true
		script.Parent.Parent.PCHandbrake.Visible = false
	else
		script.Parent.Parent.MobileControls.Visible = false
		script.Parent.Parent.PCHandbrake.Visible = true
	end
	
	if Humanoid.SeatPart ~= nil and Humanoid.SeatPart.Parent:FindFirstChild("Stats") then

		local Cached_Magnitude = Char.Head.Velocity.magnitude
		---Camera shake on collision
		--if Old_Magnitude ~= nil then
		--	print(Cached_Magnitude)
		--	print(Old_Magnitude)
		--	print(Cached_Magnitude - Old_Magnitude)
		--	print("__")
		--end	

		if Old_Magnitude ~= nil and Cached_Magnitude - Old_Magnitude < -70 then
			--print("Collision")
			--Sound
			--game.SoundService.CrashSound:Play(0.1)

			-- Explosion shake:
			--camShake:Shake(CameraShaker.Presets.Explosion)
		end
		Old_Magnitude = Cached_Magnitude
	end
end
-- Data Type Handling



local function ToString(value, type)
	if type == "float" then
		return tostring(Round(value,2))
	elseif type == "Content" then
		if string.find(value,"/asset") then
			local match = string.find(value, "=") + 1
			local id = string.sub(value, match)
			return id
		else
			return tostring(value)
		end
	elseif type == "Vector2" then
		local x = value.x
		local y = value.y
		return string.format("%g, %g", x,y)
	elseif type == "Vector3" then
		local x = value.x
		local y = value.y
		local z = value.z
		return string.format("%g, %g, %g", x,y,z)
	elseif type == "Color3" then
		local r = value.r
		local g = value.g
		local b = value.b
		return string.format("%d, %d, %d", r*255,g*255,b*255)
	elseif type == "UDim2" then
		local xScale = value.X.Scale
		local xOffset = value.X.Offset
		local yScale = value.Y.Scale
		local yOffset = value.Y.Offset
		return string.format("{%d, %d}, {%d, %d}", xScale, xOffset, yScale, yOffset)
	else
		return tostring(value)
	end
end

local function ToValue(value,type)
	if type == "Vector2" then
		local list = Split(value,",")
		if #list < 2 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		return Vector2_new(x,y)
	elseif type == "Vector3" then
		local list = Split(value,",")
		if #list < 3 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		local z = tonumber(list[3]) or 0
		return Vector3_new(x,y,z)
	elseif type == "Color3" then
		local list = Split(value,",")
		if #list < 3 then return nil end
		local r = tonumber(list[1]) or 0
		local g = tonumber(list[2]) or 0
		local b = tonumber(list[3]) or 0
		return Color3_new(r/255,g/255, b/255)
	elseif type == "UDim2" then
		local list = Split(string.gsub(string.gsub(value, "{", ""),"}",""),",")
		if #list < 4 then return nil end
		local xScale = tonumber(list[1]) or 0
		local xOffset = tonumber(list[2]) or 0
		local yScale = tonumber(list[3]) or 0
		local yOffset = tonumber(list[4]) or 0
		return UDim2_new(xScale, xOffset, yScale, yOffset)
	elseif type == "Content" then
		if tonumber(value) ~= nil then
			value = ContentUrl .. value
		end
		return value
	elseif type == "float" or type == "int" or type == "double" then
		return tonumber(value)
	elseif type == "string" then
		return value
	elseif type == "NumberRange" then
		local list = Split(value,",")
		if #list == 1 then
			if tonumber(list[1]) == nil then return nil end
			local newVal = tonumber(list[1]) or 0
			return NumberRange.new(newVal)
		end
		if #list < 2 then return nil end
		local x = tonumber(list[1]) or 0
		local y = tonumber(list[2]) or 0
		return NumberRange.new(x,y)
	elseif type == "UserName" then
		return Players:FindFirstChild(value)
	else
		return nil
	end
end
--[[Steering]]


	Tune.SteerInner		= 45		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 45		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= 1000		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= 1000		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 1 		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 20000	    -- Steering Aggressiveness
-- functions



local function wait(t)
	local start	= tick()
	repeat
		RunService.Stepped:Wait()
	until tick() - start >= t
end

local function Raycast(position, direction, ignore)
	local ray		= Ray.new(position, direction)
	local success	= false
	local h, p, n, humanoid
	
	table.insert(ignore, Workspace.Effects)
	
	repeat
		h, p, n	= Workspace:FindPartOnRayWithIgnoreList(ray, ignore)
		
		if h then
			humanoid	= h.Parent:FindFirstChildOfClass("Humanoid")
			if humanoid and humanoid.Health <= 0 then
				humanoid	= nil
			end
			if humanoid then
				success	= true
			else
				if h.CanCollide and h.Transparency < 1 then
					success	= true
				else
					table.insert(ignore, h)
					success	= false
				end
			end
		else
			success	= true
		end
	until success
	
	return h, p, n, humanoid
end
-- Main Work --



myaccbtn.MouseButton1Click:Connect(function()
	
	
		
	myaccpage:TweenPosition(openState, 'Out', 'Sine', '1')
	deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	
end)


depbtn.MouseButton1Click:Connect(function()
	
	myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	deppage:TweenPosition(openState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	
end)


wthbtn.MouseButton1Click:Connect(function()

	myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(openState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')

end)


trnbtn.MouseButton1Click:Connect(function()

	myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
	wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
	trnpage:TweenPosition(openState, 'Out', 'Sine', '1')
	cshpage:TweenPosition(closeState, 'Out', 'Sine', '1')

end)


cshbtn.MouseButton1Click:Connect(function()
	
		myaccpage:TweenPosition(closeState, 'Out', 'Sine', '1')
		deppage:TweenPosition(closeState, 'Out', 'Sine', '1')
		wthpage:TweenPosition(closeState, 'Out', 'Sine', '1')
		trnpage:TweenPosition(closeState, 'Out', 'Sine', '1')
		cshpage:TweenPosition(openState, 'Out', 'Sine', '1')
end)
--------------------------------------------------------------------------



local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= .1	,
	FTargetFriction	= .75	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= .1	,
	RTargetFriction	= .75	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 1		,
	WheelLockRatio	= 1/4	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.2	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= .5		,	--SS6 Default = .5
	RElasticity		= .5		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
--Brake.InputChanged:Connect(TouchBrake)



local function TouchHandbrake(input, GPE)
	if input.UserInputState == Enum.UserInputState.Begin then
		_PBrake = not _PBrake
	elseif input.UserInputState == Enum.UserInputState.End then
		if car.DriveSeat.Velocity.Magnitude>5 then
			_PBrake = false
		end
	end
end
Handbrake.InputBegan:Connect(TouchHandbrake)
Handbrake.InputEnded:Connect(TouchHandbrake)
-- Moves a tree node to a new parent. Called when an existing object's parent
-- changes.


local function moveObject(object,parent)
	local objectNode = NodeLookup[object]
	if not objectNode then
		return
	end

	local parentNode = NodeLookup[parent]
	if not parentNode then
		return
	end

	local visible = nodeIsVisible(objectNode)

	remove(objectNode.Parent,objectNode.Index)
	objectNode.Parent = parentNode

	objectNode.Depth = depth(object)
	local function r(node,d)
		for i = 1,#node do
			node[i].Depth = d
			r(node[i],d+1)
		end
	end
	r(objectNode,objectNode.Depth+1)

	insert(parentNode,#parentNode+1,objectNode)

	if visible or nodeIsVisible(objectNode) then
		updateList()
	elseif nodeIsVisible(objectNode.Parent) then
		updateScroll()
	end
end
--[[
	Adds a Spring to be updated every render step.
]]


function SpringScheduler.add(spring: Spring)
	local damping = spring._damping
	local speed = spring._speed

	local dampingBucket = springBuckets[damping]

	if dampingBucket == nil then
		springBuckets[damping] = {
			[speed] = setmetatable({[spring] = true}, WEAK_KEYS_METATABLE)
		}
		return
	end

	local speedBucket = dampingBucket[speed]

	if speedBucket == nil then
		dampingBucket[speed] = setmetatable({[spring] = true}, WEAK_KEYS_METATABLE)
		return
	end

	speedBucket[spring] = true
end
--------RIGHT DOOR --------



game.Workspace.doorright.l31.BrickColor = BrickColor.new(1)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(1)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(21)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(1)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(21)
--- Creates a listable type from a singlular type


function Util.MakeListableType(type, override)
	local listableType = {
		Listable = true,
		Transform = type.Transform,
		Validate = type.Validate,
		ValidateOnce = type.ValidateOnce,
		Autocomplete = type.Autocomplete,
		Default = type.Default,
		Parse = function(...)
			return {type.Parse(...)}
		end
	}

	if override then
		for key, value in pairs(override) do
			listableType[key] = value
		end
	end

	return listableType
end

local function encodeCommandEscape(text)
	return (text:gsub("\\%$", "___!CMDR_DOLLAR!___"))
end

local function decodeCommandEscape(text)
	return (text:gsub("___!CMDR_DOLLAR!___", "$"))
end

function Util.RunCommandString(dispatcher, commandString)
	commandString = Util.ParseEscapeSequences(commandString)
	commandString = Util.EncodeEscapedOperators(commandString)

	local commands = commandString:split("&&")

	local output = ""
	for i, command in ipairs(commands) do
		local outputEncoded = output:gsub("%$", "\\x24"):gsub("%%","%%%%")
		command = command:gsub("||", output:find("%s") and ("%q"):format(outputEncoded) or outputEncoded)

		output = tostring(
			dispatcher:EvaluateAndRun(
				(
					Util.RunEmbeddedCommands(dispatcher, command)
				)
			)
		)


		if i == #commands then
			return output
		end
	end
end
--// Holstering


	HolsteringEnabled = false;
	HolsterPos = CFrame.new(0.340751064, 0.1, 0.616261482, -4.10752676e-08, -0.342020065, 0.939692616, -1.49501727e-08, 0.939692557, 0.342020094, -0.99999994, 0, -4.37113847e-08);
--Controls


Tune.Peripherals = {
	MSteerWidth				= 67		,			-- 0 - 100% of screen width
	MSteerDZone				= 20		,			-- 0 - 100%

	ControlLDZone			= 5			,			-- 0 - 100%
	ControlRDZone			= 5			,			-- 0 - 100%
}

Tune.Controls = {
	ToggleTCS				= Enum.KeyCode.T					,
	ToggleTransMode			= Enum.KeyCode.M					,
	ToggleMouseDrive		= Enum.KeyCode.R					,

	Throttle				= Enum.KeyCode.Up					,
	Brake					= Enum.KeyCode.Down					,
	SteerLeft				= Enum.KeyCode.Left					,
	SteerRight				= Enum.KeyCode.Right				,

	Throttle2				= Enum.KeyCode.W					,
	Brake2					= Enum.KeyCode.S					,
	SteerLeft2				= Enum.KeyCode.A					,
	SteerRight2				= Enum.KeyCode.D					,

	ShiftUp					= Enum.KeyCode.E					,
	ShiftDown				= Enum.KeyCode.Q					,
	Clutch					= Enum.KeyCode.LeftShift			,
	PBrake					= Enum.KeyCode.P					,

	MouseThrottle			= Enum.UserInputType.MouseButton1	,
	MouseBrake				= Enum.UserInputType.MouseButton2	,
	MouseClutch				= Enum.KeyCode.W					,
	MouseShiftUp			= Enum.KeyCode.E					,
	MouseShiftDown			= Enum.KeyCode.Q					,
	MousePBrake				= Enum.KeyCode.LeftShift			,

	ContlrThrottle			= Enum.KeyCode.ButtonR2				,
	ContlrBrake				= Enum.KeyCode.ButtonL2				,
	ContlrSteer				= Enum.KeyCode.Thumbstick1			,
	ContlrShiftUp			= Enum.KeyCode.ButtonY				,
	ContlrShiftDown			= Enum.KeyCode.ButtonX				,
	ContlrClutch			= Enum.KeyCode.ButtonR1				,
	ContlrPBrake			= Enum.KeyCode.ButtonL1				,
	ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
	ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
}
return Tune
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --



while true do
	wait()
	if Elevator:WaitForChild("Direction").Value ~= 0 then
		for S=0,7 do
			wait(0.4)
			if Elevator:WaitForChild("Direction").Value == 0 then break end
			SetDisplay(1,(Elevator:WaitForChild("Direction").Value == 1 and "U" or "D")..S)
		end
	else
		SetDisplay(1,"NIL")
	end
end
--------STAGE LIGHTS--------


game.Workspace.sb1.BrickColor = BrickColor.new(194)
game.Workspace.sb2.BrickColor = BrickColor.new(194)
game.Workspace.sb3.BrickColor = BrickColor.new(194)
game.Workspace.sb4.BrickColor = BrickColor.new(194)
game.Workspace.sb5.BrickColor = BrickColor.new(194)
game.Workspace.sb6.BrickColor = BrickColor.new(194)
game.Workspace.post1.Light.BrickColor = BrickColor.new(194)
game.Workspace.post2.Light.BrickColor = BrickColor.new(194)
game.Workspace.post3.Light.BrickColor = BrickColor.new(194)
game.Workspace.post4.Light.BrickColor = BrickColor.new(194)