Roblox/luau_corpus huggingface dataset:
-- LOCAL FUNCTIONS
local function dictLength(dictionary)
	local count = 0
	for _, _ in pairs(dictionary) do
		count += 1
	end
	return count
end

local function fillOccupants(zonesAndOccupantsTable, zone, occupant)
	local occupantsDict = zonesAndOccupantsTable[zone]
	if not occupantsDict then
		occupantsDict = {}
		zonesAndOccupantsTable[zone] = occupantsDict
	end
	local prevCharacter = occupant:IsA("Player") and occupant.Character
	occupantsDict[occupant] = (prevCharacter or true)
end

local heartbeatActions = {
	["player"] = function(recommendedDetection)
		return ZoneController._getZonesAndItems("player", activeZones, activeZonesTotalVolume, true, recommendedDetection)
	end,
	["localPlayer"] = function(recommendedDetection)
		local zonesAndOccupants = {}
		local character = localPlayer.Character
		if not character then
			return zonesAndOccupants
		end
		local touchingZones = ZoneController.getTouchingZones(character, true, recommendedDetection, trackers.player)
		for _, zone in pairs(touchingZones) do
			if zone.activeTriggers["localPlayer"] then
				fillOccupants(zonesAndOccupants, zone, localPlayer)
			end
		end
		return zonesAndOccupants
	end,
	["item"] = function(recommendedDetection)
		return ZoneController._getZonesAndItems("item", activeZones, activeZonesTotalVolume, true, recommendedDetection)
	end,
}
--[=[
	Switches the result to a brio, and ensures only the last brio lives.

	@since 3.6.0
	@function switchToBrio
	@return (source: Observable<T>) -> Observable<Brio<T>>
	@within RxBrioUtils
]=]
RxBrioUtils.switchToBrio = Rx.pipe({
	RxBrioUtils.toBrio();
	RxBrioUtils.onlyLastBrioSurvives();
})

return RxBrioUtils
--[=[
	Utility function that loads a translator from a folder or a table.
	@class JSONTranslator
]=]

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

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

local JsonToLocalizationTable = require("JsonToLocalizationTable")
local PseudoLocalize = require("PseudoLocalize")
local LocalizationServiceUtils = require("LocalizationServiceUtils")
local Promise = require("Promise")
local Observable = require("Observable")
local Maid = require("Maid")
local Blend = require("Blend")
local Rx = require("Rx")

local JSONTranslator = {}
JSONTranslator.ClassName = "JSONTranslator"
JSONTranslator.__index = JSONTranslator
--------RIGHT DOOR 6--------
game.Workspace.doorright.l73.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(135)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(135)

game.Workspace.doorright.l11.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(102)
--[=[
	Base UI object with visibility and a maid. BasicPane provides three points of utility.

	1. BasicPane contain visibility API. It's very standard practice to use the VisibleChanged event and
	pass visibility up or down the entire stack.

	```lua
	-- Standard visibility chaining
	self._maid:GiveTask(self.VisibleChanged:Connect(function(isVisible, doNotAnimate)
		self._otherComponent:SetVisible(isVisible, doNotAnimate)
	end))
	```

	2. BasicPane contains a maid which cleans up upon :Destroy(). This just saves some time typing.

	3. Finally, BasicPanes, by convention (although not requirement), contain a .Gui object which can generally
	be safely reparented to another object.

	@class BasicPane
]=]

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

local Signal = require("Signal")
local Maid = require("Maid")

local BasicPane = {}
BasicPane.__index = BasicPane
BasicPane.ClassName = "BasicPane"
------------
--[[CODE]]--
------------
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local Offset = Vector3.new()

local Player = Players.LocalPlayer

function Update()
	local Character = Player.Character --I'll have this here, should the script be in StarterPlayerScripts
	local Camera = workspace.CurrentCamera --In case they delete the camera or something.
	if not Character then
		return
	end

	local Humanoid = Character:WaitForChild("Humanoid")
	local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
	local Head = Character:WaitForChild("Head")

	for Index, Item in ipairs(Character:GetChildren()) do
		if Item:IsA("BasePart") then
			if Item.Name ~= "Head" then
				Item.LocalTransparencyModifier = 0
			end
		elseif Item:IsA("Accoutrement") then
			local Handle = Item:FindFirstChild("Handle")
			if Handle then
				local ConnectedToHead = (Handle:FindFirstChild("HatAttachment") or Handle:FindFirstChild("HairAttachment") or Handle:FindFirstChild("FaceAttachment") or Handle:FindFirstChild("NeckAttachment")) ~= nil
				if ConnectedToHead then
					if ViewAccessories and ViewHeadAccessories then
						Handle.LocalTransparencyModifier = 1
					end
				else
					if ViewAccessories then
						Handle.LocalTransparencyModifier = 1
					end
				end
			end
		end
	end

	if (RealisticView and Player.CameraMode == Enum.CameraMode.LockFirstPerson)
		or (Character:WaitForChild("Head").LocalTransparencyModifier == 1) then
		--Above: Adding [or (Character:WaitForChild("Head").LocalTransparencyModifier == 1)] will make it so we can
		--detect if the player is in first-person
		local Origin = Camera.CFrame
		local Out = Camera.CFrame * CFrame.new(0, 0, -1)
		local Y_Diff = (Origin.Y - Out.Y) * -1
		local Z_Diff = 0
		local Extra_X = 0
		local Extra_Y = 1.5

		local Camera_Offset = Vector3.new(0, 0, math.min(Y_Diff - Z_Diff, 0))

		--Update #2: R15 offsets cause issues with this code block. This next one will fix that.
		local UpperTorso = Character:FindFirstChild("UpperTorso")
		if UpperTorso then
			local OffsetVal = HumanoidRootPart.CFrame:toObjectSpace(Head.CFrame).p
			Offset = Camera_Offset + (OffsetVal - Vector3.new(0, 2, 0))
		else
			Offset = Camera_Offset
		end

		Humanoid.CameraOffset = Offset
	else
		Humanoid.CameraOffset = Vector3.new()
	end
end

if AutoLockFirstPerson then
	Player.CameraMode = Enum.CameraMode.LockFirstPerson
end

RunService.RenderStepped:Connect(Update)
-- Отображение глобальной статистики с учётом DataStore2 значения 
-- Что больше, то и будет результатом 

local ServerScriptService = game:GetService("ServerScriptService") -- берём ссылку на сервис серверных скриптов
local DataStore2 = require(ServerScriptService.DataStore2) -- если скачали модуль и залили в игру
BASE = game.Workspace.BASE.Value
DataParam="Death"	-- ключ для баз DataStoreService и DataStore2 
DataStore2.Combine(BASE,DataParam)

local tmp, DonateStore

local sg = script.Parent --Surface GUI
local sample = script:WaitForChild("Sample") --Our Sample frame
local sf = sg:WaitForChild("ScrollingFrame") --The scrolling frame
local ui = sf:WaitForChild("UI") --The UI list layout
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local autoscaling	= true				--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 180				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 300				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 320				,
		spInc			= 40				, -- Increment between labelled notches
	}
}
--------------------------------------------------------------------------------------------------------------


local sprinting = false


local function sprint(name, IS, context)
	if IS == Enum.UserInputState.Begin then
		runSound.PlaybackSpeed = 4 -- Changes the playback speed that the running sound plays at during sprinting, replace 4 with your desired playback speed if wanted
		char.Humanoid.WalkSpeed = 32
		-- Sets player speed to 32, replace 32 with your desired speed if wanted
		sprinting = true
		while stamPower > 0 and sprinting == true do
			stamPower = stamPower - stamTick
			bar.Size = UDim2.new(stamPower / 100, 0, 1, 0)
			BigFOV:Play()
			wait()
			if stamPower <= 0 then
				runSound.PlaybackSpeed = 2
				char.Humanoid.WalkSpeed = 16
				SmallFOV:Play()
			end
		end
	elseif IS == Enum.UserInputState.End then
		runSound.PlaybackSpeed = 2 -- Resets the playback speed to its original value, recommended to leave as is
		char.Humanoid.WalkSpeed = 16 -- Sets player speed to 16 (Roblox game default), if you change your Roblox game's default player speed, replace 16 with the new value
		sprinting = false
		while stamPower <= 100 and sprinting == false do
			stamPower = stamPower + regenTick
			if stamPower > 100 then
				stamPower = 100
			end
			bar.Size = UDim2.new(stamPower / 100, 0, 1, 0)
			SmallFOV:Play()
			wait()
		end
	end
end
-- Decompiled with the Synapse X Luau decompiler.

function MakeWeld(p1, p2, p3, p4)
	if p3 == nil then
		p3 = "Weld";
	end;
	local v1 = Instance.new(p3);
	v1.Part0 = p1;
	v1.Part1 = p2;
	v1.C0 = p1.CFrame:inverse() * p1.CFrame;
	v1.C1 = p2.CFrame:inverse() * p1.CFrame;
	v1.Parent = p1;
	if p3 == "Motor" then
		if p4 ~= nil then
			v1.MaxVelocity = p4;
		end;
	end;
	return v1;
end;
function ModelWeld(p5, p6)
	if p5:IsA("BasePart") then
		MakeWeld(p6, p5, "Weld");
		return;
	end;
	if p5:IsA("Model") then
		local v2, v3, v4 = pairs(p5:GetChildren());
		while true do
			local v5, v6 = v2(v3, v4);
			if v5 then

			else
				break;
			end;
			v4 = v5;
			ModelWeld(v6, p6);		
		end;
	end;
end;
car = script.Parent.Parent.Parent;
misc = car:WaitForChild("Misc");
car.DriveSeat.ChildAdded:connect(function(p7)
	if p7.Name == "SeatWeld" and p7:IsA("Weld") and game.Players:GetPlayerFromCharacter(p7.Part1.Parent) ~= nil then
		p7.C0 = CFrame.new(-1, -0.5, 0) * CFrame.fromEulerAnglesXYZ(-(math.pi / 2), 0, 0);
	end;
end);
return {};
------------------------------------------------------------
local TwinService = game:GetService("TweenService")
local AnimationHighLight = TweenInfo.new(1, Enum.EasingStyle.Sine ,Enum.EasingDirection.InOut)
local Info1 = {Position = Vector3.new(pos1,Positionn,pos3)}
local Info2 = {Position = Vector3.new(pos1,Positionn2,pos3)}
local AnimkaUp = TwinService:Create(Danger, AnimationHighLight, Info1 )
local AnimkaDown = TwinService:Create(Danger, AnimationHighLight, Info2 )
while true do
	AnimkaUp:Play()
	wait(2)
	AnimkaDown:Play()
	wait(2)
end
-- Theme UI to current tool
ToolChanged:connect(function (Tool)
	coroutine.wrap(RecolorHandle)(Tool.Color);
	coroutine.wrap(Selection.RecolorOutlines)(Tool.Color);
end);
-- ================================================================================
-- PUBLIC FUNCTIONS
-- ================================================================================
function RaceModule:SetRacers(racerList)
	for i = 1, #racerList do
		addRacer(racerList[i])
	end
end -- RaceModule:SetRacers()

function RaceModule:RegisterCheckpoint(checkpoint)
	if not checkpoints[checkpoint] then
		local newCheckpoint = Checkpoint.new(checkpoint, RaceModule)
		numCheckpoints = numCheckpoints + 1
		checkpoints[checkpoint] = newCheckpoint
	end
end -- RaceModule:RegisterCheckpoint()

function RaceModule:PlayerCrossedCheckpoint(player, checkpoint)
	local racer = racers[player]	
	
	if not racer or racer.FinishedRace then return end
	local currentLap = racer.CurrentLap

	CheckpointEvent:FireClient(player, {{"checkpointHit", checkpoint.CollisionBody}})
	
	if not racer:HasStartedLap(currentLap) then
		racer:StartLap(currentLap)
		onLapStartedEvent:Fire(player, currentLap)
	end
	
	if racer:HasStartedLap(currentLap) then
		local alreadyPassed = checkpoint:SetPlayerPassed(player, currentLap)
		if not alreadyPassed then		
			onCheckpointPassedEvent:Fire(checkpoint.CollisionBody)
		end
	end
	
	if hasPlayerFinishedLap(player, currentLap) then
		local lapTime = racer:FinishLap(currentLap)
		onLapFinishedEvent:Fire(player, currentLap, lapTime)
		if currentLap == numLaps then
			if not winner then
				winner = player
			end
			racer.FinishedRace = true
			onRaceFinishedEvent:Fire(winner)
		else
			wait() -- Let the last checkpoint temporarily change to hit color
			
			CheckpointEvent:FireClient(player, {{"newLap"}})
			
			racer.CurrentLap = racer.CurrentLap + 1
		end
	end
end -- RaceModule:PlayerCrossedCheckpoint()

function RaceModule:Start(activePlayers)
	if debugEnabled then print("RACEMODULE: Starting race") end	
	
	winner = nil
	
	assert(numCheckpoints > 0, "No checkpoints registered")
	
	if debugEnabled then print("RACEMODULE: Checking if players set") end
	if #racers == 0 then
		RaceModule:SetRacers(activePlayers)
	end	
	
	for _, checkpoint in pairs(checkpoints) do
		checkpoint:Reset()
	end

	onRaceStartedEvent:Fire()
	
	local raceOver = false
	local finishedConnection
	finishedConnection = RaceModule.RaceFinished:connect(function()
		raceOver = true
		racers = {}
		finishedConnection:disconnect()
	end)
	spawn(function()
		wait(raceDuration)
		if not raceOver then
			onRaceFinishedEvent:Fire(winner)
		end
	end)
end -- RaceModule:Start()
--[[
	A special key for property tables, which allows users to extract values from
	an instance into an automatically-updated Value object.
]]

local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local logError = require(Package.Logging.logError)
local xtypeof = require(Package.Utility.xtypeof)

local function Out(propertyName: string): PubTypes.SpecialKey
	local outKey = {}
	outKey.type = "SpecialKey"
	outKey.kind = "Out"
	outKey.stage = "observer"

	function outKey:apply(outState: any, applyTo: Instance, cleanupTasks: { PubTypes.Task })
		local ok, event = pcall(applyTo.GetPropertyChangedSignal, applyTo, propertyName)
		if not ok then
			logError("invalidOutProperty", nil, applyTo.ClassName, propertyName)
		elseif xtypeof(outState) ~= "State" or outState.kind ~= "Value" then
			logError("invalidOutType")
		else
			outState:set((applyTo :: any)[propertyName])
			table.insert(
				cleanupTasks,
				event:Connect(function()
					outState:set((applyTo :: any)[propertyName])
				end)
			)
			table.insert(cleanupTasks, function()
				outState:set(nil)
			end)
		end
	end

	return outKey
end

return Out
--[[Drivetrain]]	
	Tune.Config			= "AWD"		-- "FWD" , "RWD" , "AWD"
	Tune.TorqueVector	= .3		-- AWD ONLY, "-1" has a 100% front bias, "0" has a 50:50 bias, and "1" has a 100% rear bias. Can be any number between that range.
	
	-- Differential Settings
	Tune.DifferentialType = 'New'	-- New: Fairly precise and accurate settings based on a real differential
									-- Old: Same differential as previous iterations of AC6
	
	-- Old Options
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 80		-- 1 - 100%
	Tune.RDiffLockThres	= 20		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	-- New Options (LuaInt)
	Tune.FDiffPower		= 20		-- 0 - 100				Higher values yield more wheel lock-up under throttle, more stability (Front wheels if driven only)
	Tune.FDiffCoast		= 20		-- 0 - 100				Higher values yield more wheel lock-up when off throttle, more stability (Front wheels if driven only)
	Tune.FDiffPreload	= 20		-- 0 - 100				Higher values will make the wheels generally lock up faster in any environment (Front wheels if driven only)
	Tune.RDiffPower		= 40		-- 0 - 100				(Rear wheels if driven only)
	Tune.RDiffCoast		= 30		-- 0 - 100				(Rear wheels if driven only)
	Tune.RDiffPreload	= 20		-- 0 - 100				(Rear wheels if driven only)
	
	-- Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
--[=[
	Checks if the left mouse button is down.
]=]
function Mouse:IsLeftDown(): boolean
	return UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1)
end
-- the toggleables
local walkSpeed = 24
local aggroRange = 160
local stateData = {
["state"] = "Idle",
["targ"] = nil,
["lastOrder"] = 0,
}

local animController = char:WaitForChild("AnimationController")

local preAnims = {
-- There's a bug with CharacterAppearanceLoaded on local scripts. This still seems to be an issue as my testing went. :/
-- https://devforum.roblox.com/t/characterappearanceloaded-not-working-with-localscripts/265106/7
PlayersService.PlayerAdded:Connect(function(player)
	player.CharacterAppearanceLoaded:Connect(function()
		RE_Character_Appearance_Loaded:FireClient(player)	
	end)
end)
--// All global vars will be wiped/replaced except script
--// All guis are autonamed

return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer
	local gui = script.Parent.Parent
	
	local frame = gui.Frame
	local desc = gui.Frame.Desc
	local name = gui.Frame.Nameb
	local list = gui.Frame.List
	local make = gui.Frame.Make
	local close = gui.Frame.Cancel
	
	make.MouseButton1Click:connect(function()
		gui:Destroy()
		client.Remote.Send("TrelloOperation",{
			Action = "MakeCard",
			List = list.Text,
			Name = name.Text,
			Desc = desc.Text
		})
	end)
	
	close.MouseButton1Click:connect(function()
		gui:Destroy()
	end)
	
	gTable:Ready()
end
--[[
	Takes two tables A and B, returns a new table with elements of A
	which are either not keys in B or have a different value in B
]]
return function(A, B)
	local new = {}

	for key, value in pairs(A) do
		if B[key] ~= A[key] then
			new[key] = value
		end
	end

	return new
end
-- ROBLOX deviation: we duplicate the Dispatcher type here because upstream has a circular dependency between Shared and Reconciler
local ReactElementType = require(script.Parent.Parent.ReactElementType)
type Source = ReactElementType.Source
local ReactTypes = require(script.Parent.Parent.ReactTypes)
type RefObject = ReactTypes.RefObject
type ReactContext<T> = ReactTypes.ReactContext<T>
--[=[
	@class Loader

	The Loader module will require all children or descendant ModuleScripts.
]=]
local Loader = {}

type Module = {}
type Modules = {Module}
-- enumName, enumValue, additionalProperty
-- in this case, additionalProperty is the delay between each check
return {
	{"Low", 	1,	1.0},
	{"Medium",	2,	0.5},
	{"High",	3,	0.1},
	{"Precise",	4,	0.0},
}
--[=[
	@param gamepadButton KeyCode
	@return boolean
	Returns `true` if the given button is down. This includes
	any button on the gamepad, such as `Enum.KeyCode.ButtonA`,
	`Enum.KeyCode.ButtonL3`, `Enum.KeyCode.DPadUp`, etc.

	```lua
	-- Check if the 'A' button is down:
	if gamepad:IsButtonDown(Enum.KeyCode.ButtonA) then
		print("ButtonA is down")
	end
	```
]=]
function Gamepad:IsButtonDown(gamepadButton: Enum.KeyCode): boolean
	return UserInputService:IsGamepadButtonDown(self._gamepad, gamepadButton)
end
--


script.Parent.Frame.DIS.MouseButton1Down:connect(function ()-- Radio will send an "ack" to the repeater/dispatch
local txCh = Channel
if db == false then
db = true
_G.SendEmergencyAck(txCh, script.Parent.Parent.Parent.Name)
wait (20)
db = false
end
end)

MainGUI.Parent.Parent.Chatted:connect(Transmit)
-- RANK, RANK NAMES & SPECIFIC USERS
Ranks = {
	{5,	"Gamemaster",		};
	{4,	"HeadMod",	{"",0},	};
	{3,	"Gamemod",		{"",0},	};
	{2,	"Mod",			{"",0},	};
	{1,	"VIP",			{"",0},	};
	{0,	"Guest",		};
};
--[[ The Module ]]--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local Gamepad = setmetatable({}, BaseCharacterController)
Gamepad.__index = Gamepad

local bindAtPriorityFlagExists, bindAtPriorityFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserPlayerScriptsBindAtPriority")
end)
local FFlagPlayerScriptsBindAtPriority = bindAtPriorityFlagExists and bindAtPriorityFlagEnabled

function Gamepad.new(CONTROL_ACTION_PRIORITY)
	local self = setmetatable(BaseCharacterController.new(), Gamepad)
	
	self.CONTROL_ACTION_PRIORITY = CONTROL_ACTION_PRIORITY
	
	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0
	
	self.activeGamepad = NONE	-- Enum.UserInputType.Gamepad1, 2, 3...
	self.gamepadConnectedConn = nil
	self.gamepadDisconnectedConn = nil
	return self
end

function Gamepad:Enable(enable)
	if not UserInputService.GamepadEnabled then
		return false
	end
	
	if enable == self.enabled then
		-- Module is already in the state being requested. True is returned here since the module will be in the state
		-- expected by the code that follows the Enable() call. This makes more sense than returning false to indicate
		-- no action was necessary. False indicates failure to be in requested/expected state.
		return true
	end
	
	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0
	self.moveVector = ZERO_VECTOR3
	self.isJumping = false
	
	if enable then
		self.activeGamepad = self:GetHighestPriorityGamepad()
		if self.activeGamepad ~= NONE then
			self:BindContextActions()
			self:ConnectGamepadConnectionListeners()
		else
			-- No connected gamepads, failure to enable
			return false
		end
	else
		self:UnbindContextActions()
		self:DisconnectGamepadConnectionListeners()
		self.activeGamepad = NONE
	end
	
	self.enabled = enable
	return true
end
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 427	--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 925		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 9200		--		Use sliders to manipulate values
	Tune.Redline		= 10000
	Tune.EqPoint		= 7250
	Tune.PeakSharpness	= 9.5
	Tune.CurveMult		= 0.15
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)