Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[Susupension]]


	Tune.SusEnabled		= true	-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 400		-- Spring Dampening
	Tune.FSusStiffness	= 17000		-- Spring Force
	Tune.FSusLength		= .8		-- Resting Suspension length (in studs)
	Tune.FSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .05		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 75		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 6			-- Wishbone Length
	Tune.FWsBoneAngle	= 3			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 400		-- Spring Dampening
	Tune.RSusStiffness	= 17000		-- Spring Force
	Tune.RSusLength		= .8		-- Resting Suspension length (in studs)
	Tune.RSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .05		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
	
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Really red"		-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 8				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--


end
else
print("sh")
end
else
print("arms")
end
end
function Key(key)
if key then
key = string.lower(key)
if (key=="x") then
if on == 1 then
on = 0
elseif on == 0 then
on = 1
end
Crouch(on)
end
end
end
function Equip(mouse)
mouse.KeyDown:connect(Key)
end
script.Parent.Equipped:connect(Equip)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


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

script:WaitForChild("Rev")
script:WaitForChild("Supercharger")

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.Rev:Play()
	car.DriveSeat.Supercharger:Play()
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
		car.DriveSeat.Supercharger.Pitch = (car.DriveSeat.Supercharger.SetPitch.Value + car.DriveSeat.Supercharger.SetRev.Value*_RPM/_Tune.Redline)*on^2
	end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
	handler:FireServer("playSound","Rev")
	local pitch=0
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Supercharger.SetPitch.Value + script.Supercharger.SetRev.Value*_RPM/_Tune.Redline)*on^2
		pitch = (script.Supercharger.SetPitch.Value + script.Supercharger.SetRev.Value*_RPM/_Tune.Redline)*on^2
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,pitch,script.Rev.Volume)
	end
end
--[[
	
	CameraShaker.CameraShakeInstance
	
	cameraShaker = CameraShaker.new(renderPriority, callbackFunction)
	
	CameraShaker:Start()
	CameraShaker:Stop()
	CameraShaker:StopSustained([fadeOutTime])
	CameraShaker:Shake(shakeInstance)
	CameraShaker:ShakeSustain(shakeInstance)
	CameraShaker:ShakeOnce(magnitude, roughness [, fadeInTime, fadeOutTime, posInfluence, rotInfluence])
	CameraShaker:StartShake(magnitude, roughness [, fadeInTime, posInfluence, rotInfluence])
	
	
	
	EXAMPLE:
	
		local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCFrame)
			camera.CFrame = playerCFrame * shakeCFrame
		end)
		
		camShake:Start()
		
		-- Explosion shake:
		camShake:Shake(CameraShaker.Presets.Explosion)
		
		wait(1)
		
		-- Custom shake:
		camShake:ShakeOnce(3, 1, 0.2, 1.5)

		-- Sustained shake:
		camShake:ShakeSustain(CameraShaker.Presets.Earthquake)

		-- Stop all sustained shakes:
		camShake:StopSustained(1) -- Argument is the fadeout time (defaults to the same as fadein time if not supplied)

		-- Stop only one sustained shake:
		shakeInstance = camShake:ShakeSustain(CameraShaker.Presets.Earthquake)
		wait(2)
		shakeInstance:StartFadeOut(1) -- Argument is the fadeout time
	
	
	NOTE:
	
		This was based entirely on the EZ Camera Shake asset for Unity3D. I was given written
		permission by the developer, Road Turtle Games, to port this to Roblox.
		
		Original asset link: https://assetstore.unity.com/packages/tools/camera/ez-camera-shake-33148

		GitHub repository: https://github.com/Sleitnick/RbxCameraShaker
	
	
--]]





local CameraShaker = {}
CameraShaker.__index = CameraShaker

local profileBegin = debug.profilebegin
local profileEnd = debug.profileend
local profileTag = "CameraShakerUpdate"

local V3 = Vector3.new
local CF = CFrame.new
local ANG = CFrame.Angles
local RAD = math.rad
local v3Zero = V3()

local CameraShakeInstance = require(script.CameraShakeInstance)
local CameraShakeState = CameraShakeInstance.CameraShakeState

local defaultPosInfluence = V3(0.15, 0.15, 0.15)
local defaultRotInfluence = V3(1, 1, 1)


CameraShaker.CameraShakeInstance = CameraShakeInstance
---Camera


game:GetService("RunService").RenderStepped:connect(function()
	if _MSteer then
		cam.CameraType = "Follow"
		local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500)
		local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-(car.DriveSeat.CFrame.lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed)
		cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position)
	elseif cam.CameraType ~= "Follow" then
		cam.CameraType = "Follow"
	end
end)
-- Helper function to lazily instantiate a controller if it does not yet exist,
-- disable the active controller if it is different from the on being switched to,
-- and then enable the requested controller. The argument to this function must be
-- a reference to one of the control modules, i.e. Keyboard, Gamepad, etc.


function ControlModule:SwitchToController(controlModule)
	if not controlModule then
		if self.activeController then
			self.activeController:Enable(false)
		end
		self.activeController = nil
		self.activeControlModule = nil
	else
		if not self.controllers[controlModule] then
			self.controllers[controlModule] = controlModule.new(CONTROL_ACTION_PRIORITY)
		end

		if self.activeController ~= self.controllers[controlModule] then
			if self.activeController then
				self.activeController:Enable(false)
			end
			self.activeController = self.controllers[controlModule]
			self.activeControlModule = controlModule -- Only used to check if controller switch is necessary

			if self.touchControlFrame and (self.activeControlModule == ClickToMove
						or self.activeControlModule == TouchThumbstick
						or self.activeControlModule == DynamicThumbstick) then
				if not self.controllers[TouchJump] then
					self.controllers[TouchJump] = TouchJump.new()
				end
				self.touchJumpController = self.controllers[TouchJump]
				self.touchJumpController:Enable(true, self.touchControlFrame)
			else
				if self.touchJumpController then
					self.touchJumpController:Enable(false)
				end
			end

			self:EnableActiveControlModule()
		end
	end
end

function ControlModule:OnLastInputTypeChanged(newLastInputType)
	if lastInputType == newLastInputType then
		warn("LastInputType Change listener called with current type.")
	end
	lastInputType = newLastInputType

	if lastInputType == Enum.UserInputType.Touch then
		-- TODO: Check if touch module already active
		local touchModule, success = self:SelectTouchModule()
		if success then
			while not self.touchControlFrame do
				wait()
			end
			self:SwitchToController(touchModule)
		end
	elseif computerInputTypeToModuleMap[lastInputType] ~= nil then
		local computerModule = self:SelectComputerMovementModule()
		if computerModule then
			self:SwitchToController(computerModule)
		end
	end
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]



script.Parent:WaitForChild("RPM")

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

script.Parent.Parent.Adornee=car.Body.DGauges.RPM
script.Parent.Parent.CanvasSize=Vector2.new(660,330)

local _Tune = require(car["A-Chassis Tune"])
local Values = script.Parent.Parent.Parent.Values
local IsOn = script.Parent.Parent.Parent.IsOn

local _lRPM = _Tune.Redline
local revEnd = math.ceil(_lRPM/1000)

Values.RPM.Changed:connect(function()
	local r = math.min(1,Values.RPM.Value / (revEnd*1000))
	local rev = -3+(r*4)
	script.Parent.RPM.BackgroundColor3 = Color3.fromRGB(255*rev,0,0)
end)
-- weaponTemplate : inherits weaponBase
-- Description : This template is used to easily create new weapons.



setmetatable(weaponTemplate, weaponBase)

function weaponTemplate.new(weaponModel, projectileModel, isAutomatic, fireRate)
	local newWeapon = weaponBase.new(weaponModel, projectileModel, isAutomatic, fireRate)
	setmetatable(newWeapon, weaponTemplate)
	--spawn(function() newZone:_CaptureRuntime() end)
	
	return newWeapon
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 700		--	[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)
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 100		-- Spring Dampening
	Tune.FSusStiffness	= 5000		-- Spring Force
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FSusMaxExt		= .5		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 100		-- Spring Dampening
	Tune.RSusStiffness	= 5000		-- Spring Force
	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RSusMaxExt		= .5		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Really black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[Brakes]]


	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 1800		-- Front brake force
	Tune.RBrakeForce	= 2000		-- 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]
--// JAFTERGAMERTV \\--



script.Parent.MouseButton1Click:connect(function() -- The function of when the Players Clicks.
	if script.Parent.Parent.Box1.Visible == false then -- This tells wither it is open or not.
		script.Parent.Text = "  " -- Tells us that it is open.
		script.Parent.Parent.Box1.Visible = true -- Makes the box visible.
	else -- Otherwise
		script.Parent.Text = "Account" -- Tells us that it is closed.
		script.Parent.Parent.Box1.Visible = false -- Makes the box Invisible
	end -- Ends the If statement.
end) -- Ends the function in general.
---ex2---


script.Parent.Parent.ex2.exit1.SurfaceGui.TextLabel.TextTransparency = 1
script.Parent.Parent.ex2.exit2.SurfaceGui.TextLabel.TextTransparency = 1
script.Parent.Parent.ex2.exit3.SurfaceGui.TextLabel.TextTransparency = 1
script.Parent.Parent.ex2.exit4.SurfaceGui.TextLabel.TextTransparency = 1
script.Parent.Parent.ex2.exit5.SurfaceGui.TextLabel.TextTransparency = 1
script.Parent.Parent.ex2.exit6.SurfaceGui.TextLabel.TextTransparency = 1
--[[
	Creates a Symbol with the given name.

	When printed or coerced to a string, the symbol will turn into the string
	given as its name.
]]


function Symbol.named(name)
	assert(type(name) == "string", "Symbols must be created using a string name!")

	local self = newproxy(true)

	local wrappedName = string.format("Symbol(%s)", name)

	getmetatable(self).__tostring = function()
		return wrappedName
	end

	return self
end

return Symbol
-- Container for temporary connections (disconnected automatically)


local Connections = {};

function WeldTool.Equip()
	-- Enables the tool's equipped functionality

	-- Start up our interface
	ShowUI();
	EnableFocusHighlighting();

end;

function WeldTool.Unequip()
	-- Disables the tool's equipped functionality

	-- Clear unnecessary resources
	HideUI();
	ClearConnections();

end;

function ClearConnections()
	-- Clears out temporary connections

	for ConnectionKey, Connection in pairs(Connections) do
		Connection:Disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;

function ShowUI()
	-- Creates and reveals the UI

	-- Reveal UI if already created
	if UI then

		-- Reveal the UI
		UI.Visible = true;

		-- Skip UI creation
		return;

	end;

	-- Create the UI
	UI = Core.Tool.Interfaces.BTWeldToolGUI:Clone();
	UI.Parent = Core.UI;
	UI.Visible = true;

	-- Hook up the buttons
	UI.Interface.WeldButton.MouseButton1Click:Connect(CreateWelds);
	UI.Interface.BreakWeldsButton.MouseButton1Click:Connect(BreakWelds);

	-- Hook up manual triggering
	local SignatureButton = UI:WaitForChild('Title'):WaitForChild('Signature')
	ListenForManualWindowTrigger(WeldTool.ManualText, WeldTool.Color.Color, SignatureButton)

end;

function HideUI()
	-- Hides the tool UI

	-- Make sure there's a UI
	if not UI then
		return;
	end;

	-- Hide the UI
	UI.Visible = false;

end;
-- [ SETTINGS ] --



local statsName = "Diamonds" -- Your stats name
local maxItems = 15 -- Max number of items to be displayed on the leaderboard
local minValueDisplay = 1 -- Any numbers lower than this will be excluded
local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local abbreviateValue = false -- The displayed number gets abbreviated to make it "human readable"
local updateEvery = 60 -- (in seconds) How often the leaderboard has to update
local headingColor = Color3.fromRGB(24, 223, 254) -- The background color of the heading
--{HPattern, Automatic, DualClutch, CVT}


tri = script.Trigger

if script.Parent.Functions.ShiftUpRequested.Value == true then
	script.RPMManagement.Disabled = false
	FL.MotorMaxTorque = 0
	FR.MotorMaxTorque = 0
	RL.MotorMaxTorque = 0
	RR.MotorMaxTorque = 0
		
	if script.Parent.Storage.TransmissionType.Value == "HPattern" then
			
	end
	
	if script.Parent.Storage.TransmissionType.Value == "Automatic" then
		rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*xx1)*(tri.Value))
	end
	
	if script.Parent.Storage.TransmissionType.Value == "DualClutch" then
		rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*xx1)*(tri.Value)) 
	end
	
	if script.Parent.Storage.TransmissionType.Value == "CVT" then
		
	end
end

if carSeat.Storage.Handbrake.Value == true then
		FL.MotorMaxTorque = 0
		FR.MotorMaxTorque = 0
		end

if currentgear.Value == 1 then
	FL.MotorMaxTorque = (10000)*(carSeat.Storage.BrakeBias.Value/100)
		FR.MotorMaxTorque = (10000)*(carSeat.Storage.BrakeBias.Value/100)
		RL.MotorMaxTorque = (10000)*(1-(carSeat.Storage.BrakeBias.Value/100))
		RR.MotorMaxTorque = (10000)*(1-(carSeat.Storage.BrakeBias.Value/100))
		FL.AngularVelocity = 0
		FR.AngularVelocity = 0
		RL.AngularVelocity = 0
		RR.AngularVelocity = 0
		FL.MotorMaxAcceleration = 30
		FR.MotorMaxAcceleration = 30
		RL.MotorMaxAcceleration = 30
		RR.MotorMaxAcceleration = 30
end
if script.Parent.Functions.ShiftDownRequested.Value == true then
	script.RPMManagement.Disabled = false
	if script.Parent.Storage.Brake.Value ~= 1 and carSeat.Storage.Handbrake.Value ~= true then
	FL.MotorMaxTorque = 0
	FR.MotorMaxTorque = 0
	RL.MotorMaxTorque = 0
	RR.MotorMaxTorque = 0
	end
	if script.Parent.Storage.TransmissionType.Value == "HPattern" then
		
	end
	
	if script.Parent.Storage.TransmissionType.Value == "Automatic" then
		rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*x1x)*(tri.Value)) 
	end
	
	if script.Parent.Storage.TransmissionType.Value == "DualClutch" then
		rpm.Value = ((trans.Value*xxx)*(1-tri.Value)) + ((trans.Value*x1x)*(tri.Value)) 
	end
	
	if script.Parent.Storage.TransmissionType.Value == "CVT" then
		
	end
	
end

if speed < 2 then
	coast = 0
else
	coast = 5
end
m = (hp.Value / 2155)

if rpm.Value < 950/(four/2) then
	ch = 4
else
	ch = 1
end

if carSeat.Storage.Mode.Value == "City" then
	mode = 0.81
elseif carSeat.Storage.Mode.Value == "Sport" then
	mode = 0.98
elseif carSeat.Storage.Mode.Value == "Snow" then
	mode = 0.6
end


carSeat.Parent.Engine.Intake.Pitch = 1
-----------------
--| Constants |--
-----------------



local GRAVITY_ACCELERATION = workspace.Gravity

local RELOAD_TIME = 3.5 -- Seconds until tool can be used again
local ROCKET_SPEED = 800 -- Speed of the projectile

local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534'
local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25)
local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27)
--[[script.Parent.MouseButton1Click:connect(function()
	p = script.Parent.Parent.Parent.Parent.Parent
	script.Parent.Parent.Visible = false 
	if p.Order.Value == true then
		wait()
		ids = 21341246
game:GetService("MarketplaceService"):PromptProductPurchase(p, ids)
	print('passed.5')
	wait()
	script.Parent.Parent.Parent:Destroy()
		-- setup local variables
end
end)--]]




ID = game.Workspace.McDId.Value

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.Visible = false
	Service = game:GetService('MarketplaceService')
Player = script.Parent.Parent.Parent.Parent.Parent
local s,e = coroutine.resume(coroutine.create(function()
    if Player:findFirstChild("Backpack") then
     if Player:findFirstChild("Backpack") then
       Service.ProcessReceipt = (function(receiptInfo)
        for i,v in pairs(Player.Order:GetChildren()) do
			if v:IsA("BoolValue") then
			game.Lighting[v.Name]:clone().Parent = Player.Backpack
			end
				end
		Player.Order:ClearAllChildren()
		Player.Order.Value = false;
        Service.ProcessReceipt = nil;
		for a,b in pairs(Player.PlayerGui:GetChildren()) do
			if b.Name == "Incomplete" then
				b:Destroy()
			end
		end
       end)
       Service:PromptProductPurchase(Player,ID);
script.Parent.Parent.Parent.Name = "Incomplete"
     end
 end
end))
if not s then Instance.new("Hint",game.Workspace).Text = "Error: "..e end
end)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 425		--	[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)
--[[Transmission]]


	Tune.TransModes		= {"Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
-- (Hat Giver Script - Loaded.)



debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "GreenTopHat"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(0,-0.25,0) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0,-0.25,0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
--//////// DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU'RE DOING \\\\\\\\\\\\\\\\\\\\\\\\\





local uis = game:GetService("UserInputService")
local runservice = game:GetService("RunService")
local tweenservice = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local camera = workspace.CurrentCamera
local character = player.Character or player.CharacterAdded:Wait()
local rootpart = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
local torso
local roothip
local lowertorso
local oldc0
local leftshoulder
local rightshoulder
local larm
local rarm
local armparts = {}
local rigtype = nil

local isrunning = false
local armsvisible = true -- whether the arms are visible in first person
local armtransparency = firstperson_arm_transparency
local isfirstperson = false
local sway = Vector3.new(0,0,0)
local walksway = CFrame.new(0,0,0)
local strafesway = CFrame.Angles(0,0,0)
local jumpsway = CFrame.new(0,0,0)
local jumpswaygoal = Instance.new("CFrameValue")