Roblox/luau_corpus huggingface dataset:
--[[Weight and CG]]
	Tune.Weight			= 2300		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.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
--[=[
	@return Promise<any>
	Returns a Promise which resolves once the property object is
	ready to be used. The resolved promise will also contain the
	value of the property.

	```lua
	-- Use andThen clause:
	clientRemoteProperty:OnReady():andThen(function(initialValue)
		print(initialValue)
	end)

	-- Use await:
	local success, initialValue = clientRemoteProperty:OnReady():await()
	if success then
		print(initialValue)
	end
	```
]=]
function ClientRemoteProperty:OnReady()
	if self._ready then
		return Promise.resolve(self._value)
	end
	return Promise.fromEvent(self._rs, function(value)
		self._value = value
		self._ready = true
		return true
	end):andThen(function()
		return self._value
	end)
end
-- Handle Transitions

local replicatedStorage = game:GetService("ReplicatedStorage")
local EventSequencer = require(replicatedStorage:WaitForChild("EventSequencer"))
local tokenTransitionModule = require(script:WaitForChild("TokenTransitionModule"))

EventSequencer.onSceneEndingWarningForClient:Connect(function(oldSceneName)
	tokenTransitionModule.Enable()
end)
EventSequencer.onSceneLoadedForClient:Connect(function(newSceneName)
	wait(4)
	tokenTransitionModule.Disable()
end)
-- объявление генератора случайных чисел
rnd=Random.new()
-- Parts
local Entry = Slide:WaitForChild("Entry")

local function MovePlayer(Part)
	if game.Players:GetPlayerFromCharacter(Part.Parent) then
		local Character = Part.Parent
		local Humanoid = Character:WaitForChild("Humanoid")
		local RootPart = Character:WaitForChild("HumanoidRootPart")
		
		if Humanoid.Sit == false then
			-- Make player sit
			Humanoid.Sit = true
			
			if Character.PrimaryPart then
				-- Move player
				Character:SetPrimaryPartCFrame(Entry.CFrame * CFrame.Angles(0,0,math.rad(90)) + Entry.CFrame.lookVector*2)
			else
				-- Extra precaution
				RootPart.CFrame = CFrame.new(Entry.CFrame * CFrame.Angles(0,0,math.rad(90)) + Entry.CFrame.lookVector*2)
			end
		end
	end
end
--- Scan for GUIs to add to index
local function Scan(instance, parent)
	--- Calculates which gui instance is more important (based on dependance and class)
	local function MoreImportant(a, b)
		local aHeight, aCurr = 0, a
		local bHeight, bCurr = 0, b
		repeat  aCurr = aCurr.Parent  aHeight = aHeight + 1  until aCurr.Parent == playerGui
		repeat  bCurr = bCurr.Parent  bHeight = bHeight + 1  until bCurr.Parent == playerGui
		if aHeight == bHeight then
			for i, v in ipairs(whitelistedClasses) do
				if v == a.ClassName then
					aHeight = i
				elseif v == b.ClassName then
					bHeight = i
				end
			end
		end
		return (aHeight < bHeight and a or b)
	end
	
	--- Iterate through gui instance children
	for _, child in ipairs(instance:GetChildren()) do
		if child.ClassName == "ScreenGui" and (not _L.Functions.SearchArray(blacklistedGuis, child.Name)) then
			GUI[child.Name:gsub("%s+", "")] = {Gui = child}
			Scan(child, child)
		elseif child:IsA("GuiObject") and parent then
			local exists = GUI[parent.Name:gsub("%s+", "")][child.Name:gsub("%s+", "")]
			if (not exists) or (exists and MoreImportant(child, exists) == child) then
				GUI[parent.Name:gsub("%s+", "")][child.Name:gsub("%s+", "")] = child
			end
			Scan(child, parent)
		end
	end
end

Scan(playerGui)

playerGui.ChildAdded:Connect(function(child)
	if child.ClassName == "ScreenGui" and (not _L.Functions.SearchArray(blacklistedGuis, child.Name)) then
		GUI[child.Name:gsub("%s+", "")] = {Gui = child}
		Scan(child, child)
	end
end)
---------------------------------------------------

Displays = 2 -- Sets how many displays this scripts will use...
DisplayColor = Color3.fromRGB(248, 248, 248)
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{57,58},t},
[49]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{57,58,20,19},t},
[59]={{57,56,30,41,59},t},
[63]={{57,58,23,62,63},t},
[34]={{57,56,30,41,39,35,34},t},
[21]={{57,58,20,21},t},
[48]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{57,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{57,56,30,41,39,35,34,32,31},t},
[56]={{57,56},t},
[29]={{57,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{57,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{57},t},
[36]={{57,56,30,41,39,35,37,36},t},
[25]={{57,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{57,56,30,41,59,61,71},t},
[20]={{57,58,20},t},
[60]={{57,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{57,56,30,41,59,61,71,72,76,73,75},t},
[22]={{57,58,20,21,22},t},
[74]={{57,56,30,41,59,61,71,72,76,73,74},t},
[62]={{57,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{57,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{57,56,30,41,39,35},t},
[53]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{57,56,30,41,59,61,71,72,76,73},t},
[72]={{57,56,30,41,59,61,71,72},t},
[33]={{57,56,30,41,39,35,37,36,33},t},
[69]={{57,56,30,41,60,69},t},
[65]={{57,58,20,19,66,64,65},t},
[26]={{57,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{57,58,20,19,66,64,67,68},t},
[76]={{57,56,30,41,59,61,71,72,76},t},
[50]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{57,58,20,19,66},t},
[10]={n,f},
[24]={{57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{57,58,23},t},
[44]={{57,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{57,56,30,41,39},t},
[32]={{57,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{57,56,30},t},
[51]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{57,58,20,19,66,64,67},t},
[61]={{57,56,30,41,59,61},t},
[55]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{57,56,30,41,39,40,38,42},t},
[40]={{57,56,30,41,39,40},t},
[52]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{57,56,30,41},t},
[17]={n,f},
[38]={{57,56,30,41,39,40,38},t},
[28]={{57,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{57,58,20,19,66,64},t},
}
return r
--[[while true do
local v = 4
int = .1
for i = 1, 18 do
script.Parent.Rotation=script.Parent.Rotation+5--*v
game:GetService('RunService').RenderStepped:wait()
end
wait(int)
end--]]

while true do
script.Parent.Rotation = script.Parent.Rotation + 10
game:GetService('RunService').RenderStepped:wait()
end
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.V and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then
		Debounce = 2
		Track1 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.AnimationCharge)
		Track1:Play()
		for i = 1,math.huge do
			if Debounce == 2 then
				
				plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p)
				plr.Character.HumanoidRootPart.Anchored = true
			else
				
				break
				end
	     wait()
	  end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.V and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then
		Debounce = 3
		plr.Character.HumanoidRootPart.Anchored = false
		local Track2 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.AnimationRelease)
		Track2:Play()
		Track1:Stop()
		Sound:Play()
		for i = 1,10 do
			wait(0.1)
		local mousepos = Mouse.Hit
		script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p)
		end
		wait(0.3)
		Track2:Stop()
		wait(.5)
		Tool.Active.Value = "None"
		wait(3)
		Debounce = 1
	end
end)
--[=[
	Cleans up the subscription

	:::tip
	This will be invoked by the Observable automatically, and should not
	be called within the usage of a subscription.
	:::
]=]
function Subscription:Destroy()
	if self._state == stateTypes.PENDING then
		self._state = stateTypes.CANCELLED
	end

	self:_doCleanup()
end
--- Returns an array of the names of all registered commands (not including aliases)
function Registry:GetCommandNames ()
	local commands = {}

	for _, command in pairs(self.CommandsArray) do
		commands[#commands + 1] = command.Name
	end

	return commands
end

Registry.GetCommandsAsStrings = Registry.GetCommandNames
-----------------------------------------------------------------------
-- converts a number to a little-endian 32-bit integer string
-- * input value assumed to not overflow, can be signed/unsigned
-----------------------------------------------------------------------
function luaU:from_int(x)
  local v = ""
  x = math.floor(x)
  if x < 0 then x = 4294967296 + x end  -- ULONG_MAX+1
  for i = 1, 4 do
    local c = x % 256
    v = v..string.char(c); x = math.floor(x / 256)
  end
  return v
end
--[[Status Vars]]

	local _IsOn = _Tune.AutoStart
	if _Tune.AutoStart then script.Parent.IsOn.Value=true end
	
	local _GSteerT=0
	local _GSteerC=0
	local _GThrot=0
	local _GBrake=0
	
	local _ClutchOn = true
	local _ClPressing = false
	local _RPM = 0
	local _HP = 0
	local _OutTorque = 0
	local _CGear = 0
	local _PGear = _CGear
	local _spLimit = 0
	
	local _TMode = _Tune.TransModes[1]
	
	local _MSteer = false
	local _SteerL = false
	local _SteerR = false
	local _PBrake = false
	local _TCS = _Tune.TCSEnabled
	local _TCSActive = false
	local _ABS = _Tune.ABSEnabled
	local _ABSActive = false
	
	local FlipWait=tick()
	local FlipDB=false
	
	local _InControls = false
	
	
	
	script.Parent.DriveMode.Changed:Connect(function()
		if script.Parent.DriveMode.Value == "SportPlus" then
		   if _Tune.TCSEnabled and _IsOn then
					_TCS = false
		   end
		else
		   if _Tune.TCSEnabled and _IsOn then
					_TCS = true
		   end			
		end
	end)
-- RCM Settings V

self.WeaponWeight		= 4 -- Weapon weight must be enabled in the Config module

self.ShellEjectionMod	= true

self.Holster			= true
self.HolsterPoint		= "Torso"
self.HolsterCFrame		= CFrame.new(0.8,0.5,0.9) * CFrame.Angles(math.rad(-90),math.rad(2),math.rad(10))

self.FlashChance = 5 -- 0 = no muzzle flash, 10 = Always muzzle flash

self.ADSEnabled 		= { -- Ignore this setting if not using an ADS Mesh
	true, -- Enabled for primary sight
	false} -- Enabled for secondary sight (T)

self.ExplosiveAmmo		= false -- Enables explosive ammo
self.ExplosionRadius	= 70 -- Radius of explosion damage in studs
self.ExplosionType		= "Default" -- Which explosion effect is used from the HITFX Explosion folder
self.IsLauncher			= true -- For RPG style rocket launchers

self.EjectionOverride	= nil -- Don't touch unless you know what you're doing with Vector3s

return self
--[[ Local Functions ]]--
local function onShiftLockToggled(Value, Lock) -- NEW: everything here
	
	-- Process if not prevented, or prevention being disabled
	if PreventShiftLock == false or Lock == false then		
		
		-- Change
		IsShiftLocked = Value ~= nil and Value or not IsShiftLocked
		
		-- Begin prevention
		if Lock ~= nil then
			PreventShiftLock = Lock
			if Lock == false and Value == false then -- When unlocked set to prior state before lock
				IsShiftLocked = ShiftLockedBefore
			end
		else
			ShiftLockedBefore = IsShiftLocked -- Remember for when unlocking
		end
		
		-- Update mouse cursor
		if IsShiftLocked then
			ShiftLockIcon.Image = SHIFT_LOCK_ON
			Mouse.Icon = SHIFT_LOCK_CURSOR
		else
			ShiftLockIcon.Image = SHIFT_LOCK_OFF
			Mouse.Icon = ""
		end
		
		-- Fire!
		ShiftLockController.OnShiftLockToggled:Fire()
	end
end

local function initialize()
	if ScreenGui then
		ScreenGui:Destroy()
		ScreenGui = nil
	end
	ScreenGui = Instance.new('ScreenGui')
	ScreenGui.Name = "ControlGui"
	
	local frame = Instance.new('Frame')
	frame.Name = "BottomLeftControl"
	frame.Size = UDim2.new(0, 130, 0, 46)
	frame.Position = UDim2.new(0, 0, 1, -46)
	frame.BackgroundTransparency = 1
	frame.Parent = ScreenGui
	
	ShiftLockIcon = Instance.new('ImageButton')
	ShiftLockIcon.Name = "MouseLockLabel"
	ShiftLockIcon.Size = UDim2.new(0, 31, 0, 31)
	ShiftLockIcon.Position = UDim2.new(0, 12, 0, 2)
	ShiftLockIcon.BackgroundTransparency = 1
	ShiftLockIcon.Image = IsShiftLocked and SHIFT_LOCK_ON or SHIFT_LOCK_OFF
	ShiftLockIcon.Visible = true
	ShiftLockIcon.Parent = frame
	
	ShiftLockIcon.MouseButton1Click:connect(onShiftLockToggled)
	
	ScreenGui.Parent = IsShiftLockMode and PlayerGui or nil
end
--[[
	Create a new test result node and push it onto the navigation stack.
]]
function TestSession:pushNode(planNode)
	local node = TestResults.createNode(planNode)
	local lastNode = self.nodeStack[#self.nodeStack] or self.results
	local lastContext = self.contextStack[#self.contextStack]
	local context = Context.new(lastContext)

	table.insert(lastNode.children, node)
	table.insert(self.nodeStack, node)
	table.insert(self.contextStack, context)
end
--use this to determine if you want this human to be harmed or not, returns boolean

function boom()
	wait(1)
	Used = true
	Object.Anchored = false
	--Object.Orientation = Vector3.new(0,0,0)
	Object.Transparency = 1
	Explode()
end

boom()
-- 100 == 1  0 == 0  1/0.5

function JamCalculation()
	local L_185_
	if (math.random(1, 100) <= L_24_.JamChance) then	
		L_185_ = true
		L_75_ = true
	else
		L_185_ = false
	end
	return L_185_
end

function TracerCalculation()
	local L_186_
	if (math.random(1, 100) <= L_24_.TracerChance) then	
		L_186_ = true
	else
		L_186_ = false
	end
	return L_186_
end

function ScreamCalculation()
	local L_187_
	if (math.random(1, 100) <= L_24_.SuppressCalloutChance) then	
		L_187_ = true
	else
		L_187_ = false
	end
	return L_187_
end

function SearchResupply(L_188_arg1)
	local L_189_ = false
	local L_190_ = nil
	
	if L_188_arg1:FindFirstChild('ResupplyVal') or L_188_arg1.Parent:FindFirstChild('ResupplyVal') then
		L_189_ = true
		if L_188_arg1:FindFirstChild('ResupplyVal') then
			L_190_ = L_188_arg1.ResupplyVal
		elseif L_188_arg1.Parent:FindFirstChild('ResupplyVal') then
			L_190_ = L_188_arg1.Parent.ResupplyVal
		end
	end
	return L_189_, L_190_
end

function CheckReverb()
	local L_191_, L_192_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_6_.CFrame.p, (L_6_.CFrame.upVector).unit * 30), IgnoreList);
		
	if L_191_ then
		local L_193_ = L_59_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') or Instance.new("ReverbSoundEffect", L_59_:WaitForChild('Fire'))
	elseif not L_191_ then
		if L_59_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') then
			L_59_.Fire.ReverbSoundEffect:Destroy()
		end
	end
end

function UpdateAmmo()
	L_29_.Text = L_106_
	L_30_.Text = L_29_.Text
	
	L_31_.Text = '| ' .. math.ceil(L_107_ / L_24_.StoredAmmo)
	L_32_.Text = L_31_.Text
	
	if L_93_ == 0 then
		L_40_.Image = 'rbxassetid://' .. 1868007495
	elseif L_93_ == 1 then
		L_40_.Image = 'rbxassetid://' .. 1868007947
	elseif L_93_ == 2 then
		L_40_.Image = 'rbxassetid://' .. 1868008584
	end
	
	if L_92_ == 1 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0.7
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_92_ == 2 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0
	elseif L_92_ == 3 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_92_ == 4 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0.7
	elseif L_92_ == 5 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_92_ == 6 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0.7
	end
	
end
--[[
	Special value for assigning tags to roblox instances via Roact
]]
local Symbol = require(script.Parent.Parent["Symbol.roblox"])

local Tag = Symbol.named("RobloxTag")

return Tag
--[=[
	@param value any
	Sets the top-level value of all clients to the same value.
	
	:::note Override Per-Player Data
	This will override any per-player data that was set using
	`SetFor` or `SetFilter`. To avoid overriding this data,
	`SetTop` can be used instead.
	:::

	```lua
	-- Examples
	remoteProperty:Set(10)
	remoteProperty:Set({SomeData = 32})
	remoteProperty:Set("HelloWorld")
	```
]=]
function RemoteProperty:Set(value: any)
	self._value = value
	table.clear(self._perPlayer)
	self._rs:FireAll(value)
end
--------SETTINGS--------
local ITEM_NAME = "Shotgun"
local ITEM_PRICE = 10
local CURRENCY_NAME = "Cash"
--[=[
	Counts the number of items in `_table`.
	Useful since `__len` on table in Lua 5.2 returns just the array length.

	@param _table table -- Table to count
	@return number -- count
]=]
function Table.count(_table)
	local count = 0
	for _, _ in pairs(_table) do
		count = count + 1
	end
	return count
end
--// H key, Horn
mouse.KeyDown:connect(function(key)
	if key=="h" then 
		script.Parent.Parent.Horn.TextTransparency = 0
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		veh.Lightbar.middle.Hilo.Volume = 0
		veh.Lightbar.middle.Rwail.Volume = 0
script.Parent.Parent.MBOV.Visible = true
			script.Parent.Parent.MBOV.Text = "Made by OfficerVargas"
	end
end)
-- This script causes the character to die whenever it is sitting.
-- 
-- So it is a really bad seat allergy.
-- 
-- ForbiddenJ

Humanoid = script.Parent:WaitForChild("Humanoid")
-- Testing AC FE support

local event = script.Parent
local car=script.Parent.Parent


event.OnServerEvent:connect(function(player,data)
	if data['ToggleLight'] then
		if car.Body.Light.on.Value==true then
			car.Body.Light.on.Value=false
		else
			car.Body.Light.on.Value=true
		end
	elseif data['ToggleFog'] then
		if car.Body.Fog.on.Value==false then
			car.Body.Fog.on.Value=true
		else
			car.Body.Fog.on.Value=false
		end
	elseif data['ReverseOn'] then
		car.Body.Reverse.on.Value=true
	elseif data['ReverseOff'] then
		car.Body.Reverse.on.Value=false
	elseif data['EnableBrakes'] then
		car.Body.Brakes.on.Value=true
	elseif data['DisableBrakes'] then
		car.Body.Brakes.on.Value=false
	elseif data['ToggleLeftBlink'] then
		if car.Body.Left.on.Value==true then
			car.Body.Left.on.Value=false
		else
			car.Body.Left.on.Value=true
		end
	elseif data['ToggleRightBlink'] then
		if car.Body.Right.on.Value==true then
			car.Body.Right.on.Value=false
		else
			car.Body.Right.on.Value=true
		end
	elseif data['ToggleHazard'] then
		if car.Body.Hazards.on.Value==true then
			car.Body.Hazards.on.Value=false
		else
			car.Body.Hazards.on.Value=true
		end
	end
end)
-----------------
--| Functions |--
-----------------

local function MakeReloadRocket()
	local reloadRocket = Instance.new('Part')
	reloadRocket.Name = "Ammo"
	reloadRocket.Transparency = 1
	reloadRocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size
	reloadRocket.Size = Vector3.new() -- As small as possible

	local mesh = Instance.new('SpecialMesh', reloadRocket)
	mesh.MeshId = ROCKET_MESH_ID
	mesh.Scale = ROCKET_MESH_SCALE
	mesh.TextureId = ToolHandle.Mesh.TextureId

	return reloadRocket
end

local function OnEquipped()
	MyModel = Tool.Parent
	ReloadRocket = MakeReloadRocket()
end

local function OnChanged(property)
	if property == 'Enabled' and Tool.Enabled == false then
		-- Show the next rocket going into the launcher
		StillEquipped = true
		wait(ROCKET_SHOW_TIME)
		if StillEquipped then
			local leftArm = MyModel:FindFirstChild('Left Arm')
			if leftArm then
				local weld = ReloadRocket:FindFirstChild('Weld')
				if not weld then
					weld = Instance.new('Weld')
					weld.Part0 = leftArm
					weld.Part1 = ReloadRocket
					weld.C1 = CFrame.new(Vector3.new(0, 1, 0))
					weld.Parent = ReloadRocket
				end
				ReloadRocket.Parent = MyModel
			end
			wait(ROCKET_HIDE_TIME - ROCKET_SHOW_TIME)
			if StillEquipped and ReloadRocket.Parent == MyModel then
				ReloadRocket.Parent = nil
			end
		end
	end
end

local function OnUnequipped()
	StillEquipped = false
	ReloadRocket:Destroy()
	ReloadRocket = nil
end
-- Function to save player data on exit
function PlayerStatManager:saveOnExit(player)
	local success,err = pcall(function()
		local playersMoney = serverStorage.PlayerMoney:FindFirstChild(player.Name)
		if playersMoney ~= nil then
			--print("--------------playersMoney.Value = "..playersMoney.Value)
			PlayerStatManager:saveStat(player, "Money", playersMoney.Value)
		else
			print("playersMoney is nil")
		end
		local playerUserId = "Player_" .. player.UserId
		savePlayerData(playerUserId)
	end)
	if success == false then
		warn("ERROR---------PlayerStatManager:saveOnExit----------->")
		print(err)
	end
end
 
function PlayerStatManager:setAllTycoonPurchasesToNil(player)
	local playerUserId = "Player_" .. player.UserId
	local data = sessionData[playerUserId]["TycoonPurchases"]
	for key,value in pairs(data) do
		sessionData[playerUserId]["TycoonPurchases"][key] = nil 
	end
end
--[[Drivetrain]]	
	Tune.Config			= "FWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 80		-- 1 - 100%
	Tune.RDiffLockThres	= 20		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
--Collision
character.Head.CollisionGroupId = 1
character.UpperTorso.CollisionGroupId = 1
character.LowerTorso.CollisionGroupId = 1
character.HumanoidRootPart.CanCollide = false
character.HumanoidRootPart.CollisionGroupId = 5
character.RightUpperArm.CollisionGroupId = 1
character.LeftUpperArm.CollisionGroupId = 1
character.RightUpperLeg.CollisionGroupId = 1
character.LeftUpperLeg.CollisionGroupId = 1
character.RightLowerArm.CollisionGroupId = 0
character.LeftLowerArm.CollisionGroupId = 0
character.RightLowerLeg.CollisionGroupId = 0
character.LeftLowerLeg.CollisionGroupId = 0
character.RightHand.CollisionGroupId = 1
character.LeftHand.CollisionGroupId = 1
character.RightFoot.CollisionGroupId = 1
character.LeftFoot.CollisionGroupId = 1




	end
end