Pinkstack/roblox-luau-corpus-text huggingface dataset:
--Click/Touch


local cmdBar = main.gui.CmdBar
local textBox = cmdBar.SearchFrame.TextBox
local arrowKeys = {[Enum.KeyCode.Left] = true, [Enum.KeyCode.Right] = true, [Enum.KeyCode.Up] = true, [Enum.KeyCode.Down] = true}
local movementKeys = {[Enum.KeyCode.Left]="Left",[Enum.KeyCode.Right]="Right",[Enum.KeyCode.Up]="Forwards",[Enum.KeyCode.Down]="Backwards",[Enum.KeyCode.A]="Left",[Enum.KeyCode.D]="Right",[Enum.KeyCode.W]="Forwards",[Enum.KeyCode.S]="Backwards", [Enum.KeyCode.Space]="Up", [Enum.KeyCode.R]="Up", [Enum.KeyCode.Q]="Down", [Enum.KeyCode.LeftControl]="Down", [Enum.KeyCode.F]="Down"}
main.movementKeysPressed = {}
main.userInputService.InputBegan:Connect(function(input, pressedUI)
	if (input.UserInputType == clickInput or input.UserInputType == touchInput) and (not pressedUI or frameDragging) and not main.mouseDown then
		main.mouseDown = true
		checkPressFunctions(input.Position)
	elseif not main.chatting or (cmdBar.Visible and #textBox.Text < 2) then
		local direction = movementKeys[input.KeyCode]
		if direction then
			table.insert(main.movementKeysPressed, direction)
		elseif input.KeyCode == Enum.KeyCode.E then
			for speedCommandName, _ in pairs(main.commandSpeeds) do
				if main.commandsActive[speedCommandName] then
					main:GetModule("cf"):EndCommand(speedCommandName)
				else
					main:GetModule("cf"):ActivateClientCommand(speedCommandName)
				end
			end
			
		elseif input.KeyCode == Enum.KeyCode.Quote or input.KeyCode == Enum.KeyCode.Semicolon then
			main:GetModule("CmdBar"):ToggleBar(input.KeyCode)
		end
	end
	if arrowKeys[input.KeyCode] then
		main:GetModule("CmdBar"):PressedArrowKey(input.KeyCode)
	end
end)
main.userInputService.InputEnded:Connect(function(input, pressedUI)
	local direction = movementKeys[input.KeyCode] 
	if input.UserInputType == clickInput or input.UserInputType == touchInput then
		main.mouseDown = false
	elseif direction then
		for i,v in pairs(main.movementKeysPressed) do
			if v == direction then
				table.remove(main.movementKeysPressed,i)
			end
		end
	end
end)
-- Connection class


local Connection = {}
Connection.__index = Connection

function Connection.new(signal, fn)
	return setmetatable({
		_connected = true,
		_signal = signal,
		_fn = fn,
		_next = false,
	}, Connection)
end

function Connection:Disconnect()
	self._connected = false

	-- Unhook the node, but DON'T clear it. That way any fire calls that are
	-- currently sitting on this node will be able to iterate forwards off of
	-- it, but any subsequent fire calls will not hit it, and it will be GCed
	-- when no more fire calls are sitting on it.
	if self._signal._handlerListHead == self then
		self._signal._handlerListHead = self._next
	else
		local prev = self._signal._handlerListHead
		while prev and prev._next ~= self do
			prev = prev._next
		end
		if prev then
			prev._next = self._next
		end
	end
end

Connection.Destroy = Connection.Disconnect
--[[Manage Plugins]]


	
		script.Parent["A-Chassis Interface"].Car.Value=car
	for i,v in pairs(script.Parent.Plugins:GetChildren()) do
		for _,a in pairs(v:GetDescendants()) do
			if a:IsA("RemoteEvent") or a:IsA("RemoteFunction") then 
				a.Parent=car
				for _,b in pairs(a:GetChildren()) do
					if b:IsA("Script") then b.Disabled=false end
				end	
			end
		end
		v.Parent = script.Parent["A-Chassis Interface"]
	end
	script.Parent.Plugins:Destroy()
--/////////////////////////////////////////////////////////--



local dZIndex 	 = 2
local dScrollBar = 4
local dBackground 	= Color3.new(31/255, 31/255, 31/255)
local dTransparency = 0
local dPixelSize 	= 0
local dBorder 		= Color3.new(27/255,42/255,53/255)
local dPosition 	= UDim2.new(0,5,0,5)
local dCanvasSize 	= UDim2.new(0, 0, 0, 0)
local dScrollImage 	= "http://roblox.com/asset?id=158348114"
local dTextColor = Color3.new(1,1,1)
local dSize 	 = UDim2.new(1,-10,1,-10)
local dFont 	 = "Gotham"
local dTextSize  = 15
local dPlaceholderColor = Color3.fromRGB(178, 178, 178)
local MouseIcons = {
	Horizontal = "rbxassetid://1243146213";
	Vertical = "rbxassetid://1243145985";
	LeftCorner = "rbxassetid://1243145459";
	RightCorner = "rbxassetid://1243145350";
	TopRight = "rbxassetid://1243145459";
	TopLeft = "rbxassetid://1243145350";
}
--------RIGHT DOOR --------


game.Workspace.doorright.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(106)

game.Workspace.doorright.l12.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(1013)

game.Workspace.doorright.l13.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(1023)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.Lighting.flashcurrent.Value = "12"
--	if (Health- ultimavida < 0) then
--		Sang.Value = Sang.Value + (Health - ultimavida)*((configuracao.BloodMult)*(configuracao.BloodMult)*(configuracao.BloodMult))
--		Dor.Value = math.clamp(Dor.Value+ (Health - ultimavida)*(-configuracao.PainMult), 0, 300)
--		MLs.Value = MLs.Value + ((ultimavida - Health) * (configuracao.BloodMult))
--	end
-- Player's tank GUI


GUI = script.Parent.Parent.Parent.PlayerGui.TankGUI;
GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value

local Hull = parts.Parent:findFirstChild("Damage")

if Hull.Value<0 then
	GUI.HP.Hitpoints.Text = "DISABLED"
end

	
local MGDamage = math.random(40,80)


braking = false;
firingMg = false;
reloading = false;
currRound = tankStats.Round; -- Current loaded ammo (AP/HE)


myMouse = nil;

function updateAmmo()
	GUI.Ammo.Text = "Cannon Ammo = " .. tankStats[tankStats.Round.Value .. "Ammo"].Value;
	GUI.MG_Ammo.Text = tankStats.MGAmmo.Value;
	GUI.HP.Hitpoints.Text = parts.Parent:findFirstChild("Damage").Value
end


function Brakes()
	for i = 1, 5 do
	parts.Engine.BodyVelocity.Velocity = Vector3.new(0,0,0)
	print("Brakes activated")
	end
end

Loaded = false
--[[ Constants ]]

--
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local TOUCH_CONTROLS_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"

local DYNAMIC_THUMBSTICK_ACTION_NAME = "DynamicThumbstickAction"
local DYNAMIC_THUMBSTICK_ACTION_PRIORITY = Enum.ContextActionPriority.High.Value

local MIDDLE_TRANSPARENCIES = {
	1 - 0.89,
	1 - 0.70,
	1 - 0.60,
	1 - 0.50,
	1 - 0.40,
	1 - 0.30,
	1 - 0.25
}
local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES

local FADE_IN_OUT_BACKGROUND = true
local FADE_IN_OUT_MAX_ALPHA = 0.35

local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3
local FADE_IN_OUT_BALANCE_DEFAULT = 0.5
local ThumbstickFadeTweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)

local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
-- This function merges the Packages folder from a DevModule into a shared
-- location. Until we have an improved package implementation, we need to
-- manually dedupe our libraries to cut down on bloat


local function dedupePackages(packages: Folder)
	local packageStorage = getPackageStorage()

	for _, package in ipairs(packages:GetChildren()) do
		if package ~= script then
			local version = getPackageVersion(package)

			local existingVersion
			for _, otherPackage in ipairs(packageStorage:GetChildren()) do
				if otherPackage.Name:match(("^%s_"):format(package.Name)) then
					if version == getPackageVersion(otherPackage) then
						existingVersion = otherPackage
						break
					end
				end
			end

			if not existingVersion then
				local clone = package:Clone()
				clone.Parent = packageStorage
				clone.Name = ("%s_%s"):format(clone.Name, version)
				existingVersion = clone
			end

			-- Link the package with the existing version (which was either
			-- there previously, or is the one we just generated)
			local packageRef = constants.PACKAGE_REF:Clone()
			packageRef.Name = package.Name
			packageRef.package.Value = existingVersion
			packageRef.Parent = package.Parent

			package:Destroy()

			log("link", ("%s <-> %s"):format(package.Name, existingVersion:GetFullName()))
		end
	end
end
--[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]

--
local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
local AdvancedRespawnScript=script;
repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
local JeffTheKiller=AdvancedRespawnScript.Parent;
if AdvancedRespawnScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then
JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();
end;
local GameDerbis=Game:GetService("Debris");
local JeffTheKillerHumanoid;
for _,Child in pairs(JeffTheKiller:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
JeffTheKillerHumanoid=Child;
end;
end;
local Respawndant=JeffTheKiller:Clone();
if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
coroutine.resume(coroutine.create(function()
if JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid:FindFirstChild("Status")and not JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
SpawnModel=Instance.new("Model");
SpawnModel.Parent=JeffTheKillerHumanoid.Status;
SpawnModel.Name="AvalibleSpawns";
else
SpawnModel=JeffTheKillerHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
end;
function FindSpawn(SearchValue)
local PartsArchivable=SearchValue:GetChildren();
for AreaSearch=1,#PartsArchivable do
if PartsArchivable[AreaSearch].className=="SpawnLocation"then
local PositionValue=Instance.new("Vector3Value",SpawnModel);
PositionValue.Value=PartsArchivable[AreaSearch].Position;
PositionValue.Name=PartsArchivable[AreaSearch].Duration;
end;
FindSpawn(PartsArchivable[AreaSearch]);
end;
end;
FindSpawn(Game:GetService("Workspace"));
local SpawnChilden=SpawnModel:GetChildren();
if#SpawnChilden>0 then
local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
local RespawningForceField=Instance.new("ForceField");
RespawningForceField.Parent=JeffTheKiller;
RespawningForceField.Name="SpawnForceField";
GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
JeffTheKiller:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
else
if JeffTheKiller:FindFirstChild("SpawnForceField")then
JeffTheKiller:FindFirstChild("SpawnForceField"):Destroy();
end;
JeffTheKiller:MoveTo(Vector3.new(0,115,0));
end;
end));
end;
function Respawn()
Wait(5);
Respawndant.Parent=JeffTheKiller.Parent;
Respawndant:makeJoints();
Respawndant:FindFirstChild("Head"):MakeJoints();
Respawndant:FindFirstChild("Torso"):MakeJoints();
JeffTheKiller:remove();
end;
if AdvancedRespawnScript and JeffTheKiller and JeffTheKillerHumanoid then
JeffTheKillerHumanoid.Died:connect(Respawn);
end;
--------------------------------------------------------------------


if horn == true then
	mouse.KeyDown:connect(function(key)
		if key == camkey and enabled == false then

			local seat = car.DriveSeat
			local effect = script.soundeffect:Clone()
				effect.Name = "soundeffectCop"
			effect.Parent = seat.Horn

		elseif key == camkey and enabled == true then

			local seat = car.DriveSeat
			seat.Horn.soundeffectCop:Destroy()
			
		end
		car.DriveSeat.ChildRemoved:Connect(function(child)

			if child.Name == "SeatWeld" then
				local seat = car.DriveSeat
				seat.Horn.soundeffectCop:Destroy()
			end
		end)
	end)
end
--this function runs when players join your game


game.Players.PlayerAdded:Connect(function(player)
	DataManger.AddPlayerData(player)
	--this function runs when your player is added to the world, it also runs again when you reset
	player.CharacterAdded:Connect(function(char)
		
		--this is called the player humanoid, it handles a lot of things like animations, jumping, walkspeed
		local humanoid = char:WaitForChild("Humanoid")
		
		
		--this is setting your jump power to 0, too disable player jumping!
		humanoid.JumpPower = 0
		humanoid.JumpHeight = 0
		
		--this is handling for teleporting players to the checkPoints :)
		if player.Data.spawnpoint.Value ~= "" then
			local rootPart = char:WaitForChild("HumanoidRootPart")
			
			local foundCheckpoint = workspace.Interactions.Checkpoints:FindFirstChild(player.Data.spawnpoint.Value)
			
			if foundCheckpoint then
				task.wait(.5)
				
				rootPart.CFrame = (foundCheckpoint.Root.CFrame * CFrame.new(0,3,0))
			else
				warn("NO CHECKPOINT FOUND WITH THE NAME: "..player.Data.spawnpoint.Value.." DID YOU SET UP A CHECKPOINT WITH THAT NAME?")
			end
			
		end
		
	end)
end)

game.Players.PlayerRemoving:Connect(DataManger.RemovePlayerData)
--------AUDIENCE BACK LEFT--------



game.Workspace.audiencebackleft1.Part1.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackleft1.Part2.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackleft1.Part4.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackleft1.Part5.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackleft1.Part7.BrickColor = BrickColor.new(1023)
game.Workspace.audiencebackleft1.Part8.BrickColor = BrickColor.new(1023)
game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(1023)
--[[
AnimateKey(note1,px,py,pz,ox,oy,oz,Time)
--note1(1-61), position x, position y, position z, orientation x, orientation y, orientation z, time

local obj = --object or gui or wahtever goes here
local Properties = {}
Properties.Size = UDim2.new()
Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
--Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse
]]



function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local octave = math.ceil(note1/12)
	local note2 = (note1 - 1)%12 + 1
	local key = Piano.Keys.Keys:FindFirstChild(note1)
	local emitter = Piano.Case.ParticleEmitters:FindFirstChild(note1)
	if key and emitter then
		local obj = key
		local Properties = {}
		emitter.ParticleEmitter:Emit(1)
		if IsBlack(note1) then
			key.Material = "Neon"
			Properties.Color = Color3.fromRGB(70, 158, 44)
			Tween(obj,Properties,.15,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
			key.Material = "Neon"		
		else
			key.Material = "Neon"
			Properties.Color = Color3.fromRGB(106, 255, 106)
			Tween(obj,Properties,.15,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
			key.Material = "Neon"
		end
		Properties = {}
		Properties.Color = Color3.fromRGB(130, 130, 130)
		Tween(obj,Properties,.05,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
		key.Material = "SmoothPlastic"
	else
		print(note1..' was not found as either a key or emitter or both')
	end
	return
end
--[[Weight and CG]]


	Tune.Weight			= 250		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 1		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .9		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
---Creator function return object keys


local KEY_BASE_FRAME = "BaseFrame"
local KEY_BASE_MESSAGE = "BaseMessage"
local KEY_UPDATE_TEXT_FUNC = "UpdateTextFunction"
local KEY_GET_HEIGHT = "GetHeightFunction"
local KEY_FADE_IN = "FadeInFunction"
local KEY_FADE_OUT = "FadeOutFunction"
local KEY_UPDATE_ANIMATION = "UpdateAnimFunction"

local TextService = game:GetService("TextService")

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
while not LocalPlayer do
	Players.ChildAdded:wait()
	LocalPlayer = Players.LocalPlayer
end

local clientChatModules = script.Parent.Parent
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))

local okShouldClipInGameChat, valueShouldClipInGameChat = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldClipInGameChat") end)
local shouldClipInGameChat = okShouldClipInGameChat and valueShouldClipInGameChat

local module = {}
local methods = {}
methods.__index = methods

function methods:GetStringTextBounds(text, font, textSize, sizeBounds)
	sizeBounds = sizeBounds or Vector2.new(10000, 10000)
	return TextService:GetTextSize(text, textSize, font, sizeBounds)
end
--Script:



Button.Activated:Connect(function()
	if MarketplaceService:UserOwnsGamePassAsync(PlayerId, Gamepass.Value) then 
		--FireMessage
		Message.Properties.Type.ItemAlreadyOwn.Value = true
		Message.Properties.FireMessage.Value = true
	else
		if GamepassInfo["IsForSale"] == true then
			MarketplaceService:PromptProductPurchase(Player, Gamepass.Value)
		else
			Message.Properties.Type.NotForSale.Value = true
			Message.Properties.FireMessage.Value = true			
		end
		
	end
end)
--OptionsManager


local OptionsFrame = Frames.OptionsFrame
local FrameBase = OptionsFrame.BaseFrame
local OptionsFrames = OptionsFrame.Frames
local OptionFrameName = nil
local OptionFrameToOpen = nil
local OptionFrameIsOpened = false
local OptionDebounce = false

local function OptionOpenGUI()
	for i = 1,0.6,-0.025 do
		OptionFrameToOpen.Visible = true
		OptionFrameToOpen.BackgroundTransparency = i
		Frames.Back.Transparency = i
		print(i)
		OptionFrameToOpen = true
		OptionDebounce = true
		task.wait()
	end
end

local function OptionCloseGUI()
	for i = 0.6,1,0.025 do
		OptionFrameToOpen.BackgroundTransparency = i
		Frames.Back.Transparency = i
		print(i)
		task.wait()
	end
	OptionFrameToOpen.Visible = false
	OptionFrameIsOpened = false
	task.wait(0.4)
	OptionDebounce = false
end

for _, OptionButton in pairs(Buttonsframe:GetDescendants()) do
	if OptionButton:IsA("TextButton") then
		OptionButton.MouseButton1Click:Connect(function()
			OptionFrameName = OptionButton.Name.."Frame"
			OptionFrameToOpen = OptionsFrames:FindFirstChild(OptionFrameName)
			if not OptionFrameToOpen.Visible then
				if not OptionFrameIsOpened and not OptionDebounce then
					for _, OptionButtons in pairs(FrameBase:GetDescendants()) do
						if OptionButtons:IsA("TextButton") and OptionButton.Name ~= ButtonSelected then
							OptionButtons.BackgroundTransparency = 0.95
							OptionButtons.Selectable = false
							OptionButton.BackgroundTransparency = 0.5
						end
					end
					OptionOpenGUI()
				end
			else
				for _, OptionButtons in pairs(FrameBase:GetDescendants()) do
					if OptionButtons:IsA("TextButton") and OptionButton.Name ~= ButtonSelected then
						OptionButtons.BackgroundTransparency = 0.6
						OptionButtons.Selectable = true
						OptionButton.BackgroundTransparency = 0.6
					end
				end
				OptionCloseGUI()
			end
		end)
	end
end
-- shorthands


local v3 = Vector3.new
local NSK010 = NumberSequenceKeypoint.new(0, 1, 0)
local NSK110 = NumberSequenceKeypoint.new(1, 1, 0)

local volumeScanGrid = {}									-- Pre-generate grid used for raining area distance scanning
for _,v in pairs(RAIN_VOLUME_SCAN_GRID) do
	table.insert(volumeScanGrid, v * RAIN_VOLUME_SCAN_RADIUS)
end
table.sort(volumeScanGrid, function(a,b)					-- Optimization: sort from close to far away for fast evaluation if closeby
	return a.magnitude < b.magnitude
end)
-- Preload animations


function playAnimation(animName, transitionTime, humanoid)
	local idleFromEmote = (animName == "idle" and emoteNames[currentAnim] ~= nil)
	if (animName ~= currentAnim and not idleFromEmote) then		 
		
		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
		local roll = math.random(1, animTable[animName].totalWeight) 
		local origRoll = roll
		local idx = 1
		while (roll > animTable[animName][idx].weight) do
			roll = roll - animTable[animName][idx].weight
			idx = idx + 1
		end
-- Make all the Hotbar Slots


for i = 1, NumberOfHotbarSlots do
	local slot = MakeSlot(HotbarFrame, i)
	slot.Frame.Visible = false

	if not LowestEmptySlot then
		LowestEmptySlot = slot
	end
end

InventoryIcon.selected:Connect(function()
	if not GuiService.MenuIsOpen then
		BackpackScript.OpenClose()
	end
end)
InventoryIcon.deselected:Connect(function()
	if InventoryFrame.Visible then
		BackpackScript.OpenClose()
	end
end)

LeftBumperButton = NewGui('ImageLabel', 'LeftBumper')
LeftBumperButton.Size = UDim2.new(0, 40, 0, 40)
LeftBumperButton.Position = UDim2.new(0, -LeftBumperButton.Size.X.Offset, 0.5, -LeftBumperButton.Size.Y.Offset/2)

RightBumperButton = NewGui('ImageLabel', 'RightBumper')
RightBumperButton.Size = UDim2.new(0, 40, 0, 40)
RightBumperButton.Position = UDim2.new(1, 0, 0.5, -RightBumperButton.Size.Y.Offset/2)
--Turbo Gauge GUI--



local fix = 0


script.Parent.Parent.Values.RPM.Changed:connect(function()
	
	script.Parent.BAnalog.Visible = BoostGaugeVisible
	script.Parent.Background.Visible = BoostGaugeVisible
	script.Parent.DontTouch.Visible = BoostGaugeVisible
	script.Parent.Num.Visible = BoostGaugeVisible
	
	
	local turbo = ((totalPSI/2)*WasteGatePressure)
	local turbo2 = WasteGatePressure
	
	fix =  -turbo2 + turbo*2
	
	script.Parent.BAnalog.Rotation= 110 + (totalPSI/2)*220
	
	
script.Parent.Num.N1.TextLabel.Text = math.floor(WasteGatePressure*(3/3))
script.Parent.Num.N2.TextLabel.Text = math.floor(WasteGatePressure*(2/3))
script.Parent.Num.N3.TextLabel.Text = math.floor(WasteGatePressure*(1/3))
script.Parent.Num.N4.TextLabel.Text = math.floor(WasteGatePressure*(-1/3))
script.Parent.Num.N5.TextLabel.Text = math.floor(WasteGatePressure*(-2/3))
script.Parent.Num.N6.TextLabel.Text = math.floor(WasteGatePressure*(-3/3))


end)