Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- 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)
-- 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)
--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
-- 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
--[[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
	}
}
-- 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
--[[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]
--[[Engine]]

--
	
	-- Everything below can be illustrated and tuned with the graph below.
	-- https://www.desmos.com/calculator/x1h2vdccu1
	-- This includes everything, from the engines, to boost, to electric.
	
	-- Naturally Aspirated Engine
	Tune.Engine 		= true		
		
		Tune.IdleRPM		= 1000
		Tune.Redline		= 12000
		Tune.PeakRPM		= 9000
		-- Horsepower
		Tune.Horsepower		= 89
		Tune.MH_PeakRPM		= Tune.PeakRPM
		Tune.MH_PeakSharp	= 2
		Tune.MH_CurveMult	= 0.02
		-- Torque
		Tune.M_EqPoint		= 9500
		Tune.MT_PeakRPM		= 11000
		Tune.MT_PeakSharp	= 2
		Tune.MT_CurveMult	= 0.02
	
	-- Electric Engine
	Tune.Electric		= false
		
		Tune.E_Redline	= 10000
		Tune.E_Trans1	= 4000
		Tune.E_Trans2	= 9000
		-- Horsepower
		Tune.E_Horsepower	= 223
		Tune.EH_FrontMult	= 0.15
		Tune.EH_EndMult		= 2.9
		Tune.EH_EndPercent	= 7
		-- Torque
		Tune.E_Torque		= 180
		Tune.ET_EndMult		= 1.505
		Tune.ET_EndPercent	= 27.5
		
	-- Turbocharger
	Tune.Turbochargers	= 0				-- Number of turbochargers in the engine
										-- Set to 0 for no turbochargers
		Tune.T_Boost		= 7
		Tune.T_Efficiency	= 6
		--Horsepower
		Tune.TH_PeakSharp	= 2
		Tune.TH_CurveMult	= 0.02
		--Torque
		Tune.TT_PeakSharp	= 2
		Tune.TT_CurveMult	= 0.02
		
		Tune.T_Size			= 80		-- Turbo Size; Bigger size = more turbo lag
		
	-- Supercharger
	Tune.Superchargers	= 0				-- Number of superchargers in the engine
										-- Set to 0 for no superchargers
		Tune.S_Boost		= 5
		Tune.S_Efficiency	= 6
		--Horsepower
		Tune.SH_PeakSharp	= 2
		Tune.SH_CurveMult	= 0.02
		--Torque
		Tune.ST_PeakSharp	= 2
		Tune.ST_CurveMult	= 0.02
		
		Tune.S_Sensitivity	= 0.05		-- Supercharger responsiveness/sensitivity, applied per tick (recommended values between 0.05 to 0.1)
	
	--Misc
	Tune.RevAccel		= 250		-- 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.Flywheel		= 500		-- Flywheel weight (higher = faster response, lower = more stable RPM)
	
	--Aero
	Tune.Drag			= 0.5		-- 0 to 1, edit to change drag effect (0 = no effect, 1 = full effect)
--// All global vars will be wiped/replaced except script



return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer
	local gui = script.Parent.Parent
	local Frame = gui.Frame
	local Close = gui.Frame.Close
	local Reply = gui.Frame.Reply
	local ReplyBox = gui.Frame.Frame.ReplyBox
	local Message = gui.Frame.Frame.Message
	local Title = gui.Frame.Title
	
	local player = data.Player
	local message = data.Message
	local title = data.Title
	
	local replying = false
	
	local function send()
		if ReplyBox.Text~='Enter text then hit enter or "reply"' and #ReplyBox.Text>0 then 
			gui:Destroy()
			client.Remote.Send('PrivateMessage','Reply from '..localplayer.Name,player,localplayer,service.Filter(ReplyBox.Text,localplayer,player))
			client.UI.Make("Hint", {Message = "Reply sent"})
		else
			ReplyBox.Text='Enter text then hit enter or "reply"'
		end
	end
	
	Frame.Visible = false
	
	ReplyBox.Visible = true
	Reply.Visible = true
	
	Message.Text = message
	Title.Text = title
	
	ReplyBox.FocusLost:connect(function(enterPressed)
		if enterPressed then
			send()
		end
	end)
	
	Close.MouseButton1Click:connect(function() 
		gui:Destroy() 
	end)
	
	Reply.MouseButton1Click:connect(function()
		if not replying then
			replying = true
			Frame:TweenSize(UDim2.new(0,300,0,280),nil,nil,0.5)
			ReplyBox:CaptureFocus()
		else
			send()
		end
	end)
	
	client.UI.Make("Notification",{
		Title = "New Message";
		Message = "New Message from "..player.Name..". Click to here to view.";
		Time = false;
		OnClick = function() gTable:Ready() Frame.Visible = true end;
		OnClose = function() gTable:Destroy() end;
		OnIgnore = function() gTable:Destroy() end;
	})
end
-- Connect input events to update walk speed


UserInputService.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift or input.KeyCode == Enum.KeyCode.ButtonL2 then
		updateWalkSpeed()
	end
end)

UserInputService.InputEnded:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift or input.KeyCode == Enum.KeyCode.ButtonL2 then
		updateWalkSpeed()
	end
end)
-- Returns module (possibly nil) and success code to differentiate returning nil due to error vs Scriptable


function ControlModule:SelectComputerMovementModule()
	if not (UserInputService.KeyboardEnabled or UserInputService.GamepadEnabled) then
		return nil, false
	end

	local computerModule
	local DevMovementMode = Players.LocalPlayer.DevComputerMovementMode

	if DevMovementMode == Enum.DevComputerMovementMode.UserChoice then
		computerModule = computerInputTypeToModuleMap[lastInputType]
		if UserGameSettings.ComputerMovementMode == Enum.ComputerMovementMode.ClickToMove and computerModule == Keyboard then
			-- User has ClickToMove set in Settings, prefer ClickToMove controller for keyboard and mouse lastInputTypes
			computerModule = ClickToMove
		end
	else
		-- Developer has selected a mode that must be used.
		computerModule = movementEnumToModuleMap[DevMovementMode]

		-- computerModule is expected to be nil here only when developer has selected Scriptable
		if (not computerModule) and DevMovementMode ~= Enum.DevComputerMovementMode.Scriptable then
			warn("No character control module is associated with DevComputerMovementMode ", DevMovementMode)
		end
	end

	if computerModule then
		return computerModule, true
	elseif DevMovementMode == Enum.DevComputerMovementMode.Scriptable then
		-- Special case where nil is returned and we actually want to set self.activeController to nil for Scriptable
		return nil, true
	else
		-- This case is for when computerModule is nil because of an error and no suitable control module could
		-- be found.
		return nil, false
	end
end