Roblox/luau_corpus huggingface dataset:
--Internal Settings--

local fullMag = 30

local spread = 1.1 -- in degrees

local fullauto = false -- shoots all bullets as long as the player is visible. turning this off reverts shooting mechanic back to the original marine mechanics (boolean)

local burstamount = 3 -- (only works if full auto is off) amount of times gun fires in burst fire mode

local firerate = 0.06 -- wait between shooting in seconds

local shotgunpellets = 1 -- setting this above 1 turns the gun into a shotgun (MIGHT LAG WITH FULL AUTO ON)

local delaybeforereloading = 0.3 -- to delay reload (prevents the marine from shooting the last shot of the mag at the ground)

local MinimumDamage,MaximumDamage = 9, 13 -- the amount of damage each bullet does (RANDOMIZED) first value is minimum, second value is maximum

local SemiAtLongRange = false -- restores the behaviour of the marine shooting in semi at long distances (i made this toggleable because i didnt like it)

local headshotmultiplier = 2 -- self explanitory (set this value to 1 if you dont want a multiplier)

local HitWallSounds = {"rbxassetid://6962153997","rbxassetid://6962154328","rbxassetid://6962154691","rbxassetid://6962155018","rbxassetid://6962155378"} -- basically sounds for hitting walls

local HitFleshSound = "rbxassetid://4988621968" -- plays when a creature gets shot

local bulletacceleration = Vector3.new(0,-12,0) -- very similar to how acceleration works in particle emitters (setting the y value to a negative number will give the bullet bulletdrop)

local maxdistance = 300

local bulletspeed = 400
-- Represents the function to determine piercing and hitting.
export type CanPenetrateFunction = (ActiveCast, RaycastResult, Vector3) -> boolean
export type CanHitFunction = (ActiveCast, RaycastResult, Vector3) -> boolean
-- ROBLOX deviation: Roblox Instance matchers
-- local instanceSubsetEquality = utils.instanceSubsetEquality

local makeThrowingMatcher, _validateResult
--[[Vehicle Weight]]	
	--Determine Current Mass
	local mass=0
	
	function getMass(p)
		for i,v in pairs(p:GetChildren())do
			if v:IsA("BasePart") then
				mass=mass+v:GetMass()
			end
			getMass(v)
		end	
	end
	getMass(car)
	
	--Apply Vehicle Weight
	if mass<_Tune.Weight*weightScaling then
		--Calculate Weight Distribution
		local centerF = Vector3.new()
		local centerR = Vector3.new()
		local countF = 0
		local countR = 0
		
		for i,v in pairs(Drive) do
			if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
				centerF = centerF+v.CFrame.p
				countF = countF+1
			else
				centerR = centerR+v.CFrame.p
				countR = countR+1
			end
		end
		centerF = centerF/countF
		centerR = centerR/countR
		local center = centerR:Lerp(centerF, _Tune.WeightDist/100)  
		
		--Create Weight Brick
		local weightB = Instance.new("Part",car.Body)
		weightB.Name = "#Weight"
		weightB.Anchored = true
		weightB.CanCollide = false
		weightB.BrickColor = BrickColor.new("Really black")
		weightB.TopSurface = Enum.SurfaceType.Smooth
		weightB.BottomSurface = Enum.SurfaceType.Smooth
		if _Tune.WBVisible then
			weightB.Transparency = .75			
		else
			weightB.Transparency = 1			
		end
		weightB.Size = Vector3.new(_Tune.WeightBSize[1],_Tune.WeightBSize[2],_Tune.WeightBSize[3])
		weightB.CustomPhysicalProperties = PhysicalProperties.new(((_Tune.Weight*weightScaling)-mass)/(weightB.Size.x*weightB.Size.y*weightB.Size.z),0,0,0,0)
		weightB.CFrame=(car.DriveSeat.CFrame-car.DriveSeat.Position+center)*CFrame.new(0,_Tune.CGHeight,0)
	else
		--Existing Weight Is Too Massive
	end
	
	local flipG = Instance.new("BodyGyro",car.DriveSeat)
	flipG.Name = "Flip"
	flipG.D = 0
	flipG.MaxTorque = Vector3.new(0,0,0)
	flipG.P = 0
------------------------------------------------------------------------
-- parses an expression in parentheses or a single variable
-- * used in primaryexp()
------------------------------------------------------------------------
function luaY:prefixexp(ls, v)
  -- prefixexp -> NAME | '(' expr ')'
  local c = ls.t.token
  if c == "(" then
    local line = ls.linenumber
    luaX:next(ls)
    self:expr(ls, v)
    self:check_match(ls, ")", "(", line)
    luaK:dischargevars(ls.fs, v)
  elseif c == "TK_NAME" then
    self:singlevar(ls, v)
  else
    luaX:syntaxerror(ls, "unexpected symbol")
  end--if c
  return
end
-- Calcule a velocidade linear média do carro com base na taxa em que todas as rodas estão girando
local function getAverageVelocity()
	local vFR = -motorFR.Attachment1.WorldAxis:Dot(motorFR.Attachment1.Parent.RotVelocity)
	local vRR = -motorBR.Attachment1.WorldAxis:Dot(motorBR.Attachment1.Parent.RotVelocity)
	local vFL = motorFL.Attachment1.WorldAxis:Dot(motorFL.Attachment1.Parent.RotVelocity)
	local vRL = motorBL.Attachment1.WorldAxis:Dot(motorBL.Attachment1.Parent.RotVelocity)
	return 0.25 * ( vFR + vFL + vRR + vRL )
end
-- / Settings / --
local Settings = {
	OnCD = false,
	CDTime = 15
}
--PlayerClick
ClickDetector.MouseClick:Connect(function()
	if Ready == true then
		if Open == false then
			Ready = false
			Open = true
			OpenSound:Play()
			OpenTween:Play()
			wait(.5)
			Ready = true
		elseif Open == true then
			Ready = false
			Open = false
			CloseSound:Play()
			CloseTween:Play()
			wait(.5)
			Ready = true
		end
	end
end)
-- Torso
character.UpperTorso.Material = Material
character.LowerTorso.Material = Material
character.HumanoidRootPart.Material = Material
character.Head.Material = Material
--end)

task.spawn(function()
	while true do

		if Dead then
			break
		end

		AI()

		local n,mag,hum=near()
		if n and not Dead then
			n=n.p
			if not r then
				w=.14
				local dir=h.Position-n
				local tst ,_ =workspace:FindPartOnRay(Ray.new(t.Torso.Position,(n-t.Torso.Position).Unit*999),t)


				if tst and not Dead then

					local FoundHuman,VitimaHuman = CheckForHumanoid(tst)
					if FoundHuman == true and VitimaHuman.Health > 0 and game.Players:GetPlayerFromCharacter(VitimaHuman.Parent) and perception < 10 then
						perception = perception + Settings.Level.Value
						t.Humanoid.WalkSpeed = SearchingWalkspeed
						Memory = Settings.Level.Value * 100
						CanSee = true
					elseif perception > 0 then
						perception = perception - 1/Settings.Level.Value * 2
						t.Humanoid.WalkSpeed = SearchingWalkspeed
						CanSee = false
					elseif perception <= 0 then
						perception = 0
						t.Humanoid.WalkSpeed = RegularWalkspeed
						Memory = Memory - .25
					end
					--print(Memory)
				end
				task.wait(5)
			end
		end
	end
end)
-- When tool deselected
function onDeselected(mouse)
	myMouse = nil
end
-- / Functions / --
RoundModule.StartRound = function(Gamemode)
	local GamemodeModule = require(script:WaitForChild(Gamemode))
	
	GamemodeModule.ApplyGamemode()
	
end
-- Function to turn particles on or off
local function ConfigWater()
	for _,v in pairs(Emitters:GetChildren()) do
		if v and v:FindFirstChild("Emit1") then
			v:FindFirstChild("Emit1").Enabled = IsOn.Value
		end
		if v and v:FindFirstChild("Emit2") then
			v:FindFirstChild("Emit2").Enabled = IsOn.Value
		end
	end
	
	if ShouldEmitSound.Value and IsOn.Value then
		WaterLoop:Play()
		TweenVolume(WaterLoop.Volume,MaxVolume.Value,2.5,false)
	elseif not IsOn.Value or not ShouldEmitSound.Value then
		TweenVolume(MaxVolume.Value,0,2.9,true)
	end
end
--Made by Stickmasterluke


local sp=script.Parent

damage=40
cooldown=.30

debris=game:GetService("Debris")
check=true

function waitfor(parent,name)
	while true do
		local child=parent:FindFirstChild(name)
		if child~=nil then
			return child
		end
		wait()
	end
end

local handle=waitfor(sp,"Handle")
local debris=game:GetService("Debris")

function randomcolor()
	if handle then
		local m=handle:FindFirstChild("Mesh")
		if m~=nil then
			m.VertexColor=Vector3.new(math.random(1,2),math.random(1,2),math.random(1,2))*.5
		end
	end
end

function onButton1Down(mouse)
	if check then
		check=false
		mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
		local h=sp.Parent:FindFirstChild("Humanoid")
		local t=sp.Parent:FindFirstChild("Torso")
		local anim=sp:FindFirstChild("RightSlash")
		if anim and t and h then
			theanim=h:LoadAnimation(anim)
			theanim:Play(nil,nil,1.5)
			if theanim and h.Health>0 then
				local sound=sp.Handle:FindFirstChild("SlashSound")
				if sound then
					sound:Play()
				end
				wait(.25)
				handle.Transparency=1
				local p=handle:clone()
				p.Name="Effect"
				p.CanCollide=false
				p.Transparency=1
				p.Script.Disabled=false
				local tag=Instance.new("ObjectValue")
				tag.Name="creator"
				tag.Value=h
				tag.Parent=p
				p.RotVelocity=Vector3.new(0,0,0)
				p.Velocity=(mouse.Hit.p-p.Position).unit*400+Vector3.new(0,0,0)
				p.CFrame=CFrame.new(handle.Position,mouse.Hit.p)*CFrame.Angles(-math.pi/2,0,0)
				debris:AddItem(p,20+math.random()*5)
				p.Parent=game.Workspace
			end
		end
		wait(cooldown-.25)
		mouse.Icon="rbxasset://textures\\GunCursor.png"
		randomcolor()
		handle.Transparency=1
		check=true
	end
end

sp.Equipped:connect(function(mouse)
	if mouse==nil then
		print("Mouse not found")
		return 
	end
	equipped=true
	mouse.Icon="rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		onButton1Down(mouse)
	end)
end)

sp.Unequipped:connect(function()
	equipped=false
	handle.Transparency=1
	randomcolor()
end)
-----------------------------------------ONLY EDIT THESE VALUES!!!!!-----------------------------------------
-----!Instructions!-----
--Make sure you have a part in the gun named Barrel, it is where the raycast will shoot from.--
--Just place this script into any gun and edit the values below.--
--Editting anything else will risk breaking it.--
------------------------
Damage = 18
SPS = 16 -- Shots Per Second, gives a limit of how fast the gun shoots.
Recoil = 6 -- [1-10] [1 = Minigun, 10 = Sniper]
WallShoot = false -- Shoots through walls.
GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
BulletColor = "Cool yellow" -- Any Brickcolor will work.
Flash = true
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 100
	plrData.Classes.Base.Smasher.Obtained.Value = true
	plrData.Classes.Base.Smasher.HammerShatterAbility.Value = true
end
--//Settings\-- 
local Save_Wait_Time = 60 
local Auto_Save = true 
local Save_On_Leave = true 

function onPlayerEntered(newPlayer) 
	local datafolder = Instance.new("Folder") 
	datafolder.Parent = DataFolder 
	datafolder.Name = newPlayer.UserId 
	local DataValue = DataFolder.Data:clone() 
	DataValue.Parent = DataFolder[newPlayer.UserId] 
	local Data = DataValue:GetChildren() 
	local DataTable = {} 
	for i=1,#Data do 
		local n = Data[i].Name 
		DataTable[n] = Data[i].Value 
	end 
	--GetData--
	local DataStore = DataStoreService:GetDataStore(newPlayer.userId) 
	if DataStore:GetAsync("Save") == nil then 
		local succeed, errormsg = pcall(function()
			DataStore:SetAsync("Save", DataTable) 
		end) 
		if succeed then 
			print("Data saved correctly") 
		else 
			print("Error: ".. errormsg) 
		end 
	end 

	local succeed, errormsg = pcall(function() 
		DataTable = DataStore:GetAsync("Save") 
	end) 
	if succeed then 
		print("Data received correctly") 
	else 
		print("Error: ".. errormsg) 
	end 
	--LoadData-- 
	local DataToLoad = DataValue:GetChildren() 
	for i=1,#DataToLoad do 
		local n = DataToLoad[i].Name 
		if DataTable[n] ~= nil then 
			DataToLoad[i].Value = DataTable[n] 
		end 
	end 
end 

game.Players.PlayerAdded:connect(onPlayerEntered) 

if Save_On_Leave then 
	game.Players.PlayerRemoving:connect(function(Player) 
		--SaveData-- 
		local DataStore = DataStoreService:GetDataStore(Player.userId) 
		local Data = DataFolder[Player.UserId].Data:GetChildren() 
		local DataTable = {} 
		for i=1,#Data do 
			local n = Data[i].Name 
			DataTable[n] = Data[i].Value 
		end 
		local succeed, errormsg = pcall(function() 
			DataStore:SetAsync("Save", DataTable) 
		end) 
		if succeed then 
			print("Data saved correctly") 
		else 
			print("Error: ".. errormsg) 
		end 
		DataFolder[Player.UserId]:Destroy() 
	end)
end 

local DataSaveTable = {} 

if Auto_Save == true then 
	while wait(1) do 
		for _, Player in pairs(game.Players:GetPlayers()) do
			if not DataSaveTable[Player] then 
				DataSaveTable[Player] = tick() 
			elseif tick() - DataSaveTable[Player] >= Save_Wait_Time then 
				print("Saved") 
				DataSaveTable[Player] = tick() 
				local DataStore = DataStoreService:GetDataStore(Player.userId) 
				local Data = DataFolder[Player.UserId].Data:GetChildren() 
				local DataTable = {} 
				for i=1,#Data do 
					local n = Data[i].Name 
					DataTable[n] = Data[i].Value 
				end 
				local succeed, errormsg = pcall(function() 
					DataStore:SetAsync("Save", DataTable) 
				end) 
				if succeed then 
					print("Data saved correctly") 
				else 
					print("Error: "..errormsg) 
				end 
			end 
		end 
	end 
end
--[[Steering]]

	function Steering(dt)
		local deltaTime = (60/(1/dt))
		--Mouse Steer
		if _MSteer then
			local msWidth = math.max(1,mouse.ViewSizeX*_Tune.Peripherals.MSteerWidth/200)
			local mdZone = _Tune.Peripherals.MSteerDZone/100
			local mST = ((mouse.X-mouse.ViewSizeX/2)/msWidth)
			if math.abs(mST)<=mdZone then
				_GSteerT = 0
			else
				_GSteerT = (math.max(math.min((math.abs(mST)-mdZone),(1-mdZone)),0)/(1-mdZone))^_Tune.MSteerExp * (mST / math.abs(mST))
			end
		end
		
		_GSteerC = (_GSteerC+((_GSteerT-_GSteerC)*(_Tune.LeanSpeed*deltaTime)))
		
		--Apply Steering
		bike.Body.bal.LeanGyro.cframe = CFrame.new(bike.Body.bal.CFrame.p,bike.Body.bal.CFrame.p+bike.Body.bal.CFrame.lookVector)*CFrame.Angles(0,0,((_GSteerC*_Tune.LeanProgressiveness)*(math.rad(_Tune.MaxLean)/(bike.DriveSeat.Velocity.Magnitude+_Tune.LeanProgressiveness))-(_GSteerC*math.rad(_Tune.MaxLean))))
		
		--Apply Low Speed Steering
		bike.FrontSection.TripleTreeHinge.SteeringGyro.CFrame=bike.Body.SteeringHinge.CFrame*CFrame.Angles(math.rad(_GSteerT*_Tune.SteerAngle),0,0)
		bike.FrontSection.TripleTreeHinge.SteeringGyro.MaxTorque = Vector3.new(_Tune.SteerMaxTorque*((math.max((_Tune.LowSpeedCut-bike.DriveSeat.Velocity.Magnitude)/_Tune.LowSpeedCut,0))^2),0,0)
	end
--[[
	TweenSequence Editor Animator
]]

local TweenSequenceUtils = script.Parent
local Track = require(TweenSequenceUtils.Track)

local Animator = {}

function Animator.new(tweens, root)
	local newAnimator = {}

	for _, tween in pairs(tweens:GetChildren()) do
		local tweenTable = require(tween)
		newAnimator[tween.Name] = Track.new(root, tweenTable, tween)
	end
	
	function newAnimator:SetOrigin(origin)
		for _, animation in pairs(newAnimator) do
			if type(animation) == "table" then
				animation:SetOrigin(origin)
			end
		end
	end

	function newAnimator.StopAll()
		for _, animation in pairs(newAnimator) do
			if type(animation) == "table" then
				animation:Stop()
			end
		end
	end

	return newAnimator
end

return Animator
--//Toggle event//--
script.Parent.Button1.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		Door.Button1.Click:Play()
		DoorMain.Sound:Play()
		Open()
		wait(1)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		Door.Button1.Click:Play()
		DoorMain.Sound:Play()
		Close()
		wait(1)
		DoorStatus = "Closed"
		Debounce = false
	end
end)

script.Parent.Button2.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		Door.Button2.Click:Play()
		DoorMain.Sound:Play()
		Open()
		wait(1)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		Door.Button2.Click:Play()
		DoorMain.Sound:Play()
		Close()
		wait(1)
		DoorStatus = "Closed"
		Debounce = false
	end
	end)
-- Setup selection camera
local SelectedCamera = Instance.new("Camera")
SelectedCamera.Parent = Selected
SelectedCamera.FieldOfView = 30
Selected.CurrentCamera = SelectedCamera
--[[ --------- ]]--
function speed(run)
	if run then
		if not running then 
			running = true 
			script.Running.Value = true
			for i = 1, 8 do
				game.Workspace.CurrentCamera.FieldOfView = (90 + (i * 2))
				r.Stepped:wait()
			end
		end
	else
		if running then
			running = false
			script.Running.Value = false
			for i = 1, 8 do
				game.Workspace.CurrentCamera.FieldOfView = (90 - (i * 2))
				r.Stepped:wait()
			end
		end
	end
end
mouse.KeyDown:connect(function(key)
	if (string.byte(key:lower()) == 48)then
		script.Parent.LoadingBar.Stamina.Text = ("Stamina")
		speed(true)
		
		mouse.KeyUp:connect(function(key)
			if (string.byte(key:lower()) == 48)then
				speed(false)
			end
		end)
	end
end)

while true do
	r.Stepped:wait(0.10)
	if running then
		if not (Bar.Size == UDim2.new(0, 0, 0.9, 0)) then
			if not (Bar.Size.X.Scale - 0.01 <= 0) then
				Bar:TweenSize(UDim2.new((Bar.Size.X.Scale - 0.01), 0, Bar.Size.Y.Scale, 0), Out, "Sine", 0.10, true, nil)
			else
				Bar:TweenSize(UDim2.new(Bar.Size.X.Scale - (-(0-Bar.Size.X.Scale)), 0, Bar.Size.Y.Scale, 0),Out, "Sine", 0.10, true, nil)
			end
		else
			speed(false)
		end
		if Bar.Size.X.Scale < 0.05 then
			speed(false)
		end
	else
		if not (Bar.Size == UDim2.new(0.985, 0, 0.9, 0)) then
			if not (Bar.Size.X.Scale + 0.005 >= 0.985) then
				wait(0.15)
				Bar:TweenSize(UDim2.new((Bar.Size.X.Scale + 0.005), 0, Bar.Size.Y.Scale, 0), Out, "Sine", 0.10, true, nil)
			else
				wait(0.15)
				Bar:TweenSize(UDim2.new(Bar.Size.X.Scale + (0.985-Bar.Size.X.Scale), 0, 0.9, 0),Out, "Sine", 0.10, true, nil)
			end
		end
	end
end
--Heat Limit
if Heat <= 0 then
enabled = true
Heat = 0
end

if Heat >= 150 then
enabled = false
Heat = 150
end

rotvalueB1 = rotvalueB1 + Spin
rotvalueB2 = rotvalueB2 + Spin
rotvalueB3 = rotvalueB3 + Spin
rotvalueB4 = rotvalueB4 + Spin
rotvalueB5 = rotvalueB5 + Spin
rotvalueB6 = rotvalueB6 + Spin

Tool.B1.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB1)) * Dist, 0, math.cos(math.rad(rotvalueB1)) * Dist)
Tool.B2.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB2)) * Dist, 0, math.cos(math.rad(rotvalueB2)) * Dist)
Tool.B3.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB3)) * Dist, 0, math.cos(math.rad(rotvalueB3)) * Dist)
Tool.B4.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB4)) * Dist, 0, math.cos(math.rad(rotvalueB4)) * Dist)
Tool.B5.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB5)) * Dist, 0, math.cos(math.rad(rotvalueB5)) * Dist)
Tool.B6.Mesh.Offset = Vector3.new(math.sin(math.rad(rotvalueB6)) * Dist, 0, math.cos(math.rad(rotvalueB6)) * Dist)

game.Players.LocalPlayer.PlayerGui.OverheatBar.HeatRed.Size = UDim2.new(0, Heat, 0, 10)
wait()

end
end



Tool.Equipped:connect(onEquippedLocal)
Tool.Equipped:connect(onEquippedLocal2)
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(equip1)
script.Parent.Unequipped:connect(unequip1)
-- New ProfileStore:

function ProfileService.GetProfileStore(profile_store_name, profile_template) --> [ProfileStore]
	if type(profile_store_name) ~= "string" then
		error("[ProfileService]: profile_store_name must be a string")
	elseif string.len(profile_store_name) == 0 then
		error("[ProfileService]: Invalid profile_store_name")
	end

	if type(profile_template) ~= "table" then
		error("[ProfileService]: Invalid profile_template")
	end

	local profile_store
	profile_store = {
		Mock = {
			LoadProfileAsync = function(_, profile_key, not_released_handler)
				return profile_store:LoadProfileAsync(profile_key, not_released_handler, UseMockTag)
			end,
			GlobalUpdateProfileAsync = function(_, profile_key, update_handler)
				return profile_store:GlobalUpdateProfileAsync(profile_key, update_handler, UseMockTag)
			end,
			ViewProfileAsync = function(_, profile_key)
				return profile_store:ViewProfileAsync(profile_key, UseMockTag)
			end,
			WipeProfileAsync = function(_, profile_key)
				return profile_store:WipeProfileAsync(profile_key, UseMockTag)
			end
		},

		_profile_store_name = profile_store_name,
		_profile_template = profile_template,
		_global_data_store = nil,
		_loaded_profiles = {},
		_profile_load_jobs = {},
		_mock_loaded_profiles = {},
		_mock_profile_load_jobs = {},
		_is_pending = false,
	}
	if IsLiveCheckActive == true then
		profile_store._is_pending = true
		coroutine.wrap(function()
			WaitForLiveAccessCheck()
			if UseMockDataStore == false then
				profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name)
			end
			profile_store._is_pending = false
		end)()
	else
		if UseMockDataStore == false then
			profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name)
		end
	end
	setmetatable(profile_store, ProfileStore)
	return profile_store
end
-- Get the BanPlayer RemoteFunction from ReplicatedStorage
local banPlayerRemote = ReplicatedStorage:WaitForChild("KickPlayer")
--Supercharger
local Whine_Pitch = 1.3		--max pitch of the whine (not exact so might have to mess with it)
local S_Loudness = 1.3 --volume of the supercharger(s) (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)

if not _Tune.Engine then return 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 = _Tune.Turbochargers
local _SCount = _Tune.Superchargers

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/((_Tune.T_Boost*_TCount)+(_Tune.S_Boost*_SCount)))*2)
	local tpsi = (((script.Parent.Values.BoostTurbo.Value)/(_Tune.T_Boost*_TCount))*2)
	local spsi = ((script.Parent.Values.BoostSuper.Value)/(_Tune.S_Boost*_SCount))
	--(script.Parent.Values.RPM.Value/_Tune.Redline)
	local WP,WV,BP,BV,HP,HV = 0,0,0,0,0,0
	
	BOVact = math.floor(tpsi*20)
	if _TCount~=0 then
		WP = (tpsi)
		WV = (tpsi/4)*T_Loudness
		
		BP = (1-(-tpsi/20))*BOV_Pitch
		BV = (((-0.5+((tpsi/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
	else
		WP,WV,BP,BV=0,0,0,0
	end
	if _SCount~=0 then
		HP = (script.Parent.Values.RPM.Value/_Tune.Redline)*Whine_Pitch
		HV = (spsi/4)*S_Loudness
	else
		HP,HV = 0,0
	end

	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)
	
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(tpsi*20)
		ticc = tick()
	end
end