Pinkstack/roblox-luau-corpus-text huggingface dataset:
--Serverside logic


Event.OnServerEvent:Connect(function(player,ExhaustParticle,FireBool)
	
	print("ExhaustParticle")
	
	if FireBool then
		
		local RanNum = tostring(math.random(1,3))
		ExhaustPart["Backfire"..RanNum]:Play()
		ExhaustPart.PointLight.Enabled = true
		ExhaustPart[ExhaustParticle].Enabled = true
		
		if ExhaustParticle == "FlamesSmall" then 
			
			ExhaustPart.PointLight.Range = 6  
			ExhaustPart.PointLight.Brightness = 5
			ExhaustPart.Sparks.Enabled = false
			
		else 
			
			ExhaustPart.PointLight.Range = 8
			ExhaustPart.PointLight.Brightness = 12
			ExhaustPart.Sparks.Enabled = true
			
		end	
		
	else
		
		ExhaustPart[ExhaustParticle].Enabled = false
		ExhaustPart.PointLight.Enabled = false
		
	end	
	
end)


local car = script.Parent.Parent
local ExhaustPart = car.Body.ExhaustFlames2
local Event = script.Parent
--[[

	StreamableUtil.Compound(observers: {Observer}, handler: ({[child: string]: Instance}, janitor: Janitor) -> void): Janitor

	Example:

		local streamable1 = Streamable.new(someModel, "SomeChild")
		local streamable2 = Streamable.new(anotherModel, "AnotherChild")

		StreamableUtil.Compound({S1 = streamable1, S2 = streamable2}, function(streamables, janitor)
			local someChild = streamables.S1.Instance
			local anotherChild = streamables.S2.Instance
			janitor:Add(function()
				-- Cleanup
			end)
		end)

--]]




local Janitor = require(script.Parent.Janitor)
local _Streamable = require(script.Parent.Streamable)


type Streamables = {_Streamable.Streamable}
type CompoundHandler = (Streamables, any) -> nil


local StreamableUtil = {}


function StreamableUtil.Compound(streamables: Streamables, handler: CompoundHandler)
	local compoundJanitor = Janitor.new()
	local observeAllJanitor = Janitor.new()
	local allAvailable = false
	local function Check()
		if allAvailable then return end
		for _,streamable in pairs(streamables) do
			if not streamable.Instance then
				return
			end
		end
		allAvailable = true
		handler(streamables, observeAllJanitor)
	end
	local function Cleanup()
		if not allAvailable then return end
		allAvailable = false
		observeAllJanitor:Cleanup()
	end
	for _,streamable in pairs(streamables) do
		compoundJanitor:Add(streamable:Observe(function(_child, janitor)
			Check()
			janitor:Add(Cleanup)
		end))
	end
	compoundJanitor:Add(Cleanup)
	return compoundJanitor
end


return StreamableUtil
--theGAflash


wait(2)

local MarketplaceService = game:GetService("MarketplaceService")
local reciveModelPrompt = script.Parent.Parent.Parent.Parent:FindFirstChild("ClickDetector")
local productId = script.Parent.Parent.Parent.Parent:FindFirstChild("ID").Value
 
reciveModelPrompt.MouseClick:connect(function(player)

		MarketplaceService:PromptPurchase(player, productId)

end)
--[[
	READ ME
	

	-- Server API
	
	Network:BindFunctions(functions) 
	Network:BindEvents(events)
	
	Network:FireClient(client, name, ...)
	Network:FireAllClients(name, ...)
	Network:FireOtherClients(ignoreclient, name, ...)
	Network:FireOtherClientsWithinDistance(ignoreclient, distance, name, ...)
	Network:FireAllClientsWithinDistance(position, distance, name, ...)
	
	Network:InvokeClient(client, name, ...)  (same as below with timeout = 60)
	Network:InvokeClientWithTimeout(timeout, client, name, ...)
	
	Network:LogTraffic(duration)
	
	-- Internal overrideable methods, used for custom AllClients/OtherClients/WithinDistance selectors
	
	Network:GetPlayers()
	Network:GetPlayerPosition(player)
	
	-- Client API
	
	Network:BindFunctions(functions) 
	Network:BindEvents(events) 
	
	Network:FireServer(name, ...)
	
	Network:InvokeServer(name, ...) 
	Network:InvokeServerWithTimeout(timeout, name, ...)
	
	
	
	Notes:
	- The first return value of InvokeClient (but not InvokeServer) is bool success, which is false if the invocation timed out
	  or the handler errored.
	
	- InvokeServer will error if it times out or the handler errors

	- InvokeServer/InvokeClient do not return instantly on an error, but instead check for failure every 0.5 seconds. This is
	  because it is not possible to both instantly detect errors and have them be logged in the output with full stacktraces.
	
	
	
	For detailed API Use/Documentation, see
	https://devforum.roblox.com/t/easynetwork-creates-remotes-events-for-you-so-you-dont-have-to/
--]]




local Network = {}

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")

local EventHandlers = {}
local FunctionHandlers = {}

local IsStudio = RunService:IsStudio()
local IsServer = RunService:IsServer()

local LoggingNetwork
local function GetParamString(...)
	local tab = table.pack(...)
	local n = math.min(10, tab.n)
	
	for index = 1, n do 
		local value = tab[index]
		local valueType = typeof(tab[index])
		
		if valueType == "string" then
			tab[index] = string.format("%q[%d]", #value <= 18 and value or value:sub(1, 15) .. "...", #value)
		elseif valueType == "Instance" then
			local success, className = pcall(function() return value.ClassName end)
			tab[index] = success and string.format("%s<%s>", valueType, className) or valueType
		else
			tab[index] = valueType
		end
	end
	
	return table.concat(tab, ", ", 1, n) .. (tab.n > n and string.format(", ... (%d more)", tab.n - n) or "")
end

local DeferredHandlers = {}

local ReceiveCounter = 0
local InvokeCounter = 0

local Communication,FunctionsFolder,EventsFolder

if IsServer then
	Communication = Instance.new("Folder",ReplicatedStorage)
	Communication.Name = "Communication"
	FunctionsFolder = Instance.new("Folder",Communication)
	FunctionsFolder.Name = "Functions"
	EventsFolder = Instance.new("Folder",Communication)
	EventsFolder.Name = "Events"
else
	Communication = ReplicatedStorage:WaitForChild("Communication")
	FunctionsFolder = Communication:WaitForChild("Functions")
	EventsFolder = Communication:WaitForChild("Events")
end
--///////////////////////// Constructors
--//////////////////////////////////////



function module.new(channelName)
	local obj = setmetatable({}, methods)

	local BaseFrame, NameTag, NameTagNonSelect, NameTagSelect, NewMessageIcon, UnselectedFrame, SelectedFrame = CreateGuiObjects()
	obj.GuiObject = BaseFrame
	obj.NameTag = NameTag
	obj.NameTagNonSelect = NameTagNonSelect
	obj.NameTagSelect = NameTagSelect
	obj.NewMessageIcon = NewMessageIcon
	obj.UnselectedFrame = UnselectedFrame
	obj.SelectedFrame = SelectedFrame

	obj.BlueBarLeft = SelectedFrame.BlueBarLeft
	obj.BlueBarRight = SelectedFrame.BlueBarRight
	obj.BackgroundImage = SelectedFrame.BackgroundImage
	obj.WhiteTextNewMessageNotification = obj.NewMessageIcon.TextLabel

	obj.ChannelName = channelName
	obj.UnreadMessageCount = 0
	obj.Active = false

	obj.GuiObject.Name = "Frame_" .. obj.ChannelName

	if (string.len(channelName) > ChatSettings.MaxChannelNameLength) then
		channelName = string.sub(channelName, 1, ChatSettings.MaxChannelNameLength - 3) .. "..."
	end

	--obj.NameTag.Text = channelName

	obj.NameTag.Text = ""
	obj.NameTagNonSelect.Text = channelName
	obj.NameTagSelect.Text = channelName

	obj.AnimParams = {}

	obj:InitializeAnimParams()
	obj:AnimGuiObjects()
	obj:SetActive(false)

	return obj
end

return module
-- shut down the script when we die and reset things


Humanoid.Died:Connect(function()
	coroutine.close(ArmCoroutine)
	LeftShoulderClone:Destroy()
	RightShoulderClone:Destroy()
	Viewmodel:Destroy()
	if RightShoulder then
		RightShoulder.Enabled = true
	end
	if LeftShoulder then
		LeftShoulder.Enabled = true
	end
	LeftArm.Anchored = false
	RightArm.Anchored = false
	armTransparency = 0
	setArmVisibility(false)
end)

ArmCoroutine = coroutine.create(function()
	while true do
		SwaySize = script.WalkSwayMultiplier.Value
		-- checkFirstPerson() checks if camera is first person and enables/disables the Viewmodel accordingly
		checkFirstPerson()
		-- update loop
		if isFirstPerson == true then
			-- make arms visible
			setArmVisibility(true)
			-- update walk Sway if we are walking
			if checkPlayerRunning() then
				WalkSway = WalkSway:Lerp(CFrame.new((0.07*SwaySize) * math.sin(tick() * (2 * Humanoid.WalkSpeed/4)),(0.07*SwaySize) * math.cos(tick() * (4 * Humanoid.WalkSpeed/4)),0) * CFrame.Angles(0,0,(-.03*SwaySize) * math.sin(tick() * (2 * Humanoid.WalkSpeed/4))),0.2*Sensitivity)
			else
				WalkSway = WalkSway:Lerp(CFrame.new(), 0.05*Sensitivity)
			end
			--
			local delta = UserInputService:GetMouseDelta()
			--
			if IncludeCameraSway then
				Sway = Sway:Lerp(Vector3.new(delta.X,delta.Y,delta.X/2), 0.1*Sensitivity)
			end
			--
			if IncludeStrafe then
				StrafeSway = StrafeSway:Lerp(CFrame.Angles(0,0,-HumanoidRootPart.CFrame.rightVector:Dot(Humanoid.MoveDirection)/(20/SwaySize)), 0.1*Sensitivity)
			end
			--
			if IncludeJumpSway == true then
				JumpSway = JumpSwayGoal.Value
			end
			-- update animation transform for Viewmodel
			RightShoulderClone.Transform = RightShoulder.Transform
			LeftShoulderClone.Transform = LeftShoulder.Transform
			-- cframe the Viewmodel
			local SwayRotation = CFrame.Angles(math.rad(Sway.Y*SwaySize),math.rad(Sway.X*SwaySize)/10,math.rad(Sway.Z*SwaySize)/2)
			local OffsetVector3 = (Camera.CFrame.UpVector*(-1.7-(HeadOffset.Y+(AimOffset.Value.Y))))+(Camera.CFrame.LookVector*(HeadOffset.Z+(AimOffset.Value.Z)))+(Camera.CFrame.RightVector*(-HeadOffset.X-(AimOffset.Value.X)+(-(Sway.X*SwaySize)/75)))
			local SwayPosition = WalkSway*JumpSway*StrafeSway
			local OffsetCFrame = script.CFrameAimOffset.Value:Inverse()
			local FinalCFrame = ((Camera.CFrame * SwayPosition * SwayRotation) + OffsetVector3) * OffsetCFrame
			Viewmodel.PrimaryPart.CFrame = FinalCFrame
		end
		RunService.RenderStepped:Wait()
	end
end)

coroutine.resume(ArmCoroutine)

if (game.StarterPlayer.CameraMode == Enum.CameraMode.LockFirstPerson) or (game.StarterPlayer.CameraMaxZoomDistance <= 0.5) then
	toggleViewmodel(true)
end
--[[
	Provides a client-side API to interact with the server market, including pcalling the network
	request and wrapping the pcall result and server result together into one result.
--]]



local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Network = require(ReplicatedStorage.Source.Network)
local ItemCategory = require(ReplicatedStorage.Source.SharedConstants.ItemCategory)
local ItemPurchaseFailureReason =
	require(ReplicatedStorage.Source.SharedConstants.RequestFailureReason.ItemPurchaseFailureReason)

local MarketClient = {}

function MarketClient.requestItemPurchaseAsync(itemId: string, itemCategory: ItemCategory.EnumType, amount: number)
	-- invokeServerAsync wraps the request in a pcall, so we receive two success and result pairs:
	-- one from the pcall and one from the server's purchase request handler
	local networkRequestSuccess: boolean -- Result of the pcall wrapping the network request
	local networkRequestResult: string | boolean -- pcall network request failure reason, or purchase success result from the server
	local purchaseFailureReason: ItemPurchaseFailureReason.EnumType? -- Purchase rejection/failure reason from the server

	networkRequestSuccess, networkRequestResult, purchaseFailureReason =
		Network.invokeServerAsync(Network.RemoteFunctions.RequestItemPurchase, itemId, itemCategory, amount)

	-- Aggregate the network pcall success results with the purchase success results
	local overallSuccess = networkRequestSuccess and networkRequestResult :: boolean
	local eitherFailureReason = if networkRequestSuccess
		then purchaseFailureReason
		else tostring(networkRequestResult) :: string?

	return overallSuccess, eitherFailureReason
end
--[=[
	@class SoftShutdownConstants
]=]



local require = require(script.Parent.loader).load(script)

local Table = require("Table")

return Table.readonly({
	IS_SOFT_SHUTDOWN_LOBBY_ATTRIBUTE = "IsSoftShutdownLobby";
	IS_SOFT_SHUTDOWN_UPDATING_ATTRIBUTE = "IsSoftshutdownRebootingServers";
})
--[=[
	Constructs a new SpringObject.
	@param target T
	@param speed number | Observable<number> | ValueObject<number> | NumberValue | any
	@param damper number | Observable<number> | NumberValue | any
	@return Spring<T>
]=]


function SpringObject.new(target, speed, damper)
	local self = setmetatable({
		_maid = Maid.new();
		Changed = Signal.new();
	}, SpringObject)
--!nonstrict
-- polyfill for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof


return function(tbl, class)
	assert(typeof(class) == "table", "Received a non-table as the second argument for instanceof")

	if typeof(tbl) ~= "table" then
		return false
	end

	local ok, hasNew = pcall(function()
		return class.new ~= nil and tbl.new == class.new
	end)
	if ok and hasNew then
		return true
	end

	local seen = { tbl = true }

	while tbl and typeof(tbl) == "table" do
		tbl = getmetatable(tbl)
		if typeof(tbl) == "table" then
			tbl = tbl.__index

			if tbl == class then
				return true
			end
		end

		-- if we still have a valid table then check against seen
		if typeof(tbl) == "table" then
			if seen[tbl] then
				return false
			end
			seen[tbl] = true
		end
	end

	return false
end
--The button



script.Parent.Handle.ClickDetector.MouseClick:connect(function(click)

if not (on) then on = true--On
    script.Parent.W1.Transparency = 1
    script.Parent.W2.Transparency = 0
    
elseif (on) then on = false --Off
    script.Parent.W1.Transparency = 0
    script.Parent.W2.Transparency = 1
    end
end)
--FireBomb


game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local Humanoid = character:WaitForChild("Humanoid")
		Humanoid.Died:connect(function()
			if player.FireBomb.Value == 2 then
				player.FireBomb.Value = 1
				end
		end)
	end)
end)
game.Players.PlayerRemoving:Connect(function(player)
	if player.FireBomb.Value == 2 then
		player.FireBomb.Value = 1
	end
end)
-- Compiled with roblox-ts v2.0.4


local default = function(str, prefix)
	local strArr = string.split(str, "")
	local prefixArr = string.split(prefix, "")
	local l = 0
	local r = math.min(#str, #prefix) - 1
	while l <= r do
		local m = math.floor((l + r) / 2)
		if strArr[m + 1] == prefixArr[m + 1] then
			l = m + 1
		else
			r = m - 1
		end
	end
	return r + 1 >= #prefix
end
return {
	default = default,
}
--edit the function below to return true when you want this response/prompt to be valid
--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)
	return plrData.Classes.Super.Mage.Obtained.Value == true and plrData.Classes.Super.Mage.Fireball.Value ~= true
end
-- Compiled with roblox-ts v2.1.0


local TS = require(game:GetService("ReplicatedStorage"):WaitForChild("rbxts_include"):WaitForChild("RuntimeLib"))
local Renderable = TS.import(script, game:GetService("ReplicatedStorage"), "TS", "components").Renderable
local function renderable(world, _)
	for id, model in world:query(Renderable) do
		if not model.model:IsDescendantOf(game) then
			world:remove(id, Renderable)
		end
	end
	for _id, model in world:queryChanged(Renderable) do
		if model.old and (model.old.model and not model.new) then
			model.old.model:Destroy()
		end
	end
end
return renderable
--[=[
	@param parent Instance
	@param usePromise boolean
	@param namespace string?
	@return ClientComm
	Constructs a ClientComm object.

	If `usePromise` is set to `true`, then `GetFunction` will generate a function that returns a Promise
	that resolves with the server response. If set to `false`, the function will act like a normal
	call to a RemoteFunction and yield until the function responds.
]=]


function ClientComm.new(parent: Instance, usePromise: boolean, namespace: string?, janitor)
	assert(not IS_SERVER, "ClientComm must be constructed from the client")
	assert(typeof(parent) == "Instance", "Parent must be of type Instance")
	local ns = DEFAULT_COMM_FOLDER_NAME
	if namespace then
		ns = namespace
	end
	local folder: Instance? = parent:WaitForChild(ns, WAIT_FOR_CHILD_TIMEOUT)
	assert(folder ~= nil, "Could not find namespace for ClientComm in parent: " .. ns)
	local self = setmetatable({}, ClientComm)
	self._instancesFolder = folder
	self._usePromise = usePromise
	if janitor then
		janitor:Add(self)
	end
	return self
end
--Scripting -- Do not touch unless you know what to do--


if chassisversion == "Tyler" then
	antenna = car.DriveSeat
	driveseat.IsOn.Changed:connect(function()
		if driveseat.IsOn.Value == true then
			handler:FireServer("IsOn", "On")
		else
			handler:FireServer("IsOn","Off")
			end
	end)
elseif chassisversion == "Cat" then
	antenna = car.Body.Antenna
	car.Electrics.Changed:connect(function()
		if car.Electrics.Value == true then
			handler:FireServer("IsOn", "On")
		else
			handler:FireServer("IsOn", "Off")
		end
	end)
end
--[[[Default Controls]]


	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}
	
	--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.Z					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.M					,
		ToggleMouseDrive		= Enum.KeyCode.X					,
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,
		
		--Handbrake
		PBrake					= Enum.KeyCode.P					,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.DPadRight			,
	}
-- Properties


local held = false
local step = 0.01
local percentage = 0

function snap(number, factor)
	if factor == 0 then
		return number
	else
		return math.floor(number/factor+0.5)*factor
	end
end

UIS.InputEnded:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		held = false
	end
end)

SliderBtn.MouseButton1Down:connect(function()
	held = true
end)

RuS.RenderStepped:connect(function(delta)
	if game.Players.LocalPlayer.Character:FindFirstChild("Vibe Radio") then
		local MousePos = UIS:GetMouseLocation().X
		local BtnPos = SliderBtn.Position
		local SliderSize = Slider.AbsoluteSize.X
		local SliderPos = Slider.AbsolutePosition.X
		local pos = snap((MousePos-SliderPos)/SliderSize,step)
		percentage = math.clamp((game.Players.LocalPlayer.Character["Vibe Radio"]["Vibe radio"].bruH.speaker.Sound.TimePosition / game.Players.LocalPlayer.Character["Vibe Radio"]["Vibe radio"].bruH.speaker.Sound.TimeLength),0,1)
		SliderBtn.Position = UDim2.new(percentage,0,BtnPos.Y.Scale, BtnPos.Y.Offset)
	end
end)
-- / Functions / --


EventModule.ActivateEvent = function()
	local RandomPlayer = PlayingTeam:GetPlayers()[math.random(1, #PlayingTeam:GetPlayers())]
	
	if RandomPlayer then
		BadgeService:AwardBadge(RandomPlayer.UserId, Badges:FindFirstChild(script.Name).Value)
		
		local Backpack = RandomPlayer:WaitForChild("Backpack")
		
		if Backpack then
			local AmongUsPotion = Tools:WaitForChild("Among Us Potion"):Clone()
			
			AmongUsPotion.Parent = Backpack
		end
	end
end
--		for i=1,#points do
--			print("POINT #:",i,points[i])
--			Pets.Visualize[i].CFrame = CFrame.new(points[i])
--		end


		for i=1,#points do
			local point = points[i]
			
			local done = true
			repeat 
				local ray = Ray.new(point + Vector3.new(0,15,0), Vector3.new(0,-100,0))
				
				local part, intersection, normal = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
				if part and not part:IsA("Terrain") and not part.CanCollide then
					done = false
					point = intersection
					table.insert(ignore, part)
					wait()
				else
					if part then
						done = true
						height = char_cf:PointToObjectSpace(Vector3.new(0,intersection.Y,0)).Y + (size.Y/3)
					else
						return nil
					end
				end
			until done
			--if height then break end
			if height then
				table.insert(all_height, height)
			end
		end
-- Gamepad Input


local function GetGamepadInput(step)
	-- Get gamepad inputs
	local thumbstick1 = Gamepad:GetPosition(THUMBSTICK_1)
	local rt = Gamepad:IsDown(BUTTON_RT)
	
	-- Update control inputs
	engine.BoostInput = ((UpdateBoost(rt, step) and 1) or 0)
	engine.YawInput = ApplyDeadzone(thumbstick1.X)
	engine.PitchInput = ApplyDeadzone(thumbstick1.Y)
end -- GetGamepadInput()
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 700		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 1100		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8250		--		Use sliders to manipulate values
	Tune.Redline		= 9750		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5250
	Tune.PeakSharpness	= 5.8
	Tune.CurveMult		= 0.294 
	
	--Incline Compensation
	Tune.InclineComp	= 1.5		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 400		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 300		-- RPM decay when clutch is off
	Tune.RevBounce		= 450		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 450		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--]]




function getHumanoid(model)
	for _, v in pairs(model:GetChildren()) do
		if v:IsA'Humanoid' then
			return v
		end
	end
end


local ai = script.Parent
local human = getHumanoid(ai)
local hroot = ai.HumanoidRootPart
local zspeed = hroot.Velocity.magnitude


local pfs = game:GetService("PathfindingService")

function GetPlayerNames()
	local players = game:GetService('Players'):GetChildren()
	local name = nil
	for _, v in pairs(players) do
		if v:IsA'Player' then
			name = tostring(v.Name)
		end
	end
	return name
end

spawn(function()
	while wait() do
	end
end)

function GetPlayersBodyParts(t)
	local torso = t
	if torso then
		local figure = torso.Parent
		for _, v in pairs(figure:GetChildren()) do
			if v:IsA'Part' then
				return v.Name
			end
		end
	else
		return "HumanoidRootPart"
	end
end

function GetTorso(part)
	local chars = game.Workspace:GetChildren()
	local torso = nil
	for _, v in pairs(chars) do
		if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then
			local charRoot = v:FindFirstChild'HumanoidRootPart'
			if (charRoot.Position - part).magnitude < SearchDistance then
				torso = charRoot
			end
		end
	end
	return torso
end

for _, zambieparts in pairs(ai:GetChildren()) do
	if zambieparts:IsA'Part' then
		zambieparts.Touched:connect(function(p)
			if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= ai.Name then -- damage
				local enemy = p.Parent
				local enemyhuman = getHumanoid(enemy)
				enemyhuman:TakeDamage(aiDamage)
			end
		end)
	end
end
--s.Pitch = 0.7
--[[for x = 1, 50 do
s.Pitch = s.Pitch + 0.20 1.900
s:play()
wait(0.001)
end]]
--[[Chopper level 5=1.2, Chopper level 4=1.04]]


while s.Pitch<1.1 do
s.Pitch=s.Pitch+0.01315
s:Play()
if s.Pitch>1.1 then
	s.Pitch=1.1
end
wait(-9)
end

while true do
for x = 1, 500 do
s:play()
wait(-9)
end
end