Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- ROBLOX deviation: taken from http://notebook.kulchenko.com/algorithms/alphanumeric-natural-sorting-for-humans-in-lua
-- as an approximation of naturalCompare for now


local function alphanumsort(o)
	local function padnum(d)
		return ("%03d%s"):format(string.len(d), d)
	end
	table.sort(o, function(a, b)
		return tostring(a):gsub("%d+", padnum) < tostring(b):gsub("%d+", padnum)
	end)
	return o
end
-- Déclenche la fonction de déplacement vers la source d'eau périodiquement


while true do
	-- Obtient tous les NPCs dans le jeu
	local npcs = game.Workspace:GetChildren()

	-- Parcours de chaque NPC
	for _, npc in ipairs(npcs) do
		-- Vérifie si le NPC est un modèle de personnage
		if npc:IsA("Model") and npc:FindFirstChild("Humanoid") then
			-- Déplace le NPC vers la source d'eau la plus proche
			moveToWaterSource(npc)
		end
	end

	-- Pause pour éviter d'utiliser trop de ressources
	wait(1)
end
-- connect events


findHumanity(Figure).Died:connect(onDied)
findHumanity(Figure).Running:connect(onRunning)
findHumanity(Figure).Jumping:connect(onJumping)
findHumanity(Figure).Climbing:connect(onClimbing)
findHumanity(Figure).GettingUp:connect(onGettingUp)
findHumanity(Figure).FreeFalling:connect(onFreeFall)
findHumanity(Figure).FallingDown:connect(onFallingDown)
findHumanity(Figure).Seated:connect(onSeated)
findHumanity(Figure).PlatformStanding:connect(onPlatformStanding)
findHumanity(Figure).Swimming:connect(onSwimming)
--Automatic Gauge Scaling


if autoscaling then
	local Drive={}
	if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
		if car.Wheels:FindFirstChild("FL")~= nil then
			table.insert(Drive,car.Wheels.FL)
		end
		if car.Wheels:FindFirstChild("FR")~= nil then
			table.insert(Drive,car.Wheels.FR)
		end
		if car.Wheels:FindFirstChild("F")~= nil then
			table.insert(Drive,car.Wheels.F)
		end
	end
	if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
		if car.Wheels:FindFirstChild("RL")~= nil then
			table.insert(Drive,car.Wheels.RL)
		end
		if car.Wheels:FindFirstChild("RR")~= nil then
			table.insert(Drive,car.Wheels.RR)
		end
		if car.Wheels:FindFirstChild("R")~= nil then
			table.insert(Drive,car.Wheels.R)
		end
	end

	local wDia = 0
	for i,v in pairs(Drive) do
		if v.Size.x>wDia then wDia = v.Size.x end
	end
	Drive = nil
	for i,v in pairs(UNITS) do
		v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive)
		v.spInc = math.max(math.ceil(v.maxSpeed/200)*20,20)
	end
end

if 	script.Parent.Parent.IsOn.Value then
end

script.Parent.Parent.IsOn.Changed:connect(function()
	if script.Parent.Parent.IsOn.Value then
	end
end)


script.Parent.Parent.Values.Gear.Changed:connect(function()
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then gearText = "N"
	elseif gearText == -1 then gearText = "R"
	end
	script.Parent.Gear.Text = gearText
end)

function PBrake()
	script.Parent.PBrake.Visible = script.Parent.Parent.Values.PBrake.Value
end
script.Parent.Parent.Values.PBrake.Changed:connect(PBrake)

script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

script.Parent.Speed.MouseButton1Click:connect(function()
	if currentUnits==#UNITS then
		currentUnits = 1
	else
		currentUnits = currentUnits+1
	end
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

wait(.1)
PBrake()
-- (Hat Giver Script - Loaded.)



debounce = true

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

script.Parent.Touched:connect(onTouched)
--[[ << MODIFY COMMANDS >>
This allows you to change the permission type required to use a command
Format:  ["CommandName"] = "PermissionName" ;																																																]]


ModifiedCommands={
	["fly"] = "Mod" ; -- This changes the command so that Mods (or above) can use it
}																																																											;Version = 1.3;--[[Don't edit this, otherwise the commands may break]]}
--damage = 25
--firedheight = ball.Position.Y
--highestpos = ball.Position.Y-2
--explodetimer = 0
--exploded = false
--magnitude = (ball.Position-ball.TargetPredictedPosition.Value).Magnitude
--firedpos = ball.Position
--Debris = game:GetService("Debris")


wait(0.1)

function onTouched(hit)
--!strict
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger


local isInteger = require(script.Parent.isInteger)
local MAX_SAFE_INTEGER = require(script.Parent.MAX_SAFE_INTEGER)

return function(value)
	return isInteger(value) and math.abs(value) <= MAX_SAFE_INTEGER
end
--[[
	
	FIELDS:
	
		Gamepad.IsConnected           > true|false
	
	
	METHODS:
	
		Gamepad:IsDown(keyCode)       > true|false
		Gamepad:GetInput(keyCode)     > returns InputObject associated with keycode (nil if none)
		Gamepad:GetPosition(keyCode)  > Vector3 (will return 0,0,0 if no keycode available)
	
	
	EVENTS:
	
		Gamepad.ButtonDown(keyCode)
		Gamepad.ButtonUp(keyCode)
		Gamepad.Changed(keyCode)
		Gamepad.Connected()
		Gamepad.Disconnected()
	
--]]




local GAMEPAD1 = Enum.UserInputType.Gamepad1
local ZERO_VECTOR = Vector3.new()

local buttonDown = Instance.new("BindableEvent")
local buttonUp = Instance.new("BindableEvent")
local changed = Instance.new("BindableEvent")
local connected = Instance.new("BindableEvent")
local disconnected = Instance.new("BindableEvent")

local down = {}
local state = {}



local Gamepad = {
	IsConnected = game:GetService("UserInputService"):GetGamepadConnected(GAMEPAD1);
	ButtonDown = buttonDown.Event;
	ButtonUp = buttonUp.Event;
	Changed = changed.Event;
	Connected = connected.Event;
	Disconnected = disconnected.Event;
}

function Gamepad:IsDown(keyCode)
	return (down[keyCode] == true)
end

function Gamepad:GetInput(keyCode)
	return state[keyCode]
end

function Gamepad:GetPosition(keyCode)
	local input = self:GetInput(keyCode)
	if (input) then
		return input.Position
	end
	return ZERO_VECTOR
end



function Reset()
	down = {}
	state = {}
end


function GetState()
	-- Map KeyCodes to corresponding InputObjects on the gamepad:
	local s = game:GetService("UserInputService"):GetGamepadState(GAMEPAD1)
	for _,inputObj in pairs(s) do
		state[inputObj.KeyCode] = inputObj
	end
end


function InputBegan(input, processed)
	if (input.UserInputType == GAMEPAD1) then
		down[input.KeyCode] = true
		buttonDown:Fire(input.KeyCode)
	end
end


function InputEnded(input, processed)
	if (input.UserInputType == GAMEPAD1) then
		down[input.KeyCode] = false
		buttonUp:Fire(input.KeyCode)
	end
end


function InputChanged(input, processed)
	if (input.UserInputType == GAMEPAD1) then
		changed:Fire(input.KeyCode)
	end
end


function GamepadConnected(gamepad)
	if (gamepad == GAMEPAD1) then
		Gamepad.IsConnected = true
		GetState()
		connected:Fire()
	end
end


function GamepadDisconnected(gamepad)
	if (gamepad == GAMEPAD1) then
		Gamepad.IsConnected = false
		Reset()
		disconnected:Fire()
	end
end


game:GetService("UserInputService").InputBegan:Connect(InputBegan)
game:GetService("UserInputService").InputEnded:Connect(InputEnded)
game:GetService("UserInputService").InputChanged:Connect(InputChanged)
game:GetService("UserInputService").GamepadConnected:Connect(GamepadConnected)
game:GetService("UserInputService").GamepadDisconnected:Connect(GamepadDisconnected)


if (Gamepad.IsConnected) then
	GetState()
end


return Gamepad
-------------------------


function onClicked()
R.BrickColor = BrickColor.new("Really red")
C.Two.BrickColor = BrickColor.new("Really black")
C.Three.BrickColor = BrickColor.new("Really black")
C.Four.BrickColor = BrickColor.new("Really black")
C.MIC.BrickColor = BrickColor.new("Really black")
C.A.BrickColor = BrickColor.new("Really black")
C.B.BrickColor = BrickColor.new("Really black")
C.M.BrickColor = BrickColor.new("Really black")
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--// Global Wrapping


Enum = service_Wrap(Enum, true)
rawequal = service.RawEqual
script = service_Wrap(script, true)
game = service_Wrap(game, true)
workspace = service_Wrap(workspace, true)
Instance = {
	new = function(obj, parent)
		local nobj = oldInstNew(obj)
		local par = parent and service_UnWrap(parent)
		if par then nobj.Parent = par end
		return service_Wrap(nobj, true)
	end
}
require = function(obj)
	return service_Wrap(oldReq(service_UnWrap(obj)), true)
end

client.Service = service
client.Module = service_Wrap(client.Module, true)
--[[
	SERVER PLUGINS' NAMES MUST START WITH "Server:" OR "Server-"
	CLIENT PLUGINS' NAMES MUST START WITH "Client:" OR "Client-"

	Plugins have full access to the server/client tables and most variables.

	You can use the MakePluginEvent to use the script instead of setting up an event.
	PlayerChatted will get chats from the custom chat and nil players.
	PlayerJoined will fire after the player finishes initial loading
	CharacterAdded will also fire after the player is loaded, it does not use the CharacterAdded event.

	service.Events.PlayerChatted(function(plr, msg)
		print(`{msg} from {plr.Name} Example Plugin`)
	end)

	service.Events.PlayerAdded(function(p)
		print(`{p.Name} Joined! Example Plugin`)
	end)

	service.Events.CharacterAdded(function(p)
		server.RunCommand('name', plr.Name, 'BobTest Example Plugin')
	end)

--]]



return function(Vargs)
	local server, service = Vargs.Server, Vargs.Service

	server.Commands.ExampleCommand = {
		Prefix = server.Settings.Prefix;	-- Prefix to use for command
		Commands = {"example"};	-- Commands
		Args = {"arg1"};	-- Command arguments
		Description = "Example command";	-- Command Description
		Hidden = true; -- Is it hidden from the command list?
		Fun = false;	-- Is it fun?
		AdminLevel = "Players";	    -- Admin level; If using settings.CustomRanks set this to the custom rank name (eg. "Baristas")
		Function = function(plr,args)    -- Function to run for command
			print("HELLO WORLD FROM AN EXAMPLE COMMAND :)")
			print(`Player supplied args[1] {args[1]}`)
		end
	}
end
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)



local anims = {}
local lastAttack= tick()

local target,targetType

local lastLock = tick()

local fleshDamage = 15
local structureDamage = 10

local path = nil


for _,animObject in next,animations do
anims[animObject.Name] = hum:LoadAnimation(animObject)
end

function Attack(thing,dmg)
if tick()-lastAttack > 2 then
hum:MoveTo(root.Position)
lastAttack = tick()
anims.AntWalk:Stop()
anims.AntMelee:Play()

if thing.ClassName == "Player" then
root.FleshHit:Play()
ant:SetPrimaryPartCFrame(CFrame.new(root.Position,Vector3.new(target.Character.PrimaryPart.Position.X,root.Position.Y,target.Character.PrimaryPart.Position.Z)))

elseif thing.ClassName == "Model" then
root.StructureHit:Play()
end

Rep.Relay.NPCAttack:Fire(thing,dmg) 
end
end


function Move(point)
hum:MoveTo(point)
if not anims.AntWalk.IsPlaying then
anims.AntWalk:Play()
end
end

function ScanForPoint()
local newPoint
local rayDir = Vector3.new(math.random(-100,100)/100,0,math.random(-100,100)/100)
local ray = Ray.new(root.Position,rayDir*math.random(10,50),ant)
local part,pos = workspace:FindPartOnRay(ray)
Move(pos)
enRoute = true
end
-- Check if shift key, mobile sprint button, or Xbox gamepad button is being held down


local function checkSprintKeyDown()
	if UserInputService.TouchEnabled then
		local sprintButton = game:GetService("ReplicatedStorage"):WaitForChild("SprintButton")
		return sprintButton:IsPressed()
	elseif UserInputService.GamepadEnabled then
		return UserInputService:IsGamepadButtonDown(Enum.UserInputType.Gamepad1, Enum.KeyCode.ButtonL2)
	else
		return UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift)
	end
end
-- You may turn both of these on at once. In that case, zone-specific music will play in the appropriate zones, and global background music will play whenever you're not within any zone.



	
settings.DisplayMuteButton = true  -- If set to true, there will be a button in the bottom-right corner of the screen allowing players to mute the background music.
	
settings.MusicFadeoutTime = 2  -- How long music takes to fade out, in seconds.

settings.MusicOnlyPlaysWithinZones = false  -- (This setting only applies when UseGlobalBackgroundMusic is set to false) If a player walks into an area that's not covered by any music zone, what should happen? If true, music will stop playing. If false, the music from the previous zone will continue to play.

return settings
--!nonstrict
-- Roblox character sound script



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

local AtomicBinding = require(script:WaitForChild("AtomicBinding"))

local function loadFlag(flag: string)
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled(flag)
	end)
	return success and result
end

local FFlagUserAtomicCharacterSoundsUnparent = loadFlag("UserAtomicCharacterSoundsUnparent")

local SOUND_DATA : { [string]: {[string]: any}} = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
	},
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxassetid://9083849830",
		Looped = true,
		Pitch = 1,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}
-- Folder where enemies are parented to upon spawning


local enemyFolder = game.Workspace.Targets

RideManager.EndCondition = {
	ReachedEnd = "You win!",
	PlatformDeath = "You lost!"
}

local function resetRide(platformObject)
	-- Destroy any remaining enemies
	for _, enemy in ipairs(enemyFolder:GetChildren()) do
		enemy:Destroy()
	end
	
	-- Deactivate all enemy spawners
	for _, spawner in ipairs(spawnerFolder:GetChildren()) do
		local isActive = spawner:WaitForChild("IsActive")
		isActive.Value = false
	end
	
	-- Deactivate effects on the platform 	
	for _, object in ipairs(platformObject:GetDescendants()) do
		if object:IsA("ParticleEmitter") then
			object.Enabled = false
		end
	end
end

function RideManager:setupRide(platformObject, difficulty)
	local hitpoints = platformObject:WaitForChild("Data"):WaitForChild("Hitpoints")
	hitpoints.Value = GameSettings.PlatformHealthDifficulty[difficulty]
	
	local positionToSet = platformObject:WaitForChild("Data"):WaitForChild("OriginalPos")
	platformObject:WaitForChild("PrimaryPart").CFrame = CFrame.new(positionToSet.Value)
end

function RideManager:endRide(platformObject)
	isGameActive.Value = false	
	PlayerManager.removePlayersFromGame()
	resetRide(platformObject)
end

return RideManager
--local InfoBindable = EventsFolder:FindFirstChild("GetInfo")
--local ToClient = EventsFolder:FindFirstChild("SendButtonToClient")


local Notification = EventsFolder:FindFirstChild("Notification")
local EditPlot = EventsFolder:FindFirstChild("EditPlot")

local MarketPlaceService = game:GetService("MarketplaceService")

local OwnerLabel = script.Parent.Parent.Parent.Parent.SignDescription.SurfaceGui.Frame.OwnerLabel

local StarterGui = game:GetService("StarterGui")
local StandNum = script.Parent.Parent.Parent.Parent.Name

local PriceFolder = StarterGui:FindFirstChild("SignPrices")
local UI = PriceFolder:WaitForChild(StandNum)

local Template = UI.ScrollingFrame:FindFirstChild("Template")


function Triggered(Player)

	local PlayerName = Player.Name

	if Owner.Value == nil or "NoOne" then -- If booth hasn't been claimed
		if Player:FindFirstChild("Owner") then  -- If Player has claimed one
			Notification:FireClient(Player,"Claimed") -- Let them know they already own one
		else -- If Player hasn't claimed one
			Owner.Value = PlayerName
			OwnerLabel.Text = PlayerName .. "'s Stand"
			Notification:FireClient(Player,true) -- Claimed

			local UserID = game:GetService("Players"):GetUserIdFromNameAsync(PlayerName)
			Bindable:Fire(script.Parent.Parent.Parent.Parent.Name, PlayerName, UserID)

			-- This should be for giving a player a value
			OwnerLabel.Parent.MoneyRaised.Text = Player.leaderstats.Raised.Value .. "$ Raised"

			local OwnerValue = Instance.new("IntValue")
			OwnerValue.Value = script.Parent.Parent.Parent.Parent.Name -- set int value to booth name
			OwnerValue.Name = "Owner"
			OwnerValue.Parent = Player

			-- Would this be the best way to do this? Yes, absolutely!

			-- We want the editPrompt to ONLY show for the client player.

			EditPlot:FireClient(Player, script.Parent.Parent.Parent.Parent.Name, true)
			Prompt.Enabled = false
		end
	end	
end

script.Parent.Triggered:Connect(Triggered)


local Players = game:GetService("Players")
local RemoveButtonsFromClient = EventsFolder:FindFirstChild("RemoveButtonFromClient")

Players.PlayerRemoving:Connect(function(player)
	local plrRemovingName = player.Name
	if plrRemovingName == Owner.Value then
		RemoveButtonsFromClient:FireAllClients(script.Parent.Parent.Parent.Parent.Name)
		Owner.Value = "NoOne"
		EditPlot:FireClient(player, script.Parent.Parent.Parent.Parent.Name, false)
		Prompt.Enabled = true

		OwnerLabel.Text = "No One's Stand"
		script.Parent.Parent.Parent.Parent.SignTitle.SurfaceGui.Frame.SignLabel.Text = "PLS DONATE"
		OwnerLabel.Parent.MoneyRaised.Text = "0$ Raised"

		local Children = StarterGui.SignPrices[script.Parent.Parent.Parent.Parent.Name].ScrollingFrame:GetChildren()
		for _, child in ipairs(Children) do
			if child:IsA("Frame") and child.Name ~= "Template" then
				child:Destroy()
			end
		end
	else
		return -- Not the Owner
	end
end)
-- connections


script.Parent:WaitForChild('ClickDetector').MouseClick:connect(OpenShop)
script.Parent.Touched:connect(function(part)
	local hitCharacter, hitHumanoid = FindCharacterAncestor(part)
	--
	if hitCharacter then
		local player = game.Players:GetPlayerFromCharacter(hitCharacter)
		if player then
			OpenShop(player)
		end
	end
end)
--------------------------------------------------------------------------



local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= .4	,
	FTargetFriction	= 1.1	,
	FMinFriction 	= 1.0	,
	
	RWearSpeed		= .4	,
	RTargetFriction	= 1.4	,
	RMinFriction	= 1.3	,
	
	--Tire Slip
	TCSOffRatio		= 1/3	,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= .5		,	--SS6 Default = .5
	RElasticity		= .5		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


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

script:WaitForChild("Rev")

if not FE then
	for i,v in pairs(car.DriveSeat:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.DriveSeat
	end
	
	car.DriveSeat.Rev:Play()
	
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
	end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
	handler:FireServer("playSound","Rev")
	local pitch=0
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
		if script.Parent:FindFirstChild("DriveMode").Value ~= "Comfort" then
		 	handler:FireServer("updateSound","Rev",script.Rev.SoundId,pitch,script.Rev.Volume*2)
		else
			handler:FireServer("updateSound","Rev",script.Rev.SoundId,pitch/1.2,script.Rev.Volume/1.2)
		end
	end
end
-- testing metatables since its been forever since ive used them


local Char = {
	Template = {
		Name = "";
	}
};
function Char:Test()
	print(1);
	self.Name = "joe";
	print(self.Name);
end

function Char:New(Data)
	local D = Data;
	setmetatable(D, self);
	D.Template = nil;
	self.__index = self;
	return D;
end



local q = Char.Template;
q.Name = "Bob";




local Poop = {
	E = Char:New(q);
	Z = 1;
};


Poop.E:Test();
print(Poop.E.Name);
--[=[
	@within TableUtil
	@function Filter
	@param tbl table
	@param predicate (value: any, key: any, tbl: table) -> keep: boolean
	@return table

	Performs a filter operation against the given table, which can be used to
	filter out unwanted values from the table.

	For example:

	```lua
	local t = {A = 10, B = 20, C = 30}
	local t2 = TableUtil.Filter(t, function(value, key)
		return value > 15
	end)
	print(t2) --> {B = 40, C = 60}
	```
]=]


local function Filter<T>(t: { T }, predicate: (T, any, { T }) -> boolean): { T }
	assert(type(t) == "table", "First argument must be a table")
	assert(type(predicate) == "function", "Second argument must be a function")
	
	local newT = table.create(#t)
	
	if #t > 0 then
		local n = 0
		for i, v in t do
			if predicate(v, i, t) then
				n += 1
				newT[n] = v
			end
		end
	else
		for k, v in t do
			if predicate(v, k, t) then
				newT[k] = v
			end
		end
	end
	return newT
end