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


	Tune.SteerInner		= 34		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 34		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .06		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .06		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 330		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
--// Use the below table to define "pre-set" command aliases
--// Command aliases; Format: {[":alias <arg1> <arg2> ..."] = ":command <arg1> <arg2> ..."}


settings.Aliases = {
	[":examplealias <player> <fireColor>"] = ":ff <player> | :fling <player> | :fire <player> <fireColor>" --// Order arguments appear in alias string determines their required order in the command message when ran later
};

settings.Banned = {}		-- List of people banned from the game 		  Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
settings.Muted = {}			-- List of people muted (cannot send chat messages)				 		  Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
settings.Blacklist = {}		-- List of people banned from running commands 	  Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}
settings.Whitelist = {}		-- People who can join if whitelist enabled	  Format: {"Username"; "Username:UserId"; UserId; "Group:GroupId:GroupRank"; "Group:GroupId"; "Item:ItemID"; "GamePass:GamePassID";}

settings.MusicList = {} 	-- List of songs to appear in the :musiclist	  Format: {{Name = "somesong", ID = 1234567}, {Name = "anotherone", ID = 1243562}}
settings.CapeList = {}		-- List of capes							  Format: {{Name = "somecape", Material = "Fabric", Color = "Bright yellow", ID = 12345567, Reflectance = 1}; {etc more stuff here}}
settings.InsertList = {} 	-- List of models to appear in the :insertlist and can be inserted using ':insert <name>'	  Format: {{Name = "somemodel", ID = 1234567}; {Name = "anotherone", ID = 1243562}}

settings.OnStartup = {}		-- List of commands ran at server start								Format: {":notif TestNotif"}
settings.OnJoin = {}		-- List of commands ran as player on join (ignores adminlevel)		Format: {":cmds"}
settings.OnSpawn = {}		-- List off commands ran as player on spawn (ignores adminlevel)	Format: {"!fire Really red",":ff me"}

settings.SaveAdmins = true		  -- If true anyone you :admin or :headadmin in-game will save
settings.LoadAdminsFromDS = true  -- If false, any admins saved in your DataStores will not load
settings.WhitelistEnabled = false -- If true enables the whitelist/server lock; Only lets admins & whitelisted users join

settings.Prefix = ":"				-- The : in :kill me
settings.PlayerPrefix = "!"			-- The ! in !donate; Mainly used for commands that any player can run; Do not make it the same as settings.Prefix
settings.SpecialPrefix = ""			-- Used for things like "all", "me" and "others" (If changed to ! you would do :kill !me)
settings.SplitKey = " "				-- The space in :kill me (eg if you change it to / :kill me would be :kill/me)
settings.BatchKey = "|"				-- :kill me | :ff bob | :explode scel
settings.ConsoleKeyCode = "Quote"	-- Keybind to open the console; Rebindable per player in userpanel; KeyCodes: https://developer.roblox.com/en-us/api-reference/enum/KeyCode
--[[
	Runs the given TestPlan and returns a TestResults object representing the
	results of the run.
]]


function TestRunner.runPlan(plan)
	local session = TestSession.new(plan)
	local lifecycleHooks = LifecycleHooks.new()

	local exclusiveNodes = plan:findNodes(function(node)
		return node.modifier == TestEnum.NodeModifier.Focus
	end)

	session.hasFocusNodes = #exclusiveNodes > 0

	TestRunner.runPlanNode(session, plan, lifecycleHooks)

	return session:finalize()
end
--[[Transmission]]


	Tune.TransModes		= {"Auto"}								--[[
	[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	= "RPM"												--[[
	[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)
	
	--Gear Ratios
	Tune.FinalDrive		= 3.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.04		,
		--[[ 3 ]]		1.38		,
		--[[ 4 ]]		1.03		,
		--[[ 5 ]]		0.81		,
		--[[ 6 ]]		0.64		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--Loop For Making Rays For The Bullet's Trajectory


for i = 1, 30 do
	local thisOffset = offset + Vector3.new(0, yOffset*(i-1), 0)
	local travelRay = Ray.new(point1,thisOffset)
	local hit, position = workspace:FindPartOnRay(travelRay, parts.Parent)

	local distance 		= (position - point1).magnitude
	round.Size				= Vector3.new(1, distance, 1)
	round.CFrame			= CFrame.new(position, point1)
								* CFrame.new(0, 0, -distance/2)
								* CFrame.Angles(math.rad(90),0,0)
	round.Parent			= workspace
	point1					= point1 + thisOffset
	
	if hit then
		round:remove()
		local e = Instance.new("Explosion")
		e.BlastRadius = 4
		e.ExplosionType = "NoCraters"
		e.BlastPressure = 1
		e.Position = position
		e.Parent = workspace
		
		local players = game.Players:getChildren()
		for i = 1, #players do
			
			if players[i].TeamColor ~= script.Parent.Parent.Tank.Value then --if he's not an ally
				character = players[i].Character
				if character then
					torso = character:findFirstChild'Torso'
					if torso then
						
						torsoPos = torso.Position
						origPos = round.Position
						
						local ray = Ray.new(origPos, torsoPos-origPos)
						local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray,ignoreList)
						if hit then
							if hit.Parent == character then
								human = hit.Parent:findFirstChild("Humanoid")
								if human then
									distance = (position-origPos).magnitude
-- SAVE --



function API:SavePlayerBoothText(TargetId, Text)
	
	rawset(BoothText, TargetId, Text)
	
end

function API:SavePlayerSingText(TargetId, Text)

	rawset(SingText, TargetId, Text)

end

function API:SavePlayerBooth(TargetId, Id)

	rawset(CurrentBooth, TargetId, Id)

end
-------- OMG HAX



r = game:service("RunService")


local damage = 5


local slash_damage = 8
local lunge_damage = 12

sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = .7

local LungeSound = Instance.new("Sound")
LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
LungeSound.Parent = sword
LungeSound.Volume = .6

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1


function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			end
		end


	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end

function lunge()
	damage = lunge_damage

	LungeSound:play()

	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Lunge"
	anim.Parent = Tool
	
	
	force = Instance.new("BodyVelocity")
	force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
	force.Parent = Tool.Parent.Torso
	wait(.2)
	swordOut()
	wait(.2)
	force.Parent = nil
	wait(.4)
	swordUp()

	damage = slash_damage
end

function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(1,0,0)
end

function swordAcross()
	-- parry
end


Tool.Enabled = true
local last_attack = 0
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	t = r.Stepped:wait()

	if (t - last_attack < .2) then
		lunge()
	else
		attack()
	end

	last_attack = t

	--wait(.5)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
-- Local Functions


local function toggleNonTutorialGui(isEnabled)
	local PlayerGui = player.PlayerGui
	
	for _, child in ipairs(PlayerGui:GetChildren()) do
		if child:IsA("GuiObject") and child.Name ~= "Tutorial" then
			child.Enabled = isEnabled
		end
	end
end

local function startTutorial()
	toggleNonTutorialGui(false)
	
	Panels.Visible = true
	Panel1.Visible = true
	Panel2.Visible = false
end

local function nextPanel(input, gameProcessed)
	if Panel1.Visible == true then
		Panel1.Visible = false
		Panel2.Visible = true
		NextButton.ButtonLabel.Text = "GOT IT"
	elseif Panel2.Visible == true then
		Panel2.Visible = false
	
		-- Disable tutorial
		Panels.Visible = false
		
		-- Enable other gui
		toggleNonTutorialGui(true)
		
		if not IS_MOBILE then
			-- Show and tween arrow over move button until player earns
			-- 10 points
			Arrow.Visible = true
			local arrowThread = coroutine.create(
				function()
					local goal = totalPoints.Value + 10
					local startPos = Arrow.Position
			
					repeat
						Arrow:TweenPosition(UDim2.new(startPos.X.Scale, 0, startPos.Y.Scale, -20),
							Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1, true)
						wait(1)
						Arrow:TweenPosition(UDim2.new(startPos.X.Scale, 0, startPos.Y.Scale, 0),
								Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1, true)
						wait(1)
					until totalPoints.Value >= goal
	
					Arrow.Visible = false
				end)
			coroutine.resume(arrowThread)
		end
	end
end
--lights


local Red1 = script.Parent.Red1
local Red2 = script.Parent.Red2
local RL = script.Parent.RL
local RR = script.Parent.RR
local FL = script.Parent.FL
local FR = script.Parent.FR
local f1 = script.Parent.WhiteFront
local f2 = script.Parent.WhiteFront2
local r1 = script.Parent.WhiteBack
local r2 = script.Parent.WhiteBack2
local B1 = script.Parent.Brake
local B2 = script.Parent.Brake2

local lgt = script.Parent.Lighting.Light


function lightson()
	f1.Material = "Neon"
	f2.Material = "Neon"
	Red1.Material = "Neon"
	Red2.Material = "Neon"
	
	lgt.Enabled = true
end
function lightsoff()
	f1.Material = "SmoothPlastic"
	f2.Material = "SmoothPlastic"
	Red1.Material = "SmoothPlastic"
	Red2.Material = "SmoothPlastic"
	
	lgt.Enabled = false
end
function reverse()
	r1.Material = "Neon"
	r2.Material = "Neon"
end
function unreverse()
	r1.Material = "SmoothPlastic"
	r2.Material = "SmoothPlastic"
end
function brake()
	B1.Material = "Neon"
	B2.Material = "Neon"
end
function unbrake()
	B1.Material = "SmoothPlastic"
	B2.Material = "SmoothPlastic"
end
--Traction Control Settings


Tune.TCSEnabled		= true		-- Implements TCS
Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
-- Infinitely update the target position for the tank


currentElev = 0;
currentRot = 0;
while wait() do
	if (myMouse) then
		-- Position of mouse in world
		mousePoint = myMouse.Hit.p;
		
		-- Vector from tank to mouse point
		targetVector = (mousePoint - parts.GunBase.CFrame.p).unit;
		
		-- Determine where the gun should point
		targetRotations = determineNewDirections(targetVector);
		
		-- For each time we do all that math to determine the angle, we will smoothly rotate the gun towards it in 4 increments
		-- This means less lag (fewer calculations) but it's still smooth
		for i = 1, 4 do		
			newRotations = getSmoothRotation(targetRotations);
			TFE:FireServer('RotateTurret',parts,currentElev, currentRot)
			wait();
		end
	end
end
--[[ @brief Performs an operation on heartbeat based on a condition.
     @param callback The callback function for each heartbeat step.
     @param condition The condition we should check before running callback.
     @param yield Whether this function should yield or return immediately.
--]]


function AnimateLib.ConditionalOnHeartbeat(callback, condition, yield, callbackOnComplete)
	local cxn;
	local event = Utils.new("Event");
	local startTime = tick();
	cxn = game:GetService("RunService").Heartbeat:connect(function(step)
		if condition() then
			callback(step, tick() - startTime)
		else
			cxn:disconnect();
			event:Fire();
			if callbackOnComplete then
				callbackOnComplete();
			end
		end
	end);
	if yield then
		event:wait();
	end
end
--------------------------------------------------------------------------------------------------


On = false
Check = false

function check(Char)
Player = game.Players:FindFirstChild(Char.Name)
if Player ~= nil then
if Group == true then
if Player:IsInGroup(GroupId) == true then
Check = true
end
end
if Friends == true then
if Player:IsFriendsWith(game.CreatorId) == true then
Check = true
end
end
if Bestfriends == true then
if Player:IsBestFriendsWith(game.CreatorId) == true then
Check = true
end
end
if PeopleOn == true then
for i = 1,#People do
if People[i].Name == Player.Name then
Check = true
end
end
end
if Tshirt == true then
if Char:FindFirstChild("Torso") ~= nil and Char.Torso:FindFirstChild("roblox") ~= nil then
if Char.Torso.roblox.Texture == "http://www.roblox.com/asset/?id="..tostring(TTexture) then
Check = true
end
end
end
if Player.userId == game.CreatorId then
Check = true
end
if Pants == true then
if Char:FindFirstChild("Pants") ~= nil then
if Char.Pants.PantsTemplate == "http://www.roblox.com/asset/?id="..tostring(PTexture) then
Check = true
end
end
end
if Shirt == true then
if Char:FindFirstChild("Shirt") ~= nil then
if Char.Shirt.ShirtTemplate == "http://www.roblox.com/asset/?id="..tostring(STexture) then
Check = true
end
end
end
if BC == true then
if Player.MembershipType == "BuildersClub" then
Check = true
end
end
if Veterans == true then
if Player.AccountAge == 365 then
Check = true
end
end
end
end

function open(hit)
if On == false then
On = true
Player = game.Players:FindFirstChild(hit.Parent.Name)
if Player ~= nil then
Orig = script.Parent.Transparency
script.Parent.Transparency = OpenTransparency
script.Parent.CanCollide = false
wait(OpenTime)
script.Parent.CanCollide = true
script.Parent.Transparency = Orig
On = false
end
end
end

function kill(hit)
if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil then
Player = game.Players:FindFirstChild(hit.Parent.Name)
if Player ~= nil then
if Player:IsInGroup(GroupId) == false then
hit.Parent:BreakJoints()
end
end
end
end

function knock(hit)
if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Torso") ~= nil then
Player = game.Players:FindFirstChild(hit.Parent.Name)
if Player ~= nil then
if Player:IsInGroup(GroupId) == false then
hit.Parent.Torso.RotVelocity = Vector3.new(50, -230, 50)
end
end
end
end

function ontouched(hit)
print("On")
if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil then
print("On")
check(hit.Parent)
if Check == true then
open(hit)
elseif Check == false then
if Killing == true then
kill(hit)
end
if Knockback == true then
knock(hit)
end
end
Check = false
end
end

script.Parent.Touched:connect(ontouched)
------------------------------------------------------------------------
-- parse a for loop body for both versions of the for loop
-- * used in fornum(), forlist()
------------------------------------------------------------------------


function luaY:forbody(ls, base, line, nvars, isnum)
  -- forbody -> DO block
  local bl = {}  -- BlockCnt
  local fs = ls.fs
  self:adjustlocalvars(ls, 3)  -- control variables
  self:checknext(ls, "TK_DO")
  local prep = isnum and luaK:codeAsBx(fs, "OP_FORPREP", base, luaK.NO_JUMP)
                     or luaK:jump(fs)
  self:enterblock(fs, bl, false)  -- scope for declared variables
  self:adjustlocalvars(ls, nvars)
  luaK:reserveregs(fs, nvars)
  self:block(ls)
  self:leaveblock(fs)  -- end of scope for declared variables
  luaK:patchtohere(fs, prep)
  local endfor = isnum and luaK:codeAsBx(fs, "OP_FORLOOP", base, luaK.NO_JUMP)
                       or luaK:codeABC(fs, "OP_TFORLOOP", base, 0, nvars)
  luaK:fixline(fs, line)  -- pretend that `OP_FOR' starts the loop
  luaK:patchlist(fs, isnum and endfor or luaK:jump(fs), prep + 1)
end
--[[
	INSTALL INSTRUCTIONS:
	Firstly, place this script inside of ServerScriptService.
	
	Secondly, move modules and features that you don't care for into the DeactivatedModules folder, and if any modules in there are ones you would
	like, just drop them into Modules!
	
	Configuration for each module should be stored in a configuration folder inside of the module, or in a module script named "Configuration."
	
	raidRoleplay is meant to be modular, so read the documentation and write your own code, or simply install modules created by others into the
	"Modules" folder.
	
	Finally, global configuration for rank ID and such should be in the Configuration folder attached to this script.
	
	With love,
	r_aidmaster
--]]



require(script:WaitForChild("Assets"):WaitForChild("Loader")).Main() --  Here we go!
--[[ The Module ]]

--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local DynamicThumbstick = setmetatable({}, BaseCharacterController)
DynamicThumbstick.__index = DynamicThumbstick

function DynamicThumbstick.new()
	local self = setmetatable(BaseCharacterController.new() :: any, DynamicThumbstick)

	self.moveTouchObject = nil
	self.moveTouchLockedIn = false
	self.moveTouchFirstChanged = false
	self.moveTouchStartPosition = nil

	self.startImage = nil
	self.endImage = nil
	self.middleImages = {}

	self.startImageFadeTween = nil
	self.endImageFadeTween = nil
	self.middleImageFadeTweens = {}

	self.isFirstTouch = true

	self.thumbstickFrame = nil

	self.onRenderSteppedConn = nil

	self.fadeInAndOutBalance = FADE_IN_OUT_BALANCE_DEFAULT
	self.fadeInAndOutHalfDuration = FADE_IN_OUT_HALF_DURATION_DEFAULT
	self.hasFadedBackgroundInPortrait = false
	self.hasFadedBackgroundInLandscape = false

	self.tweenInAlphaStart = nil
	self.tweenOutAlphaStart = nil

	return self
end
---[[ Fade Out and In Settings ]]


module.ChatWindowBackgroundFadeOutTime = 0.5 --Chat background will fade out after this many seconds.
module.ChatWindowTextFadeOutTime = 30				--Chat text will fade out after this many seconds.
module.ChatDefaultFadeDuration = 0.8
module.ChatShouldFadeInFromNewInformation = false
module.ChatAnimationFPS = 20.0
--Both


local Loudness = .75 --volume of the boost supplier (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("Whine")
script:WaitForChild("BOV")

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

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" 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
	end
end)

handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","Whine",car.DriveSeat,script.Whine.SoundId,0,script.Whine.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
handler:FireServer("playSound","Whine")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("Whine")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Super" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
	local WP,WV,BP,BV,HP,HV = nil
	
	BOVact = math.floor(psi*20)
	if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Double" then
		WP = (psi)
		WV = (psi/4)*Loudness
		
		BP = (1-(-psi/20))*BOV_Pitch
		BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))
	
		if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
		if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	elseif _Tune.Aspiration == "Super" then
		psi = psi/2
		HP = psi*Whine_Pitch
		HV = (psi/4)*Loudness
	end
		
	if FE then
		handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
		handler:FireServer("updateSound","Whine",script.Whine.SoundId,HP,HV)
		handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	else
		car.DriveSeat.Whistle.Pitch = WP
		car.DriveSeat.Whistle.Volume = WV
		car.DriveSeat.Whine.Pitch = HP
		car.DriveSeat.Whine.Volume = HV
		car.DriveSeat.BOV.Pitch = BP
		car.DriveSeat.BOV.Volume = BV
	end
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(psi*20)
		ticc = tick()
	end
end