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


LeftHip.C1 = CFrame.new(3,0,0)
RightHip.C1 = CFrame.new(-3,0,0)

print("Completed")

while true do
	LeftHip.C1 = CFrame.new(3,0,0-5)
	RightHip.C1 = CFrame.new(-3,0,0+5)
	for i = 1,10 do
		LeftHip.C1 = LeftHip.C1 * CFrame.new(0,-0.5,0.5)
		RightHip.C1 = RightHip.C1 * CFrame.new(0,0.5,-0.5)
		sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,0.5,0)
		wait()
	end
	for i = 1,10 do
		LeftHip.C1 = LeftHip.C1 * CFrame.new(0,0.5,0.5)
		RightHip.C1 = RightHip.C1 * CFrame.new(0,-0.5,-0.5)
		sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,-0.5,0)
		wait()
	end
	for i = 1,10 do
		LeftHip.C1 = LeftHip.C1 * CFrame.new(0,0.5,-0.5)
		RightHip.C1 = RightHip.C1 * CFrame.new(0,-0.5,0.5)
		sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,0.5,0)
		wait()
	end
	for i = 1,10 do
		LeftHip.C1 = LeftHip.C1 * CFrame.new(0,-0.5,-0.5)
		RightHip.C1 = RightHip.C1 * CFrame.new(0,0.5,0.5)
		sp.Parent.Waist.CFrame = sp.Parent.Waist.CFrame * CFrame.new(0,-0.5,0)
		wait()
	end
end
-- Overrides Keyboard:UpdateMovement(inputState) to conditionally consider self.wasdEnabled and let OnRenderStepped handle the movement


function ClickToMove:UpdateMovement(inputState)
	if FFlagUserClickToMoveFollowPathRefactor then
		if inputState == Enum.UserInputState.Cancel then
			self.keyboardMoveVector = ZERO_VECTOR3
		elseif self.wasdEnabled then
			self.keyboardMoveVector = Vector3.new(self.leftValue + self.rightValue, 0, self.forwardValue + self.backwardValue)
		end
	else
		if inputState == Enum.UserInputState.Cancel then
			self.moveVector = ZERO_VECTOR3
		elseif self.wasdEnabled then
			self.moveVector = Vector3.new(self.leftValue + self.rightValue, 0, self.forwardValue + self.backwardValue)
			if self.moveVector.magnitude > 0 then
				CleanupPath()
				ClickToMoveDisplay.CancelFailureAnimation()
			end
		end
	end
end
-- NOTE: To use properly please make sure to reject the promise for proper GC if the object requiring
-- this value is GCed.


return function(instance, propertyName)
	assert(typeof(instance) == "Instance", "Bad instance")
	assert(type(propertyName) == "string", "Bad propertyName")

	local result = instance[propertyName]
	if result then
		return Promise.resolved(result)
	end

	local promise = Promise.new()

	local conn
	promise:Finally(function()
		if conn then
			conn:Disconnect()
		end
	end)

	conn = instance:GetPropertyChangedSignal(propertyName):Connect(function()
		if instance[propertyName] then
			promise:Resolve(instance[propertyName])
		end
	end)

	return promise
end
-- See if I have a tool


local spawner = script.Parent
local tool = nil
local region = Region3.new(Vector3.new(spawner.Position.X - spawner.Size.X/2, spawner.Position.Y + spawner.Size.Y/2, spawner.Position.Z - spawner.Size.Z/2),
   Vector3.new(spawner.Position.X + spawner.Size.X/2, spawner.Position.Y + 4, spawner.Position.Z + spawner.Size.Z/2))
local parts = game.Workspace:FindPartsInRegion3(region)
for _, part in pairs(parts) do
	if part and part.Parent and part.Parent:IsA("Tool") then
		tool = part.Parent
		break
	end
end

local configTable = spawner.Configurations
local configs = {}
local function loadConfig(configName, defaultValue)
	if configTable:FindFirstChild(configName) then
		configs[configName] = configTable:FindFirstChild(configName).Value
	else
		configs[configName] = defaultValue
	end
end

loadConfig("SpawnCooldown", 120)

if tool then
	tool.Parent = game.ServerStorage
	
	while true do
		-- put tool on pad
		local toolCopy = tool:Clone()
		local handle = toolCopy:FindFirstChild("Handle")
		toolCopy.Parent = game.Workspace
		local toolOnPad = true
		local parentConnection
		parentConnection = toolCopy.AncestryChanged:connect(function()
			if handle then handle.Anchored = false end
			toolOnPad = false
			parentConnection:disconnect()
		end)
		if handle then
			handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
			handle.Anchored = true
		end
		-- wait for tool to be removed
		while toolOnPad do 
			if handle then
				handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
			end
			wait() 
		end
		
		-- wait for cooldown
		wait(configs["SpawnCooldown"])		
	end
	
end
-----------------------------------------------------------------------------------------------



script.Parent:WaitForChild("Speedo")
script.Parent:WaitForChild("Tach")
script.Parent:WaitForChild("ln")
script.Parent:WaitForChild("Gear")
script.Parent:WaitForChild("Speed")

local player=game.Players.LocalPlayer
local gauges = script.Parent
local values = script.Parent.Parent.Values
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false

local _Tune = require(car["A-Chassis Tune"])

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)
-- humanoidAnimatePlayEmote.lua



local Figure = script.Parent
local Torso = Figure:WaitForChild("Torso")
local RightShoulder = Torso:WaitForChild("Right Shoulder")
local LeftShoulder = Torso:WaitForChild("Left Shoulder")
local RightHip = Torso:WaitForChild("Right Hip")
local LeftHip = Torso:WaitForChild("Left Hip")
local Neck = Torso:WaitForChild("Neck")
local Humanoid = Figure:WaitForChild("Humanoid")
local pose = "Standing"

local EMOTE_TRANSITION_TIME = 0.1

local userAnimateScaleRunSuccess, userAnimateScaleRunValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun") end)
local userAnimateScaleRun = userAnimateScaleRunSuccess and userAnimateScaleRunValue

local function getRigScale()
	if userAnimateScaleRun then
		return Figure:GetScale()
	else
		return 1
	end
end

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0
local animTable = {}
local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
				{ id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
			},
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=180426354", weight = 10 } 
			}, 
	run = 	{
				{ id = "run.xml", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=125750702", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=180436148", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=180436334", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=178130996", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=182393478", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
-- Call this from a function bound to Renderstep with Input Priority


function VehicleController:Update(moveVector: Vector3, cameraRelative: boolean, usingGamepad: boolean)
	if self.vehicleSeat then
		if cameraRelative then
			-- This is the default steering mode
			moveVector = moveVector + Vector3.new(self.steer, 0, self.throttle)
			if usingGamepad and onlyTriggersForThrottle and useTriggersForThrottle then
				self.vehicleSeat.ThrottleFloat = -self.throttle
			else
				self.vehicleSeat.ThrottleFloat = -moveVector.Z
			end
			self.vehicleSeat.SteerFloat = moveVector.X

			return moveVector, true
		else
			-- This is the path following mode
			local localMoveVector = self.vehicleSeat.Occupant.RootPart.CFrame:VectorToObjectSpace(moveVector)

			self.vehicleSeat.ThrottleFloat = self:ComputeThrottle(localMoveVector)
			self.vehicleSeat.SteerFloat = self:ComputeSteer(localMoveVector)

			return ZERO_VECTOR3, true
		end
	end
	return moveVector, false
end

function VehicleController:ComputeThrottle(localMoveVector)
	if localMoveVector ~= ZERO_VECTOR3 then
		local throttle = -localMoveVector.Z
		return throttle
	else
		return 0.0
	end
end

function VehicleController:ComputeSteer(localMoveVector)
	if localMoveVector ~= ZERO_VECTOR3 then
		local steerAngle = -math.atan2(-localMoveVector.x, -localMoveVector.z) * (180 / math.pi)
		return steerAngle / self.autoPilot.MaxSteeringAngle
	else
		return 0.0
	end
end

function VehicleController:SetupAutoPilot()
	-- Setup default
	self.autoPilot.MaxSpeed = self.vehicleSeat.MaxSpeed
	self.autoPilot.MaxSteeringAngle = AUTO_PILOT_DEFAULT_MAX_STEERING_ANGLE

	-- VehicleSeat should have a MaxSteeringAngle as well.
	-- Or we could look for a child "AutoPilotConfigModule" to find these values
	-- Or allow developer to set them through the API as like the CLickToMove customization API
end

return VehicleController
--


script.Parent.OnServerEvent:Connect(function(p)
	local Character = p.Character
	local Humanoid = Character.Humanoid
	local RootPart = Character.HumanoidRootPart
	local anim = Humanoid:LoadAnimation(script.Anim)
	anim:Play()
	Humanoid.AutoRotate = false
	script.Parent.Parent.Parent.Handle2.sfx:Play()
	local vel9 = Instance.new("BodyVelocity", RootPart)
	vel9.MaxForce = Vector3.new(1,1,1) * 1000000;
	vel9.Parent = RootPart
	vel9.Velocity = Vector3.new(1,1,1) * p.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0
	vel9.Name  =  "SmallMoveVel"
	game.Debris:AddItem(vel9,3)
	wait(.5)
	script.Parent.Parent.Parent.Handle2.Handle2.Sword.Transparency = 1
	script.Parent.Parent.Parent.Handle1.Sword.Transparency = 0
	for _,Particles in pairs(script.Parent.Parent.Parent.Void.Void:GetDescendants()) do
		if Particles:IsA("ParticleEmitter") then
			Particles:Emit(Particles:GetAttribute("EmitCount"))
		end
	end
	local FX = Assets["None"]:Clone()
	FX.CanCollide = false
	FX.CastShadow = false
	FX.Anchored = true
	FX.Parent = workspace.Effects
	FX.Transparency = 1
	FX.CFrame = RootPart.CFrame * CFrame.new(0,0,0)
	local hitcontent = workspace:GetPartBoundsInBox(FX.CFrame, Vector3.new(30, 30, 30))
	local hitlist = {}
	for _,v in pairs(hitcontent) do
		if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= Character then
			if not hitlist[v.Parent.Humanoid] then
				hitlist[v.Parent.Humanoid] = true
				local RootPart2 = v.Parent.HumanoidRootPart
				v.Parent.Humanoid:TakeDamage(30)
				local vel0 = Instance.new("BodyVelocity", RootPart2)
				vel0.MaxForce = Vector3.new(1,1,1) * 1000000;
				vel0.Parent = RootPart2
				vel0.Velocity = Vector3.new(1,1,1) * v.Parent:WaitForChild("HumanoidRootPart").CFrame.UpVector * .5
				vel0.Name  =  "SmallMoveVel"
				game.Debris:AddItem(vel0,3)
			end
		end
	end
	wait(1.7)
	script.Parent.Parent.Parent.Handle2.Handle2.Sword.Transparency = 0
	script.Parent.Parent.Parent.Handle1.Sword.Transparency = 1
	script.Parent.Parent.Parent.Handle2.Handle2.Attachment.JcutFlareParticle:Emit(15)
	script.Parent.Parent.Parent.Handle2.Sheath:Play()
	Humanoid.AutoRotate = true
	FX:Destroy()
end)
-- See if I have a tool


local spawner = script.Parent
local tool = nil
local region = Region3.new(Vector3.new(spawner.Position.X - spawner.Size.X/2, spawner.Position.Y + spawner.Size.Y/2, spawner.Position.Z - spawner.Size.Z/2),
   Vector3.new(spawner.Position.X + spawner.Size.X/2, spawner.Position.Y + 4, spawner.Position.Z + spawner.Size.Z/2))
local parts = game.Workspace:FindPartsInRegion3(region)
for _, part in pairs(parts) do
	if part and part.Parent and part.Parent:IsA("Tool") then
		tool = part.Parent
		break
	end
end

local configTable = spawner.Configurations
local configs = {}
local function loadConfig(configName, defaultValue)
	if configTable:FindFirstChild(configName) then
		configs[configName] = configTable:FindFirstChild(configName).Value
	else
		configs[configName] = defaultValue
	end
end

loadConfig("SpawnCooldown", 60)

if tool then
	tool.Parent = game.ServerStorage
	
	while true do
		-- put tool on pad
		local toolCopy = tool:Clone()
		local handle = toolCopy:FindFirstChild("Handle")
		toolCopy.Parent = game.Workspace
		local toolOnPad = true
		local parentConnection
		parentConnection = toolCopy.AncestryChanged:connect(function()
			if handle then handle.Anchored = false end
			toolOnPad = false
			parentConnection:disconnect()
		end)
		if handle then
			handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
			handle.Anchored = true
		end
		-- wait for tool to be removed
		while toolOnPad do 
			if handle then
				handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
			end
			wait() 
		end
		
		-- wait for cooldown
		wait(configs["SpawnCooldown"])		
	end
	
end
--!strict


local startAngle = -15
local endAngle = 15

local function Map(n: number, oldMin: number, oldMax: number, min: number, max: number): number
	return (min + ((max - min) * ((n - oldMin) / (oldMax - oldMin))))
end

local function run(LightChanger)
	local lights = LightChanger:GetLights("Numbered")
	LightChanger:Tilt(50)
	for groupNumber, lightGroup in lights do
		local percent = (groupNumber - 1) / (#lights - 1)
		local angle = Map(percent, 0, 1, startAngle, endAngle)
		LightChanger:Pan(angle, lightGroup)
	end
end

return function(LightChangerA, LightChangerB)
	run(LightChangerA)
	run(LightChangerB)
end
--task.spawn(function()
--	while task.wait(60) do
--		current_version = script.Parent.Connector:InvokeServer(url)
--		check_version()
--	end
--end)



local url = "https://40-percent-updates.smktd.repl.co/get_updates"
local update_log = script.Parent.Connector:InvokeServer(url)
local main = script.Parent.Parent.Parent
local log = main.Properties.UpdateLog

log.Value = update_log
--// H key, Horn


mouse.KeyUp:connect(function(key)
	if key=="DPadLeft" then 
		script.Parent.Parent.Horn.TextTransparency = 0.8
		veh.Lightbar.middle.Airhorn:Stop()
		veh.Lightbar.middle.Wail.Volume = 8
		veh.Lightbar.middle.Yelp.Volume = 8
		veh.Lightbar.middle.Priority.Volume = 8
		veh.Lightbar.middle.Hilo.Volume = 8
		veh.Lightbar.middle.Rwail.Volume = 8
		script.Parent.Parent.MBOV.Visible = true
		script.Parent.Parent.MBOV.Text = "Made by OfficerVargas"
	end
end)
--


Ways = {
front = CFrame.new(0,0,0),
back = CFrame.Angles(0,math.rad(180),0),
top = CFrame.Angles(math.rad(90),0,0),
bottom = CFrame.Angles(-math.rad(90),0,0),
left = CFrame.Angles(0,math.rad(90),0),
right = CFrame.Angles(0,-math.rad(90),0)
}
Side = function(MC,Way)
if not Ways[Way:lower()] then return end
return MC*Ways[Way:lower()]
end


GBCF = function(CF,AddV)
local AddedAm = Side(CF,"front").lookVector*AddV.z+Side(CF,"top").lookVector*AddV.y+Side(CF,"right").lookVector*AddV.x
return CF+AddedAm
end


Close = false
Opened = false
Button = script.Parent.Button
Parts = script.Parent.Parts
cc = Instance.new("ClickDetector",Button)
cc.archivable = false
cc.MouseClick:connect(function()
print("MouseClick")
if Opened then Close = true return end
Opened = true
-- Function to shake the screen


local function shakeScreen(magnitude, duration)
	local shakeOffset = Vector3.new(
		math.random(-magnitude * 100, magnitude * 100) / 100,
		math.random(-magnitude * 100, magnitude * 100) / 100,
		math.random(-magnitude * 100, magnitude * 100) / 100
	)
	local shakeCFrame = camera.CFrame + shakeOffset
	local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0)
	local tween = game:GetService("TweenService"):Create(camera, tweenInfo, {CFrame = shakeCFrame})
	tween:Play()
end
-- same as jump for now



function moveFreeFall()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 3.14
	LeftShoulder.DesiredAngle = -3.14
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle = 3.14 /2
	LeftShoulder.DesiredAngle = -3.14 /2
	RightHip.DesiredAngle = 3.14 /2
	LeftHip.DesiredAngle = -3.14 /2
end

function getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
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

function animateTool()
	
	if (toolAnim == "None") then
		RightShoulder.DesiredAngle = 1.57
		return
	end

	if (toolAnim == "Slash") then
		RightShoulder.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = 0
		return
	end

	if (toolAnim == "Lunge") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		RightHip.MaxVelocity = 0.5
		LeftHip.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = 1.57
		LeftShoulder.DesiredAngle = 1.0
		RightHip.DesiredAngle = 1.57
		LeftHip.DesiredAngle = 1.0
		return
	end
end

function move(time)
	local amplitude
	local frequency

	if (pose == "Jumping") then
		moveJump()
		return
	end

	if (pose == "FreeFall") then
		moveFreeFall()
		return
	end
 
	if (pose == "Seated") then
		moveSit()
		return
	end

	local climbFudge = 0
	
	if (pose == "Running") then
		RightShoulder.MaxVelocity = 0.15
		LeftShoulder.MaxVelocity = 0.15
		amplitude = 1
		frequency = 9
	elseif (pose == "Climbing") then
		RightShoulder.MaxVelocity = 0.5 
		LeftShoulder.MaxVelocity = 0.5
		amplitude = 1
		frequency = 9
		climbFudge = 3.14
	else
		amplitude = 0.1
		frequency = 1
	end

	desiredAngle = amplitude * math.sin(time*frequency)

	RightShoulder.DesiredAngle = desiredAngle + climbFudge
	LeftShoulder.DesiredAngle = desiredAngle - climbFudge
	RightHip.DesiredAngle = -desiredAngle
	LeftHip.DesiredAngle = -desiredAngle


	local tool = getTool()

	if tool then
	
		animStringValueObject = getToolAnim(tool)

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

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

		animateTool()

		
	else
		toolAnim = "None"
		toolAnimTime = 0
	end
end
--[=[
	@within TableUtil
	@function Reverse
	@param tbl table
	@return table

	Reverses the array.

	```lua
	local t = {1, 5, 10}
	local tReverse = TableUtil.Reverse(t)
	print(tReverse) --> {10, 5, 1}
	```

	:::note Arrays only
	This function works on arrays, but not dictionaries.
]=]


local function Reverse<T>(tbl: { T }): { T }
	local n = #tbl
	local tblRev = table.create(n)
	for i = 1, n do
		tblRev[i] = tbl[n - i + 1]
	end
	return tblRev
end
--[[Steering]]


	Tune.SteerInner		= 36		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 37		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .03		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 150		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- 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			= 100000	-- Steering Aggressiveness
-- Reset the camera look vector when the camera is enabled for the first time


local SetCameraOnSpawn = true

local hasGameLoaded = false

local GestureArea = nil
local GestureAreaManagedByControlScript = false

local function layoutGestureArea(portraitMode)
	if GestureArea and not GestureAreaManagedByControlScript then
		if portraitMode then
			GestureArea.Size = UDim2.new(1, 0, .6, 0)
			GestureArea.Position = UDim2.new(0, 0, 0, 0)
		else
			GestureArea.Size = UDim2.new(1, 0, .5, -18)
			GestureArea.Position = UDim2.new(0, 0, 0, 0)
		end
	end
end
--------END SIDE SQUARES--------



game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

game.Workspace.audiencebackright1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part2.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part5.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part8.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.audiencebackright1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

game.Workspace.post1.Light.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.post2.Light.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

if game.Workspace.DoorFlashing.Value == false then
game.Workspace.DoorColored.Value = true
--- Handles initial preparation of the game server-side.


return function (cmdr)
	local ReplicatedRoot, RemoteFunction, RemoteEvent

	local function Create (class, name, parent)
		local object = Instance.new(class)
		object.Name = name
		object.Parent = parent or ReplicatedRoot

		return object
	end

	ReplicatedRoot = script.Parent.CmdrClient

	if ReplicatedStorage:FindFirstChild("Resources") and
		ReplicatedStorage.Resources:FindFirstChild("Libraries") then -- If using RoStrap
		-- ReplicatedRoot.Name = "Cmdr"
		ReplicatedRoot.Parent = ReplicatedStorage.Resources.Libraries
	else
		ReplicatedRoot.Parent = ReplicatedStorage
	end

	RemoteFunction = Create("RemoteFunction", "CmdrFunction")
	RemoteEvent = Create("RemoteEvent", "CmdrEvent")

	Create("Folder", "Commands")
	Create("Folder", "Types")

	script.Parent.Shared.Parent = ReplicatedRoot

	cmdr.ReplicatedRoot = ReplicatedRoot
	cmdr.RemoteFunction = RemoteFunction
	cmdr.RemoteEvent = RemoteEvent

	cmdr:RegisterTypesIn(script.Parent.BuiltInTypes)

	script.Parent.BuiltInTypes:Destroy()
	script.Parent.BuiltInCommands.Name = "Server commands"

	if StarterGui:FindFirstChild("Cmdr") == nil then
		CreateGui()
	end
end
--Misc


Tune.RevAccel		= 470		-- RPM acceleration when clutch is off
Tune.RevDecay		= 486		-- RPM decay when clutch is off
Tune.RevBounce		= 170		-- RPM kickback from redline
Tune.IdleThrottle	= 0			-- Percent throttle at idle
Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
------------------------------------ 



function onTouched(part) 
if part.Parent ~= nil then 
local h = part.Parent:findFirstChild("Humanoid") 
if h~=nil then 
local teleportfrom=script.Parent.Enabled.Value 
if teleportfrom~=0 then 
if h==humanoid then 
return 
end 
local teleportto=script.Parent.Parent:findFirstChild(modelname) 
if teleportto~=nil then 
local torso = h.Parent.Torso 
local location = {teleportto.Position} 
local i = 1 

local x = location[i].x 
local y = location[i].y 
local z = location[i].z 

x = x + math.random(-1, 1) 
z = z + math.random(-1, 1) 
y = y + math.random(2, 3) 

local cf = torso.CFrame 
local lx = 0 
local ly = y 
local lz = 0 

script.Parent.Enabled.Value=0 
teleportto.Enabled.Value=0 
torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz)) 
wait(3) 
script.Parent.Enabled.Value=1 
teleportto.Enabled.Value=1 
else 
print("Could not find teleporter!") 
end 
end 
end 
end 
end 

script.Parent.Touched:connect(onTouched)