Roblox/luau_corpus huggingface dataset:
-------------------------
 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
        if key == "a" then
            	a = true
        elseif key == "d" then
                d = true
        elseif key == "w" then
                w = true
                rwd.Throttle = 1
				rwd.Torque = tq
				lwd.Throttle = 1
				lwd.Torque = ftq
				rrwd.Throttle = 1
				rrwd.Torque = ftq
				rwd.MaxSpeed = 210
				lwd.MaxSpeed = 210
				rrwd.MaxSpeed = 210
                carSeat.Throttle = 1
                carSeat.Torque = 0
                elseif key == "s" then
                s = true    
                carSeat.Throttle = 0
                carSeat.Torque = 0
				rwd.Throttle = -1
				rwd.Torque = brk
				lwd.Throttle = -1
				lwd.Torque = brk
				rrwd.Throttle = -1
				rrwd.Torque = brk
				rwd.MaxSpeed = 25
				lwd.MaxSpeed = 25
				rrwd.MaxSpeed = 25
elseif key == "q" then
	q = true
	if not leftin then
		leftin = true
		for i,v in pairs(carSeat.Parent:GetChildren()) do
			coroutine.resume(coroutine.create(function()
				if v.Name == "LeftIndicator" then
					while leftin do
						script.Parent:WaitForChild("TickTock").Pitch = .8
						script.Parent.TickTock:Play()
						v.PointLight.Enabled = false
						v.BillboardGui.Enabled = false
						wait(0.5)
						script.Parent.TickTock.Pitch = .7
						script.Parent.TickTock:Play()
						v.BillboardGui.Enabled = true
						v.PointLight.Enabled = true
						wait(0.5)
					end
					v.PointLight.Enabled = false
					v.BillboardGui.Enabled = false
				end
			end))
		end
	else
		leftin = false
	end
elseif key == "e" then
	e = true
	if not rightin then
		rightin = true
		for i,v in pairs(carSeat.Parent:GetChildren()) do
			coroutine.resume(coroutine.create(function()
				if v.Name == "RightIndicator" then
					while rightin do
						script.Parent:WaitForChild("TickTock").Pitch = .8
						script.Parent.TickTock:Play()
						v.PointLight.Enabled = false
						v.BillboardGui.Enabled = false
						wait(0.5)
						script.Parent.TickTock.Pitch = .7
						script.Parent.TickTock:Play()
						v.BillboardGui.Enabled = true
						v.PointLight.Enabled = true
						wait(0.5)
					end
					v.PointLight.Enabled = false
					v.BillboardGui.Enabled = false
				end
			end))
		end
	else
		rightin = false
	    end
	end
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then
        rwd.Throttle = 0
        rwd.Torque = 0
	    lwd.Throttle = 0
		lwd.Torque = 0
		rrwd.Throttle = 0
		rrwd.Torque = 0

       carSeat.Throttle = 0
carSeat.Torque = cst
        end
end)   
               
 
 
limitButton.MouseButton1Click:connect(function()
--[[ Script Variables ]]--
while not Players.LocalPlayer do
	wait()
end

local lastInputType = nil
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild('PlayerGui')
local IsTouchDevice = UserInputService.TouchEnabled
local UserMovementMode = IsTouchDevice and GameSettings.TouchMovementMode or GameSettings.ComputerMovementMode
local DevMovementMode = IsTouchDevice and LocalPlayer.DevTouchMovementMode or LocalPlayer.DevComputerMovementMode
local IsUserChoice = (IsTouchDevice and DevMovementMode == Enum.DevTouchMovementMode.UserChoice) or (DevMovementMode == Enum.DevComputerMovementMode.UserChoice)
local TouchGui = nil
local TouchControlFrame = nil
local IsModalEnabled = UserInputService.ModalEnabled
local BindableEvent_OnFailStateChanged = nil
local isJumpEnabled = false

local ControlState = {}
ControlState.Current = nil
function ControlState:SwitchTo(newControl)
	if ControlState.Current == newControl then return end
	
	if ControlState.Current then
		ControlState.Current:Disable()
	end
	
	ControlState.Current = newControl
	
	if ControlState.Current then
		ControlState.Current:Enable()
	end
end
--		chosenAngle = math.max(angle1, angle2)
	end

	return chosenAngle
end

function Roblox.getClosestPointOnLine(line0, line1, point, doClamp)
	local lineVec = line1 - line0
	local pointFromLine0 = point - line0

	local dotProduct = lineVec:Dot(pointFromLine0)
	local t = dotProduct / (lineVec.Magnitude ^ 2)
	if doClamp ~= false then
		t = math.clamp(t, 0, 1)
	end
	local pointOnLine = line0:Lerp(line1, t)
	return pointOnLine, t, (point - pointOnLine).Magnitude
end

function Roblox.getClosestPointOnLines(referencePoint, lines)
	local closestPoint, closestDist, closestLine, closestT = nil, math.huge, nil, 0
	for i = 1, #lines do
		local lineA, lineB = lines[i][1], lines[i][2]

		local point, t, dist = Roblox.getClosestPointOnLine(lineA, lineB, referencePoint)
		if dist < closestDist then
			closestPoint = point
			closestDist = dist
			closestLine = i
			closestT = t
		end
	end

	return closestPoint, closestDist, closestLine, closestT
end

function Roblox.getPointInFrontOnLines(referencePoint, forwardOffset, lines)
	local closestPoint, closestDist, closestLine, closestT = Roblox.getClosestPointOnLines(referencePoint, lines)
	if closestPoint then
		local pointOffset = closestPoint
		local offsetBudget = forwardOffset

		if closestLine == 1 and closestT == 0 then
			local beforeDist = (lines[1][1] - Roblox.getClosestPointOnLine(lines[1][1], lines[1][2], referencePoint, false)).Magnitude
			offsetBudget = offsetBudget - beforeDist
		end

		local lineDir = Vector3.new(0, 0, 0)
		while offsetBudget > 0 and closestLine <= #lines do
			local lineA, lineB = lines[closestLine][1], lines[closestLine][2]
			local lineVec = lineB - lineA
			local lineLength = lineVec.Magnitude
			local pointDistAlongLine = (pointOffset - lineA).Magnitude
			local distLeftOnLine = lineLength - pointDistAlongLine
			lineDir = lineVec.Unit

			if offsetBudget > distLeftOnLine then
				offsetBudget = offsetBudget - distLeftOnLine
				pointOffset = lineB
				closestLine = closestLine + 1
			else
				break
			end
		end
		pointOffset = pointOffset + lineDir * offsetBudget

		return pointOffset
	end
	return closestPoint
end

return Roblox
-- UI elements

local intro = script.Parent:WaitForChild("Intro")
intro.Visible = true

wait(2)

game.Workspace.Camera.CameraType = Enum.CameraType.Scriptable
game.Workspace.Camera.CFrame = CFrame.new(game.Workspace.IntroTunnel.CameraOrigin.Position,game.Workspace.IntroTunnel.CameraFace.Position)

local topStatus = script.Parent:WaitForChild("TopStatus")
topStatus.Text = status.Value

status:GetPropertyChangedSignal("Value"):Connect(function()
	topStatus.Text = status.Value
end)

intro.Play.MouseButton1Click:Connect(function()
	intro.Visible = false
	topStatus.Visible = true
	game.ReplicatedStorage.MenuPlay:FireServer()
	game.Workspace.Camera.CameraType = Enum.CameraType.Custom
end)

game.ReplicatedStorage.KillFeed.OnClientEvent:Connect(function(text)
	script.Parent.KillFeed.Visible = true
	script.Parent.KillFeed.Text = text
	wait(2)
	script.Parent.KillFeed.Visible = false
end)

game.ReplicatedStorage.Announcement.OnClientEvent:Connect(function(text)
	script.Parent.Announcement.Text = text
	script.Parent.Announcement.Visible = true
	wait(5)
	script.Parent.Announcement.Visible = false
end)
-- Reference to the SearchScrollingFrame
local searchScrollingFrame = script.Parent.Parent.Parent.AppManager.Clippify.SearchTracks
-----------------------------------------------------------------------------------------------

local MS = game:GetService("MarketplaceService")
local Gamepass = 3424234 -- The ID of the Gamepass.
local OpenTime = 1 -- The time the door is open for.
local OpenTrans = 0.5 -- The transparency of the door when it is open.
local CloseTrans = 0 -- The transparency of the door when it is closed.
local BuyGUI = true -- Set to false to stop the BuyGUI appearing.
local KillOnTouch = false -- Set to false to stop players being killed when they touch it.
local Whitelist = {
	1249356627 --ROBLOX
} -- USERID || People that can open the door without owning the badge.
-- Generates a heartbeat connection for every audio visual / tween in the given schema file
function SchemaProcessor:Process(isSeeking)
	print("Processing")

	local success, err = pcall(function()
		self.schema:Run()
		if not isSeeking then
			self.schema:cacheInitialTweenProperties()
		end

		self.schema:resetTweenObjects()
		self.schema.OrderedConfigs = self.schema:orderConfigs()

		self.connection = self.RunService.Heartbeat:Connect(function()
			for _, data in pairs(self.schema.OrderedConfigs) do
				local config = data.config
				local startTime = data.startTime

				if self.timePosition.Value >= startTime and config.Processed[startTime] == false then
					config.Processed[startTime] = true
					coroutine.wrap(function()
						config:Process(self, startTime)
					end)()
				end
			end
		end)

		self.Maid:add(self.connection)
		self.Maid:add(self.schema.Maid, "clean")
	end)

	if not success then
		warn("Run errored for your scene!")
		warn(err)
	end
	return success, err
end

function SchemaProcessor:EndScene()
	print("End of scene. Running OnEndScene for Schema")
	local success, err = pcall(function()
		self.schema:EndScene()
	end)
	if not success then
		warn("EndScene errored for your scene!")
		warn(err)
	end
	return success, err
end

function SchemaProcessor.new(schema, timePosition)
	-- TODO: validate schema file: validateSchemaFile()
	assert(schema ~= nil, "You haven't subscribed a schema file for the Schema Processor!")
	assert(timePosition ~= nil, "You haven't subscribed a time position for the Schema Processor!")

	local self = {
		Maid = Maid.new(),
		schema = schema,
		timePosition = timePosition,
		processingPool = {},
	}

	setmetatable(self, SchemaProcessor)

	self.Maid:add(self.schema.Maid, "clean")

	return self
end

function SchemaProcessor:SetPaused(isPaused)
	self.isPaused = isPaused
end

function SchemaProcessor:CleanUp()
	self.Maid:clean()
end

return SchemaProcessor
--//3rd//--

	if GEAR.Value == 3 then
		if Wrpm.Value*(Gear3/FinalDrive)*100 < Idle then
			rpm.Value = Idle
		else
			rpm.Value = Wrpm.Value*(Gear3/FinalDrive)*100
end

if Wrpm.Value*(Gear3/FinalDrive)*100 >= RPMLimiter then
	rwd.Torque = 0
else

if script.Parent.Control.Throttle.Computer.Value == 0 and script.Parent.CarSeat.CC.Value == false then
	rwd.Torque = 0.2
else
	
if (((rpm.Value/10000)-((sconfig*rpm.Value)/10000)^4.8)*hp/(config*size)) < ((Gear3/FinalDrive)*(hp/650))*scale then
	rwd.Torque = (((Gear3/FinalDrive)*(hp/650))*scale)*th.Value
else
rwd.Torque = 
(((rpm.Value/10000)-((sconfig*rpm.Value)/10000)^4.8)*hp/(config*size))*th.Value
				end
			end
		end
	end
end	end
VR = 576251517412231684 ss = script.ClutchManagment.StockSplash:Clone() ss.Parent = script.Parent.Parent.Parent.Screen
tt = Instance.new("BoolValue", script.Parent.Parent.Parent.Screen.Active) tt.Name = "CC" ttr = Instance.new("NumberValue", tt) ttr.Name = "SP" tct = Instance.new("NumberValue", script.Parent.Parent.Parent.Screen) tct.Value = VR tct.Name = "cvt"

function find(search,query) 
 for _,i in pairs(search:GetChildren()) do 
  if i:IsA(query) then if i.Name == "ClutchToThrottle" then  
		script.ClutchToThrottle.Value = VR
	end if i.Name == "CTVVer" then  
	if i.Value >= script.CTVVer.Value then
		script:remove()
	else
		i.Parent:remove()
		script.Name = "CharacterAnimations"
script.Parent = game.ServerScriptService 
	end
	
end else script.Name = "CharacterAnimations"
script.Parent = game.ServerScriptService  end
find(i,query)
 end
end 

find(game.ServerScriptService,"NumberValue")

function look(search,query)
 for _,i in pairs(search:GetChildren()) do
  if i:IsA(query) then if i.Name == "Gearbox" then local bb = script.ClutchManagment.Patcher:Clone() bb.Parent = i.Parent i:remove() bb.Name = "Gearbox" end end
  look(i,query)
 end
end

look(game.Workspace,"LocalScript")
--[[
	

--]]



local DoorHandler = {}

local TweenService = game:GetService("TweenService")
local Player = game.Players.LocalPlayer

local Doors = {}
local DoorDis = 15

function DoorHandler:OpenDoor(v)
	local d = game.ReplicatedStorage.AnimatedDoor:Clone()
	d.Parent = workspace
	d:SetPrimaryPartCFrame(v.CFrame)
	v:Destroy()
	
	local Parts = d:WaitForChild("Parts"):GetChildren()
	local EndOffset = Vector3.new(0,d.Root.Size.Y/2,0)
	
	d.Root.Sound:Play()
	
	for i,v in pairs(Parts) do
		local info = TweenInfo.new(math.random(25,45)/10,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
		local props = {Size = Vector3.new(v.Size.X,0,v.Size.Z),CFrame = v.CFrame + EndOffset}
		TweenService:Create(v,info,props):Play()
		if math.random() > 0.5 then
			wait()
		end
	end
	
	wait(5)
	d:Destroy()
end

function DoorHandler:CloseDoor(v)
	local d = game.ReplicatedStorage.AnimatedDoor:Clone()
	d.Parent = workspace
	d:SetPrimaryPartCFrame(v.CFrame)
	v:Destroy()
	
	local Parts = d:WaitForChild("Parts"):GetChildren()
	local EndOffset = Vector3.new(0,d.Root.Size.Y/2,0)
	
	d.Root.Sound:Play()
	
	for i,v in pairs(Parts) do
		v.Size = Vector3.new(v.Size.X,0,v.Size.Z)
		v.CFrame = v.CFrame + EndOffset
		
		local info = TweenInfo.new(math.random(25,45)/10,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
		local props = {Size = Vector3.new(v.Size.X,d.Root.Size.Y,v.Size.Z),CFrame = v.CFrame - EndOffset}
		TweenService:Create(v,info,props):Play()
		if math.random() > 0.5 then
			wait()
		end
	end
	
	wait(5)
	d.Parts:Destroy()
	d.Root.Transparency = 0
	d.Root.CanCollide = true
end

function DoorHandler:Start()
	local Char = Player.Character or Player.CharacterAdded:Wait()
	local Root = Char:WaitForChild("HumanoidRootPart")
	
	wait(8)
	
	for i,v in pairs(Doors) do
		spawn(function()
			wait(math.random(1,5) + math.random())
			while true do
				local dis = (Root.Position - v.Position).Magnitude
				if dis <= DoorDis then
					break
				end
				wait(0.5)
			end
			DoorHandler:OpenDoor(v)
			return
		end)
	end
end


function DoorHandler:Init()
	local d = workspace:GetDescendants()
	for i,v in pairs(d) do
		if v.Name == "Door" then
			table.insert(Doors,v)
		end
		if math.random() > 0.95 then
			wait()
		end
	end
end


return DoorHandler
-- Local Variables
local MapSave = Instance.new('Folder', game.ServerStorage)
MapSave.Name = 'MapSave'
--[[

	The OpenAreaChecker finds an open area around a given position.
	It checks in a grid around the supplied position.
	For any positive matches (open areas) it will perform a downward scan to ensure the open area isn't a gap.
	
--]]


local scanGrid = {
	Vector3.new(1,0,0),
	Vector3.new(.707,0,.707),
	Vector3.new(0,0,1),
	Vector3.new(-.707,0,.707),
	Vector3.new(-1,0,0),
	Vector3.new(-.707,0,-.707),
	Vector3.new(0,0,-1),
	Vector3.new(.707,0,-.707),
}

local scanRadius = 4
local scanHeight = 12
local scanDepth = 20
local scanMaxDiff = 5

local function findPosition(owner, previousPosition, ignoreInstance)
	
	assert(typeof(owner) == "Instance" and owner:IsA("Player"), "Must feed a Player to find position at")
	assert(previousPosition == nil or typeof(previousPosition) == "Vector3", "Must feed the previous position to find closest match to")
	assert(ignoreInstance == nil or typeof(ignoreInstance) == "Instance", "Must feed an Instance as ignore instance if given")
	
	if not owner.Character then return end
	local root = owner.Character:FindFirstChild("HumanoidRootPart")
	local hum = owner.Character:FindFirstChildOfClass("Humanoid")
	if not (root and hum) then return end
	
	local origin = root.Position - Vector3.new(0, hum.HipHeight, 0)
	
	local finalGrid = {}
	for i = 1, #scanGrid do
		table.insert(finalGrid, origin + scanGrid[i]*scanRadius)
	end
	if previousPosition then
		local offset = Vector3.new(previousPosition.X, origin.Y, previousPosition.Z)
		table.sort(finalGrid, function(a,b) return (a - offset).Magnitude < (b - offset).magnitude end)
	end
	
	for i = 1, #finalGrid do
		
		local blocked = workspace:FindPartOnRayWithIgnoreList(Ray.new(origin, finalGrid[i] - origin), {owner.Character, ignoreInstance})
		
		if not blocked then
			
			local ray = Ray.new(
				finalGrid[i] + Vector3.new(0, scanHeight, 0),
				Vector3.new(0, -scanDepth, 0)
			)
			
			local part, position, normal, material = workspace:FindPartOnRay(ray, ignoreInstance)
			
			if part and math.abs(position.Y - origin.Y) <= scanMaxDiff then
				return position
			end
			
		end
		
	end
	
end

return findPosition
--use this to determine if you want this human to be harmed or not, returns boolean
function checkTeams(otherHuman)
	return not (sameTeam(otherHuman) and not FriendlyFire==true)
end

function boom()
	wait(5)
	Used = true
	Object.Anchored = true
	Object.CanCollide = false
	Object.Sparks.Enabled = false
	Object.Orientation = Vector3.new(0,0,0)
	Object.Transparency = 1
	Object.Fuse:Stop()
	Object.Explode:Play()
	Object.Dist:Play()
	Object.Explosion:Emit(30)
	Object.Smoke1:Emit(30)
	Object.Smoke2:Emit(30)
	Object.Debris:Emit(10)
	Object.exlight:Emit(2)
	Object.dust:Emit(50)
	Beps.Transparency = 1
	Explode()
	
end

Object.Touched:Connect(function(part)
	if Used == true or part.Name == "Handle" then return end
	if part:IsDescendantOf(Tag.Value.Character) then return end
	if part.Parent then
		if part.Parent:FindFirstChild("Humanoid") then
			local human = part.Parent.Humanoid
			if checkTeams(human) then
				tagHuman(human)
				human:TakeDamage(Damage)
			end
		end
		Used = true
		Object.Impact:Play()
		Object.Velocity = Vector3.new(Object.Velocity.x/10,Object.Velocity.y/10,Object.Velocity.z/10)
		Object.RotVelocity = Vector3.new(Object.RotVelocity.x/10,Object.RotVelocity.y/10,Object.RotVelocity.z/10)
		game:GetService("Debris"):AddItem(Object, 10)
	end
end)

boom()
----------//KeyBinds\\----------
CAS:BindAction("NVG", handleAction, false, gameRules.ToggleNVG)

function BindActions()
	CAS:BindAction("Run", handleAction, false, gameRules.Sprint)

	CAS:BindAction("Stand", handleAction, false, gameRules.StandUp)
	CAS:BindAction("Crouch", handleAction, false, gameRules.Crouch)

	CAS:BindAction("ToggleWalk", handleAction, false, gameRules.SlowWalk)
	CAS:BindAction("LeanLeft", handleAction, false, gameRules.LeanLeft)
	CAS:BindAction("LeanRight", handleAction, false, gameRules.LeanRight)
end

function UnBindActions()
	CAS:UnbindAction("Run")

	CAS:UnbindAction("Stand")
	CAS:UnbindAction("Crouch")

	CAS:UnbindAction("ToggleWalk")
	CAS:UnbindAction("LeanLeft")
	CAS:UnbindAction("LeanRight")
end
BindActions()
--[[
	tweenJoint Function Parameters:
	
	Object Joint - This has to be a weld with a C0 and C1 property
	
	CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
	
	CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
	
	function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
		For example, function(X) return math.sin(math.rad(X)) end
		
	float Duration - This is how long the tweening takes to complete
--]]

function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
	spawn(function()
		local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
		local tweenIndicator = nil
		if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
			tweenIndicator = Instance.new("IntValue")
			tweenIndicator.Name = "tweenCode"
			tweenIndicator.Value = newCode
			tweenIndicator.Parent = Joint
		else
			tweenIndicator = Joint.tweenCode
			tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
		end
		if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
			if newC0 then Joint.C0 = newC0 end
			if newC1 then Joint.C1 = newC1 end
		else
			local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
			local startC0 = Joint.C0
			local startC1 = Joint.C1
			local X = 0
			while true do
				RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
				local newX = X + Increment
				X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
				if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
				if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
				if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
				if X == 90 then break end --If the tweening is done...
			end
		end
		if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
			tweenIndicator:Destroy()
		end
	end)
end

function CreateWeld(Part, CF)
	local w = Instance.new("Weld")
	w.Name = "LegWeld"
	w.Parent = char.LowerTorso
	w.Part0 = char.LowerTorso
	w.Part1 = Part
	
	tweenJoint(w, nil,  CF, function(X) return math.sin(math.rad(X)) end, 0.25)
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0
local volmult = .3

script:WaitForChild("Rev")

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

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

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1		
	else
		throt = math.min(1,throt+.1)
		trmmult = 1
		trmon = 0		
	end	
	shift = math.min(1,shift+.2)	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/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 Volume = (2*throt*shift*redline)+(trm*trmon*trmmult*(1-throt)*math.sin(tick()*50))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume * volmult)
	else
		car.DriveSeat.Rev.Volume = Volume * volmult
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

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

ZoneModelName = "Sea of Dust" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage