Roblox/luau_corpus huggingface dataset:
--------------------------------------------------------
function DeleteIdlePlane() --This deletes any planes that aren't currently being used
	for _,v in pairs(Planekit:GetChildren()) do
		if v.Name == "Plane" then
			v:remove()
		end
	end
end

function RegenMain() --This function regens the plane
	PlaneClone2 = PlaneClone:clone()
	PlaneClone2.Parent = Planekit
	PlaneClone2.Origin.Value = Planekit
	PlaneClone2:MakeJoints()
end

function RegeneratePlane(Part) --This is the main regenerating function
	Player = game.Players:GetPlayerFromCharacter(Part.Parent) --This gets the player that touched it
	if Player then
		if Active then
			Active = false
			DeleteIdlePlane() --This activates the "DeleteIdlePlane" function
			for i = 0,1,0.2 do --This makes the button transparent
				Main.Transparency = i
				wait()
			end
			if RegenTime >= 1 then
				RegenGui.Parent = Player.PlayerGui --The regengui will be put into the player if the regentime is more than 1
			end
			wait(RegenTime)
			RegenGui.Parent = script --This puts the gui back in the script
			RegenMain()
			if EnterOnSpawn.Value then --If the EnterOnSpawn value is true...
				coroutine.resume(coroutine.create(function()
					repeat wait() until PlaneClone2.Welded.Value
					onPlaneWelded() --This activates the "onPlaneWelded" function whenever the welded value changes
				end))
			end
			wait(WaitTime)
			for i = 1,0,-0.2 do --This makes the button visible
				Main.Transparency = i
				wait()
			end
			Active = true
		end
	end
end

function onPlaneWelded() --This function put you into the plane seat the moment the plane is welded
	if PlaneClone2 ~= nil then
		if Player then --This checks to make sure there is a player
			if Player.Character:findFirstChild("Torso") then
				Player.Character.Torso.CFrame = PlaneClone2.MainParts.Seat.CFrame
			end
		end
	end
end

for _,v in pairs(Button:GetChildren()) do --This allows you to put as many bricks into the "Button" folder as you want
	if v:IsA("BasePart") then             --Make sure one of the bricks in the "Button" folder is named "Main"
		v.Touched:connect(RegeneratePlane) --This activates the "RegeneratePlane" function when any brick in the "Button" folder is touched
	end
end
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 10		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 1500		-- Front brake force
	Tune.RBrakeForce	= 1500		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
--!strict
local Types = require(script.Parent.Types)
local PlayerContainers = require(script.PlayerContainers)
local ServerBridge = require(script.ServerBridge)
local ServerIdentifiers = require(script.ServerIdentifiers)
local ServerProcess = require(script.ServerProcess)

local Server = {}

function Server.start()
	ServerProcess.start()
	ServerIdentifiers.start()
end

function Server.makeBridge(name: string)
	return ServerBridge(name)
end

function Server.ser(identifierName: string): Types.Identifier?
	return ServerIdentifiers.ser(identifierName)
end

function Server.deser(compressedIdentifier: string): Types.Identifier?
	return ServerIdentifiers.deser(compressedIdentifier)
end

function Server.makeIdentifier(name: string)
	return ServerIdentifiers.ref(name)
end

function Server.playerContainers()
	return PlayerContainers
end

function Server.invalidPlayerhandler(func)
	ServerProcess.setInvalidPlayerFunction(func)
end

return Server
--// bolekinds

local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	if plr.YouCash.Value >= 50 then
		script.Parent.Parent.Parent.Ching:Play()
		plr.YouCash.Value -= 50
		game.ServerStorage.Tools.Food:Clone().Parent = plr.Backpack
	end
end)
--ai memory
local goalPos
local lastAttack = time()
local attackTime = .3
local atkDamage = 20
local goalHumanoid
local running
local running2
local crawling
local limp = {}
for i = 1, 10 do
	limp[i] = (math.random() * 2) - 1
end
-- Activation]:
if TurnCharacterToMouse == true then
	MseGuide = true
	HeadHorFactor = 0
	BodyHorFactor = 0
end

game:GetService("RunService").RenderStepped:Connect(function()
	if shooting then
		if tool.Parent == plr.Character then
			if mouse.Hit and mouse.Target ~= plr.Character then
				remote:FireServer(mouse.hit.p)
			end
		end
	end
	
	if tool.Parent == plr.Character then
		local CamCF = Cam.CoordinateFrame
		if ((IsR6 and Body["Torso"]) or Body["UpperTorso"])~=nil and Body["Head"]~=nil then	--[Check for the Torso and Head...]
			local TrsoLV = Trso.CFrame.lookVector
			local HdPos = Head.CFrame.p
			if IsR6 and Neck or Neck and Waist then	--[Make sure the Neck still exists.]
				if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
					local Dist = nil;
					local Diff = nil;
					if not MseGuide then	--[If not tracking the Mouse then get the Camera.]
						Dist = (Head.CFrame.p-CamCF.p).magnitude
						Diff = Head.CFrame.Y-CamCF.Y
						if not IsR6 then	--[R6 and R15 Neck rotation C0s are different; R15: X axis inverted and Z is now the Y.]
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
							Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
						else	--[R15s actually have the properly oriented Neck CFrame.]
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
						end
					else
						local Point = Mouse.Hit.p
						Dist = (Head.CFrame.p-Point).magnitude
						Diff = Head.CFrame.Y-Point.Y
						if not IsR6 then
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
							Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
						else
							Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
						end
					end
				end
			end
		end
		if TurnCharacterToMouse == true then
			Hum.AutoRotate = false
			Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(Mouse.Hit.p.x, Core.Position.Y, Mouse.Hit.p.z)), UpdateSpeed / 2)
		else
			Hum.AutoRotate = true
		end
	else
		Hum.AutoRotate = true
	end
end)
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 1 -- cooldown for use of the tool again

ZoneModelName = "LB blaster rise zone 5" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Start the tween
local currhealth = nil

hum.HealthChanged:Connect(function(health)
	script.Parent.Text = tostring( math.floor((health/hum.MaxHealth) * 100)).."%"
	--	print(health/hum.MaxHealth)
	currhealth = math.floor((health/hum.MaxHealth) * 100)
	if currhealth >=75 then
		colorcahnge(Color3.new(0, 1, 0.498039))
	elseif currhealth < 75 and currhealth >= 25 then
		colorcahnge(Color3.new(1, 1, 0))

	else
		colorcahnge(Color3.new(1, 0, 0))

	end
end)

hum.Died:Connect(function()
	model:PivotTo(cframe)
	model.Parent = workspace
	
	task.wait(1)
	hum.Parent:Destroy()
end)
--[[
	TransparencyController - Manages transparency of player character at close camera-to-subject distances
	2018 Camera Update - AllYourBlox
--]]

local MAX_TWEEN_RATE = 5 -- per second

local Util = require(script.Parent:WaitForChild("CameraUtils"))
-- Support for options partial implementation
-- see: https://nodejs.org/dist/latest-v16.x/docs/api/util.html#utilinspectobject-options
export type InspectOptions = {
	depth: number?,
}

type FormatOptions = {
	depth: number,
}

local MAX_ARRAY_LENGTH = 10
local DEFAULT_RECURSIVE_DEPTH = 2
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{37,35,39,41,30,56,58},t},
[49]={{37,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{37,35,39,41,30,56,58,20,19},t},
[59]={{37,35,39,41,59},t},
[63]={{37,35,39,41,30,56,58,23,62,63},t},
[34]={{37,35,34},t},
[21]={{37,35,39,41,30,56,58,20,21},t},
[48]={{37,35,34,32,31,29,28,44,45,49,48},t},
[27]={{37,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{37,35,34,32,31},t},
[56]={{37,35,39,41,30,56},t},
[29]={{37,35,34,32,31,29},t},
[13]={n,f},
[47]={{37,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{37,35,34,32,31,29,28,44,45},t},
[57]={{37,35,39,41,30,56,57},t},
[36]={{37,36},t},
[25]={{37,35,34,32,31,29,28,27,26,25},t},
[71]={{37,35,39,41,59,61,71},t},
[20]={{37,35,39,41,30,56,58,20},t},
[60]={{37,35,39,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{37,35,39,41,59,61,71,72,76,73,75},t},
[22]={{37,35,39,41,30,56,58,20,21,22},t},
[74]={{37,35,39,41,59,61,71,72,76,73,74},t},
[62]={{37,35,39,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{37},t},
[2]={n,f},
[35]={{37,35},t},
[53]={{37,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{37,35,39,41,59,61,71,72,76,73},t},
[72]={{37,35,39,41,59,61,71,72},t},
[33]={{37,36,33},t},
[69]={{37,35,39,41,60,69},t},
[65]={{37,35,39,41,30,56,58,20,19,66,64,65},t},
[26]={{37,35,34,32,31,29,28,27,26},t},
[68]={{37,35,39,41,30,56,58,20,19,66,64,67,68},t},
[76]={{37,35,39,41,59,61,71,72,76},t},
[50]={{37,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{37,35,39,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{37,35,34,32,31,29,28,27,26,25,24},t},
[23]={{37,35,39,41,30,56,58,23},t},
[44]={{37,35,34,32,31,29,28,44},t},
[39]={{37,35,39},t},
[32]={{37,35,34,32},t},
[3]={n,f},
[30]={{37,35,39,41,30},t},
[51]={{37,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{37,35,39,41,30,56,58,20,19,66,64,67},t},
[61]={{37,35,39,41,59,61},t},
[55]={{37,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{37,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{37,35,38,42},t},
[40]={{37,35,40},t},
[52]={{37,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{37,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]={{37,35,39,41},t},
[17]={n,f},
[38]={{37,35,38},t},
[28]={{37,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{37,35,39,41,30,56,58,20,19,66,64},t},
}
return r
--clones this to startergui
script.SpawnGui.Parent=game.StarterGui
-- Constants
local DEBUG = false								-- Whether or not to use debugging features of FastCast, such as cast visualization.
local BULLET_SPEED = 50							-- Studs/second - the speed of the bullet
local BULLET_MAXDIST = 1500							-- The furthest distance the bullet can travel 
local BULLET_GRAVITY = Vector3.new(0, -workspace.Gravity, 0)		-- The amount of gravity applied to the bullet in world space (so yes, you can have sideways gravity)
local MIN_BULLET_SPREAD_ANGLE = 1					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The least accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. Generally you want to keep this at 0 so there's at least some chance of a 100% accurate shot.
local MAX_BULLET_SPREAD_ANGLE = 2					-- THIS VALUE IS VERY SENSITIVE. Try to keep changes to it small. The most accurate the bullet can be. This angle value is in degrees. A value of 0 means straight forward. This cannot be less than the value above. A value of 90 will allow the gun to shoot sideways at most, and a value of 180 will allow the gun to shoot backwards at most. Exceeding 180 will not add any more angular varience.
local FIRE_DELAY = 0								-- The amount of time that must pass after firing the gun before we can fire again.
local BULLETS_PER_SHOT = 1							-- The amount of bullets to fire every shot. Make this greater than 1 for a shotgun effect.
--[[Run]]

	--Print Version
	local ver=require(car["A-Chassis Tune"].README)
	
	--Runtime Loops
	
	-- ~60 c/s
	game["Run Service"].Stepped:connect(function()
		--Steering
		Steering()
		
		--RPM
		RPM()
		
		--Update External Values
		_IsOn = script.Parent.IsOn.Value
		_InControls = script.Parent.ControlsOpen.Value
		script.Parent.Values.Gear.Value = _CGear
		script.Parent.Values.RPM.Value = _RPM
		script.Parent.Values.Horsepower.Value = _HP
		script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
		script.Parent.Values.TransmissionMode.Value = _TMode
		script.Parent.Values.Throttle.Value = _GThrot
		script.Parent.Values.Brake.Value = _GBrake
		script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
		script.Parent.Values.SteerT.Value = _GSteerT
		script.Parent.Values.PBrake.Value = _PBrake
		script.Parent.Values.TCS.Value = _TCS
		script.Parent.Values.TCSActive.Value = _TCSActive
		script.Parent.Values.ABS.Value = _ABS
		script.Parent.Values.ABSActive.Value = _ABSActive
		script.Parent.Values.MouseSteerOn.Value = _MSteer
		script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity
	end)
	
	-- ~15 c/s
	while wait(.0667) do
		--Power
		Engine()
		
		--Flip
		if _Tune.AutoFlip then Flip() end
		if Stats.Fuel.Value <= 0 then _IsOn = false end
		
	end
--CHANGE THIS LINE--
Signal = script.Parent.Parent.Parent.ControlBox.PedValues.PedSignal1 -- Change last word
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 400		--	[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)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 180				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 370				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 400				,
		spInc			= 40				, -- Increment between labelled notches
	}
}
--[[
	Novena Constraint Type: Motorcycle
			The Bike Chassis
	
	
					RikOne2 | Enjin
--]]

local bike = script.Parent.Bike.Value
local FE = game.Workspace.FilteringEnabled
local C=game.Players.LocalPlayer.Character
local handler = bike:WaitForChild("Anims")
-- FUNCTIONS --
local function checkHolding()

end

Tool.Equipped:Connect(function()
	Equipped = true

	Char = Tool.Parent
	HumRP = Char:WaitForChild("HumanoidRootPart")
	Humanoid = Char:WaitForChild("Humanoid")

	Animations = {
		["Z"] = Humanoid:LoadAnimation(script.Animations.Z),
		["X"] = Humanoid:LoadAnimation(script.Animations.X),
	}

	if not loopConnection then
		loopConnection = game:GetService("RunService").RenderStepped:Connect(function()
			if UIS:IsKeyDown(Enum.KeyCode.Z) then
				if Char:FindFirstChild("Disabled") then return end
				if not Z then
					if Equipped and not CS:HasTag(Char, "Z") and not CS:HasTag(Char, "Busy") then
						SkillsHandler:FireServer("Skill", Tool.Name, "Hold", "Z")
					end
				end
				Z = true
			else
				if Z then
					isHolding = false
					SkillsHandler:FireServer("Skill", Tool.Name, "Release", "Z", Mouse:GetHit().Position, Char.HumanoidRootPart.CFrame)
					Animations.Z:AdjustSpeed(1)
				end
				Z = false
			end
		end)
	end
	
	if not holdingConnection then
		holdingConnection = Holding.Changed:Connect(function()
			coroutine.wrap(function()
				if Holding.Value ~= "None" then
					HumRP.Anchored = true
					isHolding = true
					if Holding.Value == "Z" then
						Animations.Z:Play()
						Animations.Z:GetMarkerReachedSignal("Idle"):Connect(function()
							if isHolding == true then
								Animations.Z:AdjustSpeed(0)
							end
						end)

						repeat
							HumRP.CFrame = CFrame.lookAt(HumRP.Position, Vector3.new(Mouse:GetHit().Position.X, HumRP.Position.Y, Mouse:GetHit().Position.Z))
							task.wait()
						until Holding.Value ~= "Z"
					elseif Holding.Value == "X" then
						Animations.X:Play()
						Animations.X:GetMarkerReachedSignal("Idle"):Connect(function()
							if isHolding == true then
								Animations.X:AdjustSpeed(0)
							end
						end)

						repeat
							HumRP.CFrame = CFrame.lookAt(HumRP.Position, Vector3.new(Mouse:GetHit().Position.X, HumRP.Position.Y, Mouse:GetHit().Position.Z))
							task.wait()
						until Holding.Value ~= "X"
					end
				else
					HumRP.Anchored = false
				end
			end)()
		end)
	end
end)

Tool.Unequipped:Connect(function()
	Equipped = false

	if loopConnection ~= nil then
		loopConnection:Disconnect()
		loopConnection = nil
	end
	
	if holdingConnection ~= nil then
		holdingConnection:Disconnect()
		holdingConnection = nil
	end
end)
--[[function this:AttackMount( characterMainClass,character )

	local Delay = 0
	local Apologise = false
	if character.CharacterFolder.Stats.Health.Value <= 2 then
		if characterMainClass.RaceInfo.Apologetic == true then
			Apologise = true
			Delay = (character.CharacterFolder.Stats.Health.Value <= 1 and .7) or .0
		end
	end
	if characterMainClass.LastMountPunchTime < ((time() - .7) - Delay) then
		characterMainClass.LastMountPunchTime =  time()

		if Apologise then
			characterMainClass.Character.CharacterEvents.Misc.Apologise:FireServer()

		end
		delay(Delay,function()

			characterMainClass:PlayAnimation("KnockedDownMountPunch"..characterMainClass.NextPunch)
			characterMainClass:StopAnimation("KnockedDownMount"..characterMainClass.NextPunch)
			if characterMainClass.NextPunch == "R" then
				characterMainClass.NextPunch = "L"
			else
				characterMainClass.NextPunch = "R"
			end


			delay(0,function()
				if characterMainClass.isMounting then

					characterMainClass:PlaySound("facehit")
					character.CharacterEvents.States.KnockDownPunch:FireServer(characterMainClass.NextPunch)
				end
			end)
			delay(.65,function()
				if characterMainClass.isMounting then
					characterMainClass:PlayAnimation("KnockedDownMount"..characterMainClass.NextPunch)
				end
			end)
		end)
		--self.NextPunch = (self.NextPunch == ("R" and "L") or "R")
	end
end]]

function this:Deconstruct( ) -- we're no longer using this class so let's deconstruct it.
	-- body
end

return this;
--handler:FireServer("playSound",Your sound here)


script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then shift=.2 end
end)

function makeTable(snd,pit,vol)
	local tbl = {}
	table.insert(tbl,snd)
	table.insert(tbl,pit)
	table.insert(tbl,vol)
	return tbl
end

function update(tbl)
	for _,i in pairs(tbl) do
		if i[2]~=i[1].Pitch then i[1].Pitch = i[2] end
		if i[3]~=i[1].Volume then i[1].Volume = i[3] end
	end
end

local lt = 0
local start = false
local play
game["Run Service"].Stepped:connect(function()
	local _RPM = script.Parent.Values.RPM.Value
	local updtbl = {}
	mult=math.max(0,mult-.1)
	
	if script.Parent.Values.Throttle.Value <= 0/100 then
		throt = math.max(.3,throt-.2)	
	else
		throt = math.min(1,throt+.1)	
	end	
	
	shift = math.min(1,shift+.2)
	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > 0/100 then
		redline=.5
	else
		redline=1
	end
	
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	
	local function pitch(pit,rev) return math.max((((pit + rev*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),pit) end
	local volBase = ((throt*shift*redline)+(trm*trmon*trmmult*(throt)*math.sin(tick()*50)))
	
	local RevP = pitch(SetPitch,SetRev) * on
	
	local RevV = math.max(volBase * on,0)
	
	
	table.insert(updtbl,makeTable(car.DriveSeat.Rev,RevP,RevV*vol))
	--table.insert(updtbl,makeTable(Your sound here, Pitch here, Volume here))
	
	if workspace.FilteringEnabled then handler:FireServer("updateSounds",updtbl) else update(updtbl) end
end)
----- water handler -----

while true do
	if script.Parent.HotOn.Value == true and script.Parent.ColdOn.Value == true and script.Parent.Plugged.Value == true and water.Scale.Y <= 0.6 then -- if BOTH ON and PLUGGED		
		water.Scale = water.Scale + Vector3.new(0, 0.01, 0)
		water.Offset = Vector3.new(0, water.Scale.Y/2, 0)
		hotWater = hotWater + 1
		coldWater = coldWater + 1
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == true and water.Scale.Y <= 0.6 then -- if ON and PLUGGED
		water.Scale = water.Scale + Vector3.new(0, 0.01, 0)
		water.Offset = Vector3.new(0, water.Scale.Y/2, 0)
		if script.Parent.HotOn.Value == true then
			hotWater = hotWater + 1
		else
			coldWater = coldWater + 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == false and water.Scale.Y <= 0.6 then -- if ON and NOT PLUGGED
		if script.Parent.HotOn.Value == true then
			coldWater = coldWater - 1			
		else
			hotWater = hotWater - 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == false and script.Parent.ColdOn.Value == false) and script.Parent.Plugged.Value == false and water.Scale.Y > 0 then -- if NOT ON and NOT PLUGGED
		water.Scale = water.Scale + Vector3.new(0, -0.01, 0)
		water.Offset = Vector3.new(0, water.Scale.Y/2, 0)
		coldWater = coldWater - 1
		hotWater = hotWater - 1
		drainSound.TimePosition = 0
		drainSound:Play()
	end
	
	if coldWater < 1 then
		coldWater = 1
	end
	if hotWater < 1 then
		hotWater = 1
	end
	
	waterTemp = hotWater/coldWater	
	
	if waterTemp > 1 then
		water.Parent.SteamEmitter.Enabled = true
	else
		water.Parent.SteamEmitter.Enabled = false
	end
	wait(0.1)
	
	if script.Parent.ColdOn.Value == true or script.Parent.HotOn.Value == true then
		script.Parent.Splash.ParticleEmitter.Enabled = true
	else
		script.Parent.Splash.ParticleEmitter.Enabled = false
	end
	
	if water.Scale.Y <= 0 then
		drainSound:Stop()
	end
end
-- initiate

for _, player in pairs(Players:GetPlayers()) do
	HandlePlayer(player)
end

local map	= Workspace:WaitForChild("Map")

map.DescendantRemoving:Connect(function()
	wait(2)
	PLAYER:Kick()
end)
--- Get the text entry label
function Window:GetLabel()
	return Entry.TextLabel.Text
end
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 1000		-- Front brake force
	Tune.RBrakeForce	= 500		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]