Pinkstack/roblox-luau-corpus-text huggingface dataset:
--Rocket.Touched:connect(OnTouched)



while script.Parent == Rocket do
	ExplodeClone = Explode:clone()
	ExplodeClone.Name = "Effect"
	ExplodeClone.BrickColor = BrickColor.new("White")
	ExplodeClone.Position = Rocket.Position
	ExplodeClone.Mesh.Scale = Vector3.new(1,1,1)*5
	ExplodeClone.CFrame = ExplodeClone.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-10000,10000)/100,math.random(-10000,10000)/100,math.random(-10000,10000)/100)
	ExplodeClone.Parent = game.Players.LocalPlayer.Character.Torso
	NewScript = Rocket.Trail:clone()
	NewScript.Disabled = false
	NewScript.Parent = ExplodeClone
	if Target.Value ~= nil and Target.Value.Parent ~= nil then
		if Target.Value then idealVelocity = --[[SPEED *]] (Target.Value.Position - Rocket.Position).unit end
		Rocket.Velocity = --[[SPEED *]] (Rocket.Velocity + 0.125 * (idealVelocity - Rocket.Velocity)).unit
		Rocket.CFrame = CFrame.new(Rocket.Position, Rocket.Position + Rocket.Velocity)
	end
	local hit,pos = raycast(Rocket.Position,((Rocket.CFrame * CFrame.new(0,0,-5)).p-Rocket.Position).unit,5)
	if hit then
		OnTouched(hit,pos)
	end
	Rocket.CFrame = Rocket.CFrame * CFrame.new(0,0,-5) * CFrame.Angles(0, 0, math.rad(18))
	game:GetService("RunService").Stepped:wait()
end
-------------------



local function SetCollisionGroupRecursive(Object)
	if Object:IsA("BasePart") then
		PhysicsService:SetPartCollisionGroup(Object, CollisionGroupName)
	end

	for _, Objects in pairs(Object:GetChildren()) do
		SetCollisionGroupRecursive(Objects)
	end
end

local function OnCharacterAdded(Character)
	SetCollisionGroupRecursive(Character)
end

local function OnPlayerAdded(Player)
	Player.CharacterAdded:Connect(OnCharacterAdded)
end

local function OnMobAdded(Mob)
	SetCollisionGroupRecursive(Mob)
end
-- Uses this UI instead of Roblox's for when data is loading using ContentStreaming



local LoadingFrame = script.Parent.LoadingFrame
local GuiService = game:GetService("GuiService")
local player = game.Players.LocalPlayer

GuiService:SetGameplayPausedNotificationEnabled(false)

local function onPauseStateChanged()
	if player.GameplayPaused then
		LoadingFrame.Visible = true
	else
		LoadingFrame.Visible = false
	end
end

player:GetPropertyChangedSignal("GameplayPaused"):Connect(onPauseStateChanged)
--ModulateSwitch



function KeepModulateActive()
	repeat wait()
		ModVal.Value = true
	until ModSwch.Value == false or Power.Value == false
	ModVal.Value = false
end

ModSwch.Changed:Connect(function()
	if ModSwch.Value == true then
		ModSwch.Parent.P1.Transparency = 1
		ModSwch.Parent.P2.Transparency = 0
		ClickSound:Play()
		if Power.Value == true then
			KeepModulateActive()
		end
	else
		ModSwch.Parent.P1.Transparency = 0
		ModSwch.Parent.P2.Transparency = 1
		ClickSound:Play()
		ModVal.Value = false
	end
end)
-- This is taken from Roact internal implementation details as a temporary helper
-- so that we can control warnings spew and also validate warning logs in unit tests.
-- We should clean it up and turn it into a nice central logging facility later on.



local outputEnabled = true
local collectors = {}

local function createLogInfo()
	local logInfo = {
		warnings = {},
	}

	setmetatable(logInfo, {
		__tostring = function(self)
			return ("LogInfo\n\tWarnings (%d):\n\t\t%s"):format(
				#self.warnings,
				table.concat(self.warnings, "\n\t\t")
			)
		end,
	})

	return logInfo
end

local Logging = {}

function Logging.capture(callback)
	local collector = createLogInfo()

	local wasOutputEnabled = outputEnabled
	outputEnabled = false
	collectors[collector] = true

	local success, result = pcall(callback)

	collectors[collector] = nil
	outputEnabled = wasOutputEnabled

	assert(success, result)

	return collector
end

function Logging.warn(message)
	for collector in pairs(collectors) do
		table.insert(collector.warnings, message)
	end

	if outputEnabled then
		warn(message)
	end
end

return Logging
-- This module enables you to place Icon wherever you like within the data model while
-- still enabling third-party applications (such as HDAdmin/Nanoblox) to locate it
-- This is necessary to prevent two TopbarPlus applications initiating at runtime which would
-- cause icons to overlap with each other



local replicatedStorage = game:GetService("ReplicatedStorage")
local TopbarPlusReference = {}

function TopbarPlusReference.addToReplicatedStorage()
    local existingItem = replicatedStorage:FindFirstChild(script.Name)
    if existingItem then
        return false
    end
    local objectValue = Instance.new("ObjectValue")
    objectValue.Name = script.Name
    objectValue.Value = script.Parent
    objectValue.Parent = replicatedStorage
    return objectValue
end

function TopbarPlusReference.getObject()
    local objectValue = replicatedStorage:FindFirstChild(script.Name)
    if objectValue then
        return objectValue
    end
    return false
end

return TopbarPlusReference
Rocket.CanCollide = false





Tool.Note:clone().Parent = Rocket

Tool.RocketScript:clone().Parent = Rocket

--Tool.Explosion:clone().Parent = Rocket

--Tool.Swoosh:clone().Parent = Rocket





function fire(vTarget)



	local vCharacter = Tool.Parent;

	

	local vHandle = Tool:findFirstChild("Handle")

	if vHandle == nil then

		print("Handle not found")

		return 

	end



	local chord = Tool.Ichord:clone()



	if (Tool.mode.Value==1) then

		chord = Tool.Ichord:clone()

	elseif (Tool.mode.Value==2) then

		chord = Tool.IVIIchord:clone()

	elseif (Tool.mode.Value==3) then

		chord = Tool.Vchord:clone()

	elseif (Tool.mode.Value==4) then

		chord = Tool.VVIIchord:clone()

	elseif (Tool.mode.Value==5) then

		chord = Tool.IVchord:clone()

	elseif (Tool.mode.Value==6) then

		chord = Tool.IIIchord:clone()

	end

	

	chord.Name = "chord"



	local dir = Vector3.new(math.random()-.5, 1, math.random() - .5).unit



	local missile = Rocket:clone()



	chord.Parent = missile
	script.Parent.pitchmode:Clone().Parent = missile


	local pos = vHandle.Position + Vector3.new(0, 5 ,0)

	

	--missile.Position = pos

	missile.CFrame = CFrame.new(pos,  pos + dir)

	missile.BodyVelocity.velocity = dir * 30

	local vPlayer = game.Players:playerFromCharacter(vCharacter)



	if vPlayer == nil then

		print("Player not found")

	end
	

	missile.RocketScript.Disabled = false


	missile.Parent = game.Workspace

end



Tool.Enabled = true

function onActivated()

	if not Tool.Enabled then

		return

	end



	Tool.Enabled = false



	local character = Tool.Parent;

	local humanoid = character.Humanoid

	if humanoid == nil then

		print("Humanoid not found")

		return 

	end



	local targetPos = humanoid.TargetPoint



	fire(targetPos)



	Tool.Enabled = true

end





script.Parent.Activated:connect(onActivated)
--[[Weight and CG]]


	Tune.Weight			= 5202		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		4.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2		-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--Listen for input




seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if seat.Occupant ~= nil then 
seat.Sound.Volume = 1
seat.Sound.PlaybackSpeed = 2
for i,v in pairs(script.Parent.Parts.Effect.EffectPart:GetChildren()) do
if v.Name == "Effect" then
v.Enabled = true 
end
end
	else
seat.Sound.Volume = 0
seat.Sound.PlaybackSpeed = 2
for i,v in pairs(script.Parent.Parts.Effect.EffectPart:GetChildren()) do
if v.Name == "Effect" then
v.Enabled = false 
end
end
end
end)

seat:GetPropertyChangedSignal("Throttle"):Connect(function()
local goal = {}
local goal2 = {}

goal.Force = Vector3.new(seat.Throttle, 0, 0) * 100000
if seat.Throttle == 1 then goal2.PlaybackSpeed = 4	else goal2.PlaybackSpeed = 2 end
local Sound = TS:Create(seat.Sound,TI,goal2)
local Throttle = TS:Create(vectorForce,TI,goal)
Throttle:Play()
Sound:Play()
end)

seat:GetPropertyChangedSignal("Steer"):Connect(function()
	torque.Torque = Vector3.new(0, -seat.Steer, 0) * 500000
end)
--[ Functions ]--


function CreateWeld(Part, CF)
	local w = Instance.new("Weld")
	w.Name = "LegWeld"
	w.Parent = Torso
	w.Part0 = Torso
	w.Part1 = Part
	w.C1 = CF
end

function StandUp()
	Humanoid.CameraOffset = Vector3.new(0, 0, 0)
	-- Right Leg
	RH.Part1 = RL

	-- Left Leg
	LH.Part1 = LL

	-- Delete Welds
	for i, s in pairs(Torso:GetChildren()) do
		if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
			s:Destroy()
		end
	end

	-- Raise Character
	RJ.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
	RJ.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
end
--Make the part when touched enable the "ParticleEmitter" inside of it ad then disable it after 1 second


checkpoint.Touched:Connect(function(hit)
	if hit and hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") then
		local emitter = checkpoint.ParticleEmitter
		emitter.Enabled = true
		
		wait(0.3)
		
		emitter.Enabled = false
	end
end)

function onCheckpointTouched(hit)
	if hit and hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") then
		local player = Players:GetPlayerFromCharacter(hit.Parent)
		local checkpointData = ServerStorage:FindFirstChild("CheckpointData")
		if not checkpointData then
			checkpointData = Instance.new("Folder")
			checkpointData.Name = "CheckpointData"
			checkpointData.Parent = ServerStorage
		end

		local userIdString = tostring(player.UserId)
		local checkpointValue = checkpointData:FindFirstChild(userIdString)

		if checkpointValue.Value == script.Parent then
			script.CheckPointPopup.Enabled=true
			wait(2)
			script.CheckPointPopup.Enabled=false

		end

	end

end
-------------------------------------


Tool = script.Parent

p = Instance.new("Part")
p.Parent = game.Lighting
p.Name = "BulletTexture"
p.CanCollide = false
p.formFactor = "Custom"
p.Size = Vector3.new(1,0.1,1)
p.Transparency = 1
g = Instance.new("SpecialMesh")
g.Parent = p

run = 0 
equiped=false
dw = false
sp=script.Parent
RayLength=1000
Spread=0.0001
enabled=true
reloading=false
down=false
r=game:service("RunService")
last=0
last2=0
last3=0
last4=0
last5=0
last6=0
UseDouble = false

function check()
	sp.Name=ToolName.."-("..tostring(sp.Ammo.Value)..")"
end

function computeDirection(vec)
	return vec.unit
end
-- Tips


function Icon:setTip(text)
	assert(typeof(text) == "string" or text == nil, "Expected string, got "..typeof(text))
	local textSize = textService:GetTextSize(text, 12, Enum.Font.GothamSemibold, Vector2.new(1000, 20-6))
	self.instances.tipLabel.Text = text
	self.instances.tipFrame.Size = UDim2.new(0, textSize.X+6, 0, 20)
	self.instances.tipFrame.Parent = (text and activeItems) or self.instances.iconContainer
	self.tipText = text
	if self.hovering then
		self:_displayTip(true)
	end
	return self
end

function Icon:_displayTip(visibility)
	local newVisibility = visibility
	local tipFrame = self.instances.tipFrame
	if self.tipText == nil then
		return
	elseif userInputService.TouchEnabled and not self._draggingFinger then
		return
	end
	if newVisibility == true then
		-- When the user moves their cursor/finger, update tip to match the position
		local function updateTipPositon(x, y)
			local newX = x
			local newY = y
			local camera = workspace.CurrentCamera
			local viewportSize = camera and camera.ViewportSize
			if userInputService.TouchEnabled then
				--tipFrame.AnchorPoint = Vector2.new(0.5, 0.5)
				local desiredX = newX - tipFrame.Size.X.Offset/2
				local minX = 0
				local maxX = viewportSize.X - tipFrame.Size.X.Offset
				local desiredY = newY + THUMB_OFFSET + 60
				local minY = tipFrame.AbsoluteSize.Y + THUMB_OFFSET + 64 + 3
				local maxY = viewportSize.Y - tipFrame.Size.Y.Offset
				newX = math.clamp(desiredX, minX, maxX)
				newY = math.clamp(desiredY, minY, maxY)
			elseif IconController.controllerModeEnabled then
				local indicator = TopbarPlusGui.Indicator
				local newPos = indicator.AbsolutePosition
				newX = newPos.X - tipFrame.Size.X.Offset/2 + indicator.AbsoluteSize.X/2
				newY = newPos.Y + 90
			else
				local desiredX = newX
				local minX = 0
				local maxX = viewportSize.X - tipFrame.Size.X.Offset - 48
				local desiredY = newY
				local minY = tipFrame.Size.Y.Offset+3
				local maxY = viewportSize.Y
				newX = math.clamp(desiredX, minX, maxX)
				newY = math.clamp(desiredY, minY, maxY)
			end
			--local difX = tipFrame.AbsolutePosition.X - tipFrame.Position.X.Offset
			--local difY = tipFrame.AbsolutePosition.Y - tipFrame.Position.Y.Offset
			--local globalX = newX - difX
			--local globalY = newY - difY
			--tipFrame.Position = UDim2.new(0, globalX, 0, globalY-55)
			tipFrame.Position = UDim2.new(0, newX, 0, newY-20)
		end
		local cursorLocation = userInputService:GetMouseLocation()
		if cursorLocation then
			updateTipPositon(cursorLocation.X, cursorLocation.Y)
		end
		self._hoveringMaid:give(self.instances.iconButton.MouseMoved:Connect(updateTipPositon))
	end
	-- Change transparency of relavent tip instances
	for _, settingName in pairs(self._uniqueSettings.tip) do
		self:_update(settingName)
	end
end
-- ROBLOX deviation: function to check whether a table is an array
-- https://stackoverflow.com/questions/7526223/how-do-i-know-if-a-table-is-an-array/52697380#52697380


local function is_array(t)
	if type(t) ~= "table" then
		return false
	end

	-- objects always return empty size
	if #t > 0 then
		return true
	end

	-- only object can have empty length with elements inside
	for k, v in pairs(t) do
		return false
	end

	-- if no elements it can be array and not at same time
	return true
end
---


		---ForCode
		script.Parent["1"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["2"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["3"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["4"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["5"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["6"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["7"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["8"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["9"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		script.Parent["0"].ClickDetector.MouseClick:Connect(function()
			huh.ButtonSound:Play()
			folder.CodePrivate.Value = folder.CodePrivate.Value .."I"
		end)
		---
--[[ArrowTx = {
	[1]=146678603,
	[2]=146678613,
	[3]=146678618,
	[4]=146678637,
	[5]=146678647,
	[6]=146678656,
	[7]=146678671
}



Scroll = false
ArrowInd = script.Parent.Car.Screen.SurfaceGui.Frame.Arrow
Direction.Changed:connect(function()
	
	if Scroll then return end
	Scroll = true
if Direction.Value == "U" then
	ArrowInd.Rotation = 0
	repeat
		for i=1,7 do
			ArrowInd.Image = "http://www.roblox.com/asset/?id="..ArrowTx[i]
			wait()
		end
	until Direction.Value == "N"
end
if Direction.Value == "D" then
	ArrowInd.Rotation = 180
	repeat
		for i=1,7 do
			ArrowInd.Image = "http://www.roblox.com/asset/?id="..ArrowTx[i]
			wait()
		end
	until Direction.Value == "N"
end
ArrowInd.Image = "http://www.roblox.com/asset/?id=0"

Scroll = false

end)
]]

--
-------------------------------------Gun info


ToolName="M110"

ClipSize=10
ReloadTime=.25
Firerate=.1
MinSpread=0
MaxSpread=0
SpreadRate=0
BaseDamage=67
automatic=false
burst=false
shot=false			--Shotgun
BarrlePos=Vector3.new(-2.20,.40,0)
Cursors={"rbxasset://textures\\GunCursor.png"}
ReloadCursor="rbxasset://textures\\GunWaitCursor.png"
--// # key, ManOn


mouse.KeyDown:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Man:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		script.Parent.Parent.Sirens.Man.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		veh.Lightbar.MANUAL.Transparency = 0
	end
end)
--!nonstrict
--[[
	ControlModule - This ModuleScript implements a singleton class to manage the
	selection, activation, and deactivation of the current character movement controller.
	This script binds to RenderStepped at Input priority and calls the Update() methods
	on the active controller instances.

	The character controller ModuleScripts implement classes which are instantiated and
	activated as-needed, they are no longer all instantiated up front as they were in
	the previous generation of PlayerScripts.

	2018 PlayerScripts Update - AllYourBlox
--]]


local ControlModule = {}
ControlModule.__index = ControlModule
--list of admin ids
--71560306 (guest)
--61385600 (tornado)
--60127374 (dark)
--118860335 (klevin)
--262491334 (icarus)
--647654469 (real)
--19634055 (jericho)
--192203600 (potato)
--15889415 (littlekittehs)
--50809949 (ufhbrfc)
--36675421 (bluenin12)
--79849873 (pvpfire_123)
--- Solve direction and length of the ray by comparing current and last frame's positions
-- @param point type


function solver:Solve(point: {[string]: any}): (Vector3, Vector3)
	--- Translate localized bone positions to world space values
	local originBone: Bone = point.Instances[1]
	local vector: Vector3 = point.Instances[2]
	local pointToWorldSpace: Vector3 = originBone.TransformedWorldCFrame.Position + vector

	--- If LastPosition is nil (caused by if the hitbox was stopped previously), rewrite its value to the current point position
	if not point.LastPosition then
		point.LastPosition = pointToWorldSpace
	end

	local origin: Vector3 = point.LastPosition
	local direction: Vector3 = pointToWorldSpace - (point.LastPosition or EMPTY_VECTOR)

	point.WorldSpace = pointToWorldSpace

	return origin, direction
end

function solver:UpdateToNextPosition(point: {[string]: any}): Vector3
	return point.WorldSpace
end

function solver:Visualize(point: {[string]: any}): CFrame
	return CFrame.lookAt(point.WorldSpace, point.LastPosition)
end

return solver
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

script:WaitForChild("Idle")



if not FE then
	for i,v in pairs(car.DriveSeat:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.DriveSeat
	end
	
	car.DriveSeat.Idle:Play()
	
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
    car.DriveSeat.Idle.Pitch = (car.DriveSeat.Idle.SetPitch.Value - car.DriveSeat.Idle.SetRev.Value*_RPM/_Tune.Redline)*on^2
end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Idle",car.DriveSeat,script.Idle.SoundId,0,true)
	handler:FireServer("playSound","Idle")

	local pitch=0

	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Idle.SetPitch.Value - script.Idle.SetRev.Value*_RPM/_Tune.Redline)*on^2
		handler:FireServer("updateSound","Idle",script.Idle.SoundId,pitch,script.Idle.Volume)
	end
end
--[[ TELEPORT SERVICE ]]

--

if (game.VIPServerId ~= "" and game.VIPServerOwnerId == 0) then

	warn("Booting Server !")

	local waitTime = 10

	Players.PlayerAdded:connect(function(player)
		wait(waitTime)
		waitTime = waitTime / 2
		TeleportService:Teleport(game.PlaceId, player)
	end)

	for _,player in pairs(Players:GetPlayers()) do
		TeleportService:Teleport(game.PlaceId, player)
		wait(waitTime)
		waitTime = waitTime / 2
	end
else
	game:BindToClose(function()
		local con

		if (#Players:GetPlayers() == 0) then
			return
		end

		if (game:GetService("RunService"):IsStudio()) then
			return
		end

		for i,v in pairs(game.Players:GetChildren()) do
			AddUI(v)
		end

		con = Players.PlayerAdded:connect(function(v)
			wait(1)
			AddUI(v)
		end)

		wait(10) 

		con:Disconnect()


		local reservedServerCode = TeleportService:ReserveServer(game.PlaceId)

		for _,player in pairs(Players:GetPlayers()) do
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { player })
		end
		Players.PlayerAdded:connect(function(player)
			TeleportService:TeleportToPrivateServer(game.PlaceId, reservedServerCode, { player })
		end)
		while (#Players:GetPlayers() > 0) do
			wait(1)
		end 


	end)
end
--------------------------------------------------------------#


function Tween(instance,tweeninformation,goals)
	TweenService:Create(instance,tweeninformation,goals):Play()
end
LightGroup = script.Parent.Parent.Parent.Misc.Trunk.Lights:GetChildren()
while true do
	wait(0)
	if script.Parent.on.Value then
		for i = 1,#LightGroup do
			Tween(LightGroup[i],TweenInfo.new(deltatime),{Transparency = 0})
			Tween(LightGroup[i].Light,TweenInfo.new(deltatime),{Brightness = 2})
		end
	else
		for i = 1,#LightGroup do
			Tween(LightGroup[i],TweenInfo.new(deltatime),{Transparency = 1})
			Tween(LightGroup[i].Light,TweenInfo.new(deltatime),{Brightness = 0})
		end
	end
end
-- Create the collision groups and set them to not collide with each other


local function collisionGroupExists(groupName)
	local groups = PhysicsService:GetRegisteredCollisionGroups()
	for _, group in ipairs(groups) do
		if group.name == groupName then
			return true
		end
	end
	return false
end
if not collisionGroupExists(npcGroup) then
	PhysicsService:RegisterCollisionGroup(npcGroup)
end
if not collisionGroupExists(playerGroup) then
	PhysicsService:RegisterCollisionGroup(playerGroup)
end
PhysicsService:CollisionGroupSetCollidable(npcGroup, playerGroup, false)
--------------------------------------------------------------------------



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	= 0.8	,
	FMinFriction 	= .6	,
	
	RWearSpeed		= 1	,
	RTargetFriction	= 0.8	,
	RMinFriction	= .6	,
	
	--Tire Slip
	TCSOffRatio		= 1	,
	WheelLockRatio	= 1/1	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/9	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= 0		,	--SS6 Default = .5
	RElasticity		= 0		,	--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
}