Prompt: --[[ Public API ]]

Response:
--
function Thumbstick:Enable()
	ThumbstickFrame.Visible = true
end

function Thumbstick:Disable()
	ThumbstickFrame.Visible = false
	OnTouchEnded()
end

function Thumbstick:Create(parentFrame)
	if ThumbstickFrame then
		ThumbstickFrame:Destroy()
		ThumbstickFrame = nil
		if OnTouchMovedCn then
			OnTouchMovedCn:disconnect()
			OnTouchMovedCn = nil
		end
		if OnTouchEndedCn then
			OnTouchEndedCn:disconnect()
			OnTouchEndedCn = nil
		end
	end

	local isSmallScreen = parentFrame.AbsoluteSize.y <= 500
	local thumbstickSize = isSmallScreen and 70 or 120
	local position = isSmallScreen and UDim2.new(0, (thumbstickSize/2) - 10, 1, -thumbstickSize - 20) or
		UDim2.new(0, thumbstickSize/2, 1, -thumbstickSize * 1.75)

	ThumbstickFrame = Instance.new('Frame')
	ThumbstickFrame.Name = "ThumbstickFrame"
	ThumbstickFrame.Active = true
	ThumbstickFrame.Visible = false
	ThumbstickFrame.Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize)
	ThumbstickFrame.Position = position
	ThumbstickFrame.BackgroundTransparency = 1

	local outerImage = Instance.new('ImageLabel')
	outerImage.Name = "OuterImage"
	outerImage.Image = TOUCH_CONTROL_SHEET
	outerImage.ImageRectOffset = Vector2.new()
	outerImage.ImageRectSize = Vector2.new(220, 220)
	outerImage.BackgroundTransparency = 1
	outerImage.Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize)
	outerImage.Position = UDim2.new(0, 0, 0, 0)
	outerImage.Parent = ThumbstickFrame

	StickImage = Instance.new('ImageLabel')
	StickImage.Name = "StickImage"
	StickImage.Image = TOUCH_CONTROL_SHEET
	StickImage.ImageRectOffset = Vector2.new(220, 0)
	StickImage.ImageRectSize = Vector2.new(111, 111)
	StickImage.BackgroundTransparency = 1
	StickImage.Size = UDim2.new(0, thumbstickSize/2, 0, thumbstickSize/2)
	StickImage.Position = UDim2.new(0, thumbstickSize/2 - thumbstickSize/4, 0, thumbstickSize/2 - thumbstickSize/4)
	StickImage.ZIndex = 2
	StickImage.Parent = ThumbstickFrame

	local centerPosition = nil
	local deadZone = 0.05
	local function doMove(direction)
		local inputAxis = direction / (thumbstickSize/2)

		-- Scaled Radial Dead Zone
		local inputAxisMagnitude = inputAxis.magnitude
		if inputAxisMagnitude < deadZone then
			inputAxis = Vector3.new()
		else
			inputAxis = inputAxis.unit * ((inputAxisMagnitude - deadZone) / (1 - deadZone))
			-- NOTE: Making inputAxis a unit vector will cause the player to instantly go max speed
			-- must check for zero length vector is using unit
			inputAxis = Vector3.new(inputAxis.x, 0, inputAxis.y)
		end

		local humanoid = getHumanoid()
		if humanoid then
			humanoid:Move(inputAxis, true)
		end
	end

	local function moveStick(pos)
		local relativePosition = Vector2.new(pos.x - centerPosition.x, pos.y - centerPosition.y)
		local length = relativePosition.magnitude
		local maxLength = ThumbstickFrame.AbsoluteSize.x/2
		if IsFollowStick and length > maxLength then
			local offset = relativePosition.unit * maxLength
			ThumbstickFrame.Position = UDim2.new(
				0, pos.x - ThumbstickFrame.AbsoluteSize.x/2 - offset.x,
				0, pos.y - ThumbstickFrame.AbsoluteSize.y/2 - offset.y)
		else
			length = math.min(length, maxLength)
			relativePosition = relativePosition.unit * length
		end
		StickImage.Position = UDim2.new(0, relativePosition.x + StickImage.AbsoluteSize.x/2, 0, relativePosition.y + StickImage.AbsoluteSize.y/2)
	end

	-- input connections
	ThumbstickFrame.InputBegan:connect(function(inputObject)
		if MoveTouchObject or inputObject.UserInputType ~= Enum.UserInputType.Touch then
			return
		end

		MoveTouchObject = inputObject
		ThumbstickFrame.Position = UDim2.new(0, inputObject.Position.x - ThumbstickFrame.Size.X.Offset/2, 0, inputObject.Position.y - ThumbstickFrame.Size.Y.Offset/2)
		centerPosition = Vector2.new(ThumbstickFrame.AbsolutePosition.x + ThumbstickFrame.AbsoluteSize.x/2,
			ThumbstickFrame.AbsolutePosition.y + ThumbstickFrame.AbsoluteSize.y/2)
		local direction = Vector2.new(inputObject.Position.x - centerPosition.x, inputObject.Position.y - centerPosition.y)
		moveStick(inputObject.Position)
	end)

	OnTouchMovedCn = UserInputService.TouchMoved:connect(function(inputObject, isProcessed)
		if inputObject == MoveTouchObject then
			centerPosition = Vector2.new(ThumbstickFrame.AbsolutePosition.x + ThumbstickFrame.AbsoluteSize.x/2,
				ThumbstickFrame.AbsolutePosition.y + ThumbstickFrame.AbsoluteSize.y/2)
			local direction = Vector2.new(inputObject.Position.x - centerPosition.x, inputObject.Position.y - centerPosition.y)
			doMove(direction)
			moveStick(inputObject.Position)
		end
	end)

	OnTouchEnded = function()
		ThumbstickFrame.Position = position
		StickImage.Position = UDim2.new(0, ThumbstickFrame.Size.X.Offset/2 - thumbstickSize/4, 0, ThumbstickFrame.Size.Y.Offset/2 - thumbstickSize/4)
		MoveTouchObject = nil
		local humanoid = getHumanoid()
		if humanoid then
			humanoid:Move(Vector3.new(0, 0, 0), true)
		end
	end

	OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject, isProcessed)
		if inputObject == MoveTouchObject then
			OnTouchEnded()
		end
	end)

	ThumbstickFrame.Parent = parentFrame
end

return Thumbstick


Prompt:
--
--		local targetOffsetVector = (lastTargetPos - target)
--		if targetOffsetVector.magnitude < math.huge then
--			targetOffsetVector = (lastTargetPos - target) * Vector3.new(1,0,1)
--		end

Response:
		if targetOffset > TargetOffsetMax then
		--if targetOffsetVector.magnitude > TargetOffsetMax then
			--print("moveto")
			local startPoint = character.Torso.Position
			local humanoidState = character.Humanoid:GetState()
			if humanoidState == Enum.HumanoidStateType.Jumping or humanoidState == Enum.HumanoidStateType.Freefall then
				--print("this")
				local ray = Ray.new(character.Torso.Position, Vector3.new(0, -100, 0))
				local hitPart, hitPoint = game.Workspace:FindPartOnRay(ray, character)
				if hitPart then
					startPoint = hitPoint
				end
			end
			--print("making new path")
			local newTarget = target
			local ray = Ray.new(target + Vector3.new(0,-3,0), Vector3.new(0, -100, 0))
			local hitPart, hitPoint = game.Workspace:FindPartOnRay(ray, character)
			if hitPoint then
				if (hitPoint - target).magnitude > 4 then
					newTarget = newTarget * Vector3.new(1,0,1) + Vector3.new(0,3,0)
				end
			end

			--local newTarget = Vector3.new(1,0,1) * target + Vector3.new(0, 2, 0)
			path = PathfindingService:ComputeSmoothPathAsync(startPoint, newTarget, 500)
			if path.Status ~= Enum.PathStatus.Success then
				--print(tostring(path.Status))
			end
			--path = PathfindingService:ComputeRawPathAsync(startPoint, target, 500)


Prompt: --Shutdown

Response:
car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") then
		script.Parent:Destroy()
	end
end)


Prompt: --// # key, Takedown

Response:
mouse.KeyDown:connect(function(key)
	if key=="v" then
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.Remotes.TakedownEvent:FireServer(true)
	end
end)


Prompt:
--[[
    Listens for user input
]]

Response:
function UserInput.init()
	UserInputService.InputBegan:Connect(
		function(inputObject, gameProcessedEvent)
			if gameProcessedEvent then
				return
			end

			local action = getActionFromInput(inputObject)
			if action == "Forwards" then
				throttle = 1
			elseif action == "Backwards" then
				throttle = -1
			elseif action == "Left" then
				steer = -1
			elseif action == "Right" then
				steer = 1
			elseif action == "Boost" then
				if FlagEnableBoosts then
					ClientVehicleBoosts.requestBoost()
				end
			end
		end
	)

	UserInputService.InputEnded:Connect(
		function(inputObject, gameProcessedEvent)
			if gameProcessedEvent then
				return
			end

			local action = getActionFromInput(inputObject)

			if action == "Forwards" or action == "Backwards" then
				throttle = isActionHeld("Forwards") and 1 or isActionHeld("Backwards") and -1 or 0
			elseif action == "Left" or action == "Right" then
				steer = isActionHeld("Right") and 1 or isActionHeld("Left") and -1 or 0
			end
		end
	)
end


Prompt: --Vars

Response:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local UserInputService = game:GetService("UserInputService")
local cam = workspace.CurrentCamera

local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local _IsOn = _Tune.AutoStart
if _Tune.AutoStart then script.Parent.IsOn.Value=true end

local _GSteerT=0
local _GSteerC=0
local _GThrot=0
local _GBrake=0

local _ClutchOn = true
local _RPM = 0
local _HP = 0
local _OutTorque = 0
local _CGear = 0
local _PGear = _CGear

local _TMode = _Tune.TransModes[1]

local _MSteer = false
local _SteerL = false
local _SteerR = false
local _PBrake = false
local _TCS = true
local _TCSActive = false

local FlipWait=tick()
local FlipDB=false

local _InControls = false


Prompt: -- Number of bullets in a clip

Response: local ClipSize = 12


Prompt: -- Mapping from movement mode and lastInputType enum values to control modules to avoid huge if elseif switching

Response:
local movementEnumToModuleMap = {
	[Enum.TouchMovementMode.DPad] = DynamicThumbstick,
	[Enum.DevTouchMovementMode.DPad] = DynamicThumbstick,
	[Enum.TouchMovementMode.Thumbpad] = DynamicThumbstick,
	[Enum.DevTouchMovementMode.Thumbpad] = DynamicThumbstick,
	[Enum.TouchMovementMode.Thumbstick] = TouchThumbstick,
	[Enum.DevTouchMovementMode.Thumbstick] = TouchThumbstick,
	[Enum.TouchMovementMode.DynamicThumbstick] = DynamicThumbstick,
	[Enum.DevTouchMovementMode.DynamicThumbstick] = DynamicThumbstick,
	[Enum.TouchMovementMode.ClickToMove] = ClickToMove,
	[Enum.DevTouchMovementMode.ClickToMove] = ClickToMove,

	-- Current default
	[Enum.TouchMovementMode.Default] = DynamicThumbstick,

	[Enum.ComputerMovementMode.Default] = Keyboard,
	[Enum.ComputerMovementMode.KeyboardMouse] = Keyboard,
	[Enum.DevComputerMovementMode.KeyboardMouse] = Keyboard,
	[Enum.DevComputerMovementMode.Scriptable] = nil,
	[Enum.ComputerMovementMode.ClickToMove] = ClickToMove,
	[Enum.DevComputerMovementMode.ClickToMove] = ClickToMove,
}


Prompt:
-- Implements Javascript's `Map.prototype.forEach` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/forEach

Response:
function Set:forEach<T>(callback: callbackFn<T> | callbackFnWithThisArg<T>, thisArg: Object?): ()
	if typeof(callback) ~= "function" then
		error("callback is not a function")
	end

	return Array.forEach(self._array, function(value: T)
		if thisArg ~= nil then
			(callback :: callbackFnWithThisArg<T>)(thisArg, value, value, self)
		else
			(callback :: callbackFn<T>)(value, value, self)
		end
	end)
end

function Set:has(value): boolean
	return self._map[value] ~= nil
end

function Set:ipairs()
	return ipairs(self._array)
end

return Set


Prompt: --BrickColor codes: http://wiki.roblox.com/index.php?title=BrickColor_codes

Response:
	script.Parent.Transparency=0
	--If you want the command to activate after the
	--button is pressed, put the commands here instead.
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt: -- Game Services

Response: local Configurations = require(game.ServerStorage.Configurations)


Response:
function DoorClose()
	if Shaft00.MetalDoor.CanCollide == false then
		Shaft00.MetalDoor.CanCollide = true
		while Shaft00.MetalDoor.Transparency > 0.0 do
			Shaft00.MetalDoor.Transparency = Shaft00.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)	--Change 10 to change the speed.
	end
	if Shaft01.MetalDoor.CanCollide == false then
		Shaft01.MetalDoor.CanCollide = true
		while Shaft01.MetalDoor.Transparency > 0.0 do
			Shaft01.MetalDoor.Transparency = Shaft01.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft02.MetalDoor.CanCollide == false then
		Shaft02.MetalDoor.CanCollide = true
		while Shaft02.MetalDoor.Transparency > 0.0 do
			Shaft02.MetalDoor.Transparency = Shaft02.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft03.MetalDoor.CanCollide == false then
		Shaft03.MetalDoor.CanCollide = true
		while Shaft03.MetalDoor.Transparency > 0.0 do
			Shaft03.MetalDoor.Transparency = Shaft03.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft04.MetalDoor.CanCollide == false then
		Shaft04.MetalDoor.CanCollide = true
		while Shaft04.MetalDoor.Transparency > 0.0 do
			Shaft04.MetalDoor.Transparency = Shaft04.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft05.MetalDoor.CanCollide == false then
		Shaft05.MetalDoor.CanCollide = true
		while Shaft05.MetalDoor.Transparency > 0.0 do
			Shaft05.MetalDoor.Transparency = Shaft05.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft06.MetalDoor.CanCollide == false then
		Shaft06.MetalDoor.CanCollide = true
		while Shaft06.MetalDoor.Transparency > 0.0 do
			Shaft06.MetalDoor.Transparency = Shaft06.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft07.MetalDoor.CanCollide == false then
		Shaft07.MetalDoor.CanCollide = true
		while Shaft07.MetalDoor.Transparency > 0.0 do
			Shaft07.MetalDoor.Transparency = Shaft07.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft08.MetalDoor.CanCollide == false then
		Shaft08.MetalDoor.CanCollide = true
		while Shaft08.MetalDoor.Transparency > 0.0 do
			Shaft08.MetalDoor.Transparency = Shaft08.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft09.MetalDoor.CanCollide == false then
		Shaft09.MetalDoor.CanCollide = true
		while Shaft09.MetalDoor.Transparency > 0.0 do
			Shaft09.MetalDoor.Transparency = Shaft09.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
	end
	if Shaft10.MetalDoor.CanCollide == false then
		Shaft10.MetalDoor.CanCollide = true
		while Shaft10.MetalDoor.Transparency > 0.0 do
			Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency - .1
			wait(0.000001)
		end

	end
	if Shaft11.MetalDoor.CanCollide == false then
		Shaft11.MetalDoor.CanCollide = true
		while Shaft11.MetalDoor.Transparency > 0.0 do
			Shaft11.MetalDoor.Transparency = Shaft11.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
	end
	if Shaft12.MetalDoor.CanCollide == false then
		Shaft12.MetalDoor.CanCollide = true
		while Shaft12.MetalDoor.Transparency > 0.0 do
			Shaft12.MetalDoor.Transparency = Shaft12.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
	end
	if Shaft13.MetalDoor.CanCollide == false then
		Shaft13.MetalDoor.CanCollide = true
		while Shaft13.MetalDoor.Transparency > 0.0 do
			Shaft13.MetalDoor.Transparency = Shaft13.MetalDoor.Transparency - .1
			wait(0.000001)
		end
		Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
	end
end

function onClicked()
DoorClose()

end

script.Parent.MouseButton1Click:connect(onClicked)

script.Parent.MouseButton1Click:connect(function()
	if clicker == true
		then clicker = false
	else
		return

	end
end)

script.Parent.MouseButton1Click:connect(function()
Car.Touched:connect(function(otherPart)
	if otherPart == Elevator.Floors.F11
		then StopE() DoorOpen()
	end
end)end)

function StopE()
 Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
 Car.BodyPosition.position = Elevator.Floors.F11.Position
	clicker = true
end

function DoorOpen()
	while Shaft10.MetalDoor.Transparency < 1.0 do
	Shaft10.MetalDoor.Transparency = Shaft10.MetalDoor.Transparency + .1
	wait(0.000001)
	end
	Shaft10.MetalDoor.CanCollide = false
end


Prompt: --[[Status Vars]]

Response:
	local _IsOn = _Tune.AutoStart
	if _Tune.AutoStart then car.DriveSeat.IsOn.Value=true end

	local _GSteerT=0
	local _GSteerC=0
	local _GThrot=0
	local _GBrake=0

	local _ClutchOn = true
	local _ClPressing = false
	local _RPM = 0
	local _HP = 0
	local _OutTorque = 0
	local _CGear = 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 _ABS = _Tune.ABSEnabled
	local _ABSActive = false

	local FlipWait=tick()
	local FlipDB=false

	local _InControls = false


Prompt:
--[Tip]
--More modes with smaller speed increments makes for a more precise and smooth ride.


Prompt: -- Slider sizes (Normal)

Response: local normalSize = UDim2.new(0.155, 0, 1, 0)


Prompt: -- Load Roblox Camera Controller Modules

Response:
local ClassicCamera = require(script:WaitForChild("ClassicCamera"))
local OrbitalCamera = require(script:WaitForChild("OrbitalCamera"))
local LegacyCamera = require(script:WaitForChild("LegacyCamera"))
local VehicleCamera = require(script:WaitForChild("VehicleCamera"))


Prompt: -- Rigs

Response:
local Rigs = {
	[0] = script.DefaultR15; -- The normal blocky R15 rig. This is just here so converting with IgnoreBodyParts off can work.
	[1] = script.Dogu15; -- The original, non-deforming Dogu15 rig.
	[2] = script.Dogu15LegacyDeform; -- The second version of the Dogu15 rig, now with mesh deformation!
	[3] = script.Dogu15Deform; -- The third (and current) version of Dogu15. No more annoying gaps, and a twisty torso!
	[4] = script.ACSDogu; -- The third (and current) version of Dogu15. No more annoying gaps, and a twisty torso!
}


Prompt: ------//Sprinting Animations

Response:
self.RighTSprint 	= CFrame.new(-1, 0.5, -1.25) * CFrame.Angles(math.rad(-60), math.rad(0), math.rad(0));
self.LefTSprint 	= CFrame.new(1.25,1.15,-1.35) * CFrame.Angles(math.rad(-60),math.rad(35),math.rad(-25));

return self


Prompt: --[[Dependencies]]

Response:
	local player = game.Players.LocalPlayer
	local mouse = player:GetMouse()
	local UserInputService = game:GetService("UserInputService")
	local car = script.Parent.Car.Value
	local _Tune = require(car["A-Chassis Tune"])


Prompt: --Constants;

Response: local RAYLength = 100 -- Not really. A point, off in space.


Prompt: --[[Transmission]]

Response:
	Tune.TransModes		= {"Auto", "Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch

		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}
		>First mode is default mode													]]

	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)

	--Gear Ratios
	Tune.FinalDrive		= 4.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	2.00		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.04		,
		--[[ 3 ]]		1.38		,
		--[[ 4 ]]		1.03		,
		--[[ 5 ]]		0.81		,
		--[[ 6 ]]		0.64		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)


Prompt: -- Container for temporary connections (disconnected automatically)

Response:
local Connections = {};

function AnchorTool.Equip()
	-- Enables the tool's equipped functionality

	-- Start up our interface
	ShowUI();
	BindShortcutKeys();

end;

function AnchorTool.Unequip()
	-- Disables the tool's equipped functionality

	-- Clear unnecessary resources
	HideUI();
	ClearConnections();

end;

function ClearConnections()
	-- Clears out temporary connections

	for ConnectionKey, Connection in pairs(Connections) do
		Connection:disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;

function ShowUI()
	-- Creates and reveals the UI

	-- Reveal UI if already created
	if UI then

		-- Reveal the UI
		UI.Visible = true;

		-- Update the UI every 0.1 seconds
		UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

		-- Skip UI creation
		return;

	end;

	-- Create the UI
	UI = Core.Tool.Interfaces.BTAnchorToolGUI:Clone();
	UI.Parent = Core.UI;
	UI.Visible = true;

	-- References to UI elements
	local AnchorButton = UI.Status.Anchored.Button;
	local UnanchorButton = UI.Status.Unanchored.Button;

	-- Enable the anchor status switch
	AnchorButton.MouseButton1Click:connect(function ()
		SetProperty('Anchored', true);
	end);
	UnanchorButton.MouseButton1Click:connect(function ()
		SetProperty('Anchored', false);
	end);

	-- Update the UI every 0.1 seconds
	UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

end;

function UpdateUI()
	-- Updates information on the UI

	-- Make sure the UI's on
	if not UI then
		return;
	end;

	-- Check the common anchor status of selection
	local Anchored = Support.IdentifyCommonProperty(Selection.Items, 'Anchored');

	-- Update the anchor option switch
	if Anchored == true then
		Core.ToggleSwitch('Anchored', UI.Status);

	-- If the selection is unanchored
	elseif Anchored == false then
		Core.ToggleSwitch('Unanchored', UI.Status);

	-- If the anchor status varies, don't select a current switch
	elseif Anchored == nil then
		Core.ToggleSwitch(nil, UI.Status);
	end;

end;

function HideUI()
	-- Hides the tool UI

	-- Make sure there's a UI
	if not UI then
		return;
	end;

	-- Hide the UI
	UI.Visible = false;

	-- Stop updating the UI
	UIUpdater:Stop();

end;

function SetProperty(Property, Value)

	-- Make sure the given value is valid
	if Value == nil then
		return;
	end;

	-- Start a history record
	TrackChange();

	-- Go through each part
	for _, Part in pairs(Selection.Items) do

		-- Store the state of the part before modification
		table.insert(HistoryRecord.Before, { Part = Part, [Property] = Part[Property] });

		-- Create the change request for this part
		table.insert(HistoryRecord.After, { Part = Part, [Property] = Value });

	end;

	-- Register the changes
	RegisterChange();

end;

function BindShortcutKeys()
	-- Enables useful shortcut keys for this tool

	-- Track user input while this tool is equipped
	table.insert(Connections, UserInputService.InputBegan:connect(function (InputInfo, GameProcessedEvent)

		-- Make sure this is an intentional event
		if GameProcessedEvent then
			return;
		end;

		-- Make sure this input is a key press
		if InputInfo.UserInputType ~= Enum.UserInputType.Keyboard then
			return;
		end;

		-- Make sure it wasn't pressed while typing
		if UserInputService:GetFocusedTextBox() then
			return;
		end;

		-- Check if the enter key was pressed
		if InputInfo.KeyCode == Enum.KeyCode.Return or InputInfo.KeyCode == Enum.KeyCode.KeypadEnter then

			-- Toggle the selection's anchor status
			ToggleAnchors();

		end;

	end));

end;

function ToggleAnchors()
	-- Toggles the anchor status of the selection

	-- Change the anchor status to the opposite of the common anchor status
	SetProperty('Anchored', not Support.IdentifyCommonProperty(Selection.Items, 'Anchored'));

end;

function TrackChange()

	-- Start the record
	HistoryRecord = {
		Before = {};
		After = {};

		Unapply = function (Record)
			-- Reverts this change

			-- Select the changed parts
			Selection.Replace(Support.GetListMembers(Record.Before, 'Part'));

			-- Send the change request
			Core.SyncAPI:Invoke('SyncAnchor', Record.Before);

		end;

		Apply = function (Record)
			-- Applies this change

			-- Select the changed parts
			Selection.Replace(Support.GetListMembers(Record.After, 'Part'));

			-- Send the change request
			Core.SyncAPI:Invoke('SyncAnchor', Record.After);

		end;

	};

end;

function RegisterChange()
	-- Finishes creating the history record and registers it

	-- Make sure there's an in-progress history record
	if not HistoryRecord then
		return;
	end;

	-- Send the change to the server
	Core.SyncAPI:Invoke('SyncAnchor', HistoryRecord.After);

	-- Register the record and clear the staging
	Core.History.Add(HistoryRecord);
	HistoryRecord = nil;

end;


Prompt:
--[[**
		Takes a table where keys are child names and values are functions to check the children against.
		Pass an instance tree into the function.
		If at least one child passes each check, the overall check passes.

		Warning! If you pass in a tree with more than one child of the same name, this function will always return false

		@param checkTable The table to check against

		@returns A function that checks an instance tree
	**--]]

Response:
	function t.children(checkTable)
		assert(checkChildren(checkTable))

		return function(value)
			local instanceSuccess, instanceErrMsg = t.Instance(value)
			if not instanceSuccess then
				return false, instanceErrMsg or ""
			end

			local childrenByName = {}
			for _, child in ipairs(value:GetChildren()) do
				local name = child.Name
				if checkTable[name] then
					if childrenByName[name] then
						return false, string.format("Cannot process multiple children with the same name %q", name)
					end

					childrenByName[name] = child
				end
			end

			for name, check in checkTable do
				local success, errMsg = check(childrenByName[name])
				if not success then
					return false, string.format("[%s.%s] %s", value:GetFullName(), name, errMsg or "")
				end
			end

			return true
		end
	end
end

return t


Prompt: --		debug.profileend()

Response: return function(DeltaTime)


Prompt: -- Decompiled with the Synapse X Luau decompiler.

Response:
return {
	Name = "help",
	Description = "Displays a list of all commands, or inspects one command.",
	Group = "Help",
	Args = { {
			Type = "command",
			Name = "Command",
			Description = "The command to view information on",
			Optional = true
		} },
	ClientRun = function(p1, p2)
		if p2 then
			local v1 = p1.Cmdr.Registry:GetCommand(p2);
			p1:Reply(("Command: %s"):format(v1.Name), Color3.fromRGB(230, 126, 34));
			if v1.Aliases and #v1.Aliases > 0 then
				p1:Reply(("Aliases: %s"):format(table.concat(v1.Aliases, ", ")), Color3.fromRGB(230, 230, 230));
			end;
			p1:Reply(v1.Description, Color3.fromRGB(230, 230, 230));
			local v2, v3, v4 = ipairs(v1.Args);
			while true do
				v2(v3, v4);
				if not v2 then
					break;
				end;
				v4 = v2;
				if v3.Optional == true then
					local v5 = "?";
				else
					v5 = "";
				end;
				p1:Reply(("#%d %s%s: %s - %s"):format(v2, v3.Name, v5, v3.Type, v3.Description));
			end;
		else
			p1:Reply("Argument Shorthands\n-------------------\t\t\t\n.   Me/Self\n*   All/Everyone \n**  Others \n?   Random\n?N  List of N random values\t\t\t\n");
			local v6 = p1.Cmdr.Registry:GetCommands();
			table.sort(v6, function(p3, p4)
				return p3.Group < p4.Group;
			end);
			local v7 = nil;
			local v8, v9, v10 = ipairs(v6);
			while true do
				v8(v9, v10);
				if not v8 then
					break;
				end;
				v10 = v8;
				if v7 ~= v9.Group then
					p1:Reply(("\n%s\n-------------------"):format(v9.Group));
					v7 = v9.Group;
				end;
				p1:Reply(("%s - %s"):format(v9.Name, v9.Description));
			end;
		end;
		return "";
	end
};


Prompt: --- Interaction with SetCore Player events.

Response:
local PlayerBlockedEvent = nil
local PlayerMutedEvent = nil
local PlayerUnBlockedEvent = nil
local PlayerUnMutedEvent = nil


Prompt: --[[Transmission]]

Response:
	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch

		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}
		>First mode is default mode													]]

	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)

	--Gear Ratios
	Tune.FinalDrive		= 3.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.04		,
		--[[ 3 ]]		1.38		,
		--[[ 4 ]]		1.03		,
		--[[ 5 ]]		0.81		,
		--[[ 6 ]]		0.64		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 4000		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		8		,
	 --[[Height]]		15		,
	 --[[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	= .5		-- Front Wheel Density
	Tune.RWheelDensity	= .5		-- 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


Prompt: --// Input Connections

Response:
L_99_.InputBegan:connect(function(L_296_arg1, L_297_arg2)
	if not L_297_arg2 and L_15_ then
		if L_296_arg1.UserInputType == Enum.UserInputType.MouseButton2 and not L_73_ and L_24_.CanAim and not L_70_ and L_15_ and not L_62_ and not L_63_ then
			if not L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 10
					L_144_ = 10
					L_143_ = 0.008
				end
				L_91_ = L_49_
				L_122_.target = L_52_.CFrame:toObjectSpace(L_43_.CFrame).p
				L_107_:FireServer(true)
				L_60_ = true
			end
		end;

		if L_296_arg1.KeyCode == Enum.KeyCode.E and L_15_ and not L_74_ and not L_75_ then
			L_74_ = true
			L_76_ = false
			L_75_ = true
			LeanRight()
		end

		if L_296_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and not L_74_ and not L_76_ then
			L_74_ = true
			L_75_ = false
			L_76_ = true
			LeanLeft()
		end

		if L_296_arg1.KeyCode == L_24_.AlternateAimKey and not L_73_ and L_24_.CanAim and not L_70_ and L_15_ and not L_62_ and not L_63_ then
			if not L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 10
					L_144_ = 10
					L_143_ = 0.008
				end
				L_91_ = L_49_
				L_122_.target = L_52_.CFrame:toObjectSpace(L_43_.CFrame).p
				L_107_:FireServer(true)
				L_60_ = true
			end
		end;

		if L_296_arg1.UserInputType == Enum.UserInputType.MouseButton1 and not L_73_ and L_65_ and L_15_ and not L_62_ and not L_63_ and not L_70_ then
			L_64_ = true
			if not Shooting and L_15_ and not L_77_ then
				if L_95_ > 0 then
					Shoot()
				end
			elseif not Shooting and L_15_ and L_77_ then
				if L_97_ > 0 then
					Shoot()
				end
			end
		end;

		if L_296_arg1.KeyCode == L_24_.LaserKey and L_15_ and L_24_.LaserAttached then
			local L_298_ = L_1_:FindFirstChild("LaserLight")
			L_111_.KeyDown[1].Plugin()
		end;

		if L_296_arg1.KeyCode == L_24_.LightKey and L_15_ and L_24_.LightAttached then
			local L_299_ = L_1_:FindFirstChild("FlashLight"):FindFirstChild('Light')
			local L_300_ = false
			L_299_.Enabled = not L_299_.Enabled
		end;

		if L_15_ and L_296_arg1.KeyCode == L_24_.FireSelectKey and not L_66_ then
			L_66_ = true
			if L_86_ == 1 then
				if Shooting then
					Shooting = false
				end
				if L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.AutoEnabled and L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 2 then
				if Shooting then
					Shooting = false
				end
				if L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BurstEnabled and L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BurstEnabled and not L_24_.BoltAction and L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BurstEnabled and not L_24_.BoltAction and not L_24_.SemiEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 3 then
				if Shooting then
					Shooting = false
				end
				if L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BoltAction and L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.BoltAction and not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BoltAction and not L_24_.SemiEnabled and L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.BoltAction and not L_24_.SemiEnabled and not L_24_.AutoEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 4 then
				if Shooting then
					Shooting = false
				end
				if L_24_.ExplosiveEnabled then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				elseif not L_24_.ExplosiveEnabled and L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				end
			elseif L_86_ == 6 then
				if Shooting then
					Shooting = false
				end
				L_79_ = L_65_
				if L_24_.SemiEnabled then
					L_86_ = 1
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and L_24_.AutoEnabled then
					L_86_ = 2
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and L_24_.BurstEnabled then
					L_86_ = 3
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and L_24_.BoltAction then
					L_86_ = 4
					L_77_ = false
					L_65_ = L_78_
				elseif not L_24_.SemiEnabled and not L_24_.AutoEnabled and not L_24_.BurstEnabled and not L_24_.BoltAction then
					L_86_ = 6
					L_77_ = true
					L_78_ = L_65_
					L_65_ = L_79_
				end
			end
			UpdateAmmo()
			FireModeAnim()
			IdleAnim()
			L_66_ = false
		end;

		if L_296_arg1.KeyCode == Enum.KeyCode.F and not L_73_ and not L_63_ and not L_66_ and not L_60_ and not L_62_ and not Shooting and not L_72_ then
			if not L_69_ and not L_70_ then
				L_70_ = true
				Shooting = false
				L_65_ = false
				L_124_ = time()
				delay(0.6, function()
					if L_95_ ~= L_24_.Ammo and L_95_ > 0 then
						CreateShell()
					end
				end)
				BoltBackAnim()
				L_69_ = true
			elseif L_69_ and L_70_ then
				BoltForwardAnim()
				Shooting = false
				L_65_ = true
				if L_95_ ~= L_24_.Ammo and L_95_ > 0 then
					L_95_ = L_95_ - 1
				elseif L_95_ >= L_24_.Ammo then
					L_65_ = true
				end
				L_69_ = false
				L_70_ = false
				IdleAnim()
				L_71_ = false
			end
			UpdateAmmo()
		end;

		if L_296_arg1.KeyCode == Enum.KeyCode.LeftShift and not L_73_ and L_135_ and not L_60_ then
			L_67_ = true
			if L_15_ and not L_66_ and not L_63_ and L_67_ and not L_61_ and not L_70_ then
				Shooting = false
				L_60_ = false
				L_63_ = true

				delay(0, function()
					if L_63_ and not L_62_ then
						L_60_ = false
						L_68_ = true
					end
				end)
				L_91_ = 80
				L_3_.Humanoid.WalkSpeed = 21
				L_144_ = 21
				L_143_ = 0.4
			end
		end;

		if L_296_arg1.KeyCode == Enum.KeyCode.R and not L_73_ and L_15_ and not L_62_ and not L_60_ and not Shooting and not L_63_ and not L_70_ then
			if not L_77_ then
				if L_96_ > 0 and L_95_ < L_24_.Ammo then
					Shooting = false
					L_62_ = true
					ReloadAnim()
					if L_95_ <= 0 then
						if not L_24_.CanSlideLock then
							BoltBackAnim()
						end
						BoltForwardAnim()
					end
					IdleAnim()
					L_65_ = true

					if L_95_ <= 0 then
						if (L_96_ - (L_24_.Ammo - L_95_)) < 0 then
							L_95_ = L_95_ + L_96_
							L_96_ = 0
						else
							L_96_ = L_96_ - (L_24_.Ammo - L_95_)
							L_95_ = L_24_.Ammo
						end
					elseif L_95_ > 0 then
						if (L_96_ - (L_24_.Ammo - L_95_)) < 0 then
							L_95_ = L_95_ + L_96_ + 1
							L_96_ = 0
						else
							L_96_ = L_96_ - (L_24_.Ammo - L_95_)
							L_95_ = L_24_.Ammo + 1
						end
					end

					L_62_ = false
					if not L_71_ then
						L_65_ = true
					end
				end;
			elseif L_77_ then
				if L_97_ > 0 then
					Shooting = false
					L_62_ = true
					nadeReload()
					IdleAnim()
					L_62_ = false
					L_65_ = true
				end
			end;
			UpdateAmmo()
		end;

		if L_296_arg1.KeyCode == Enum.KeyCode.RightBracket and L_60_ then
			if (L_50_ < 1) then
				L_50_ = L_50_ + L_24_.SensitivityIncrement
			end
		end

		if L_296_arg1.KeyCode == Enum.KeyCode.LeftBracket and L_60_ then
			if (L_50_ > 0.1) then
				L_50_ = L_50_ - L_24_.SensitivityIncrement
			end
		end

		if L_296_arg1.KeyCode == Enum.KeyCode.T and L_1_:FindFirstChild("AimPart2") then
			if not L_80_ then
				L_52_ = L_1_:WaitForChild("AimPart2")
				L_49_ = L_24_.CycleAimZoom
				if L_60_ then
					L_91_ = L_24_.CycleAimZoom
				end
				L_80_ = true
			else
				L_52_ = L_1_:FindFirstChild("AimPart")
				L_49_ = L_24_.AimZoom
				if L_60_ then
					L_91_ = L_24_.AimZoom
				end
				L_80_ = false
			end;
		end;

		if L_296_arg1.KeyCode == L_24_.InspectionKey then
			if not L_73_ then
				L_73_ = true
				InspectAnim()
				IdleAnim()
				L_73_ = false
			end
		end;
	end
end)

L_99_.InputEnded:connect(function(L_301_arg1, L_302_arg2)
	if not L_302_arg2 and L_15_ then
		if L_301_arg1.UserInputType == Enum.UserInputType.MouseButton2 and not L_73_ and L_24_.CanAim then
			if L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 16
					L_144_ = 17
					L_143_ = .25
				end
				L_91_ = 70
				L_122_.target = Vector3.new()
				L_107_:FireServer(false)
				L_60_ = false
			end
		end;

		if L_301_arg1.KeyCode == Enum.KeyCode.E and L_15_ and L_74_ then
			Unlean()
			L_74_ = false
			L_76_ = false
			L_75_ = false
		end

		if L_301_arg1.KeyCode == Enum.KeyCode.Q and L_15_ and L_74_ then
			Unlean()
			L_74_ = false
			L_76_ = false
			L_75_ = false
		end

		if L_301_arg1.KeyCode == L_24_.AlternateAimKey and not L_73_ and L_24_.CanAim then
			if L_60_ then
				if not L_61_ then
					L_3_.Humanoid.WalkSpeed = 16
					L_144_ = 17
					L_143_ = .25
				end
				L_91_ = 70
				L_122_.target = Vector3.new()
				L_107_:FireServer(false)
				L_60_ = false
			end
		end;

		if L_301_arg1.UserInputType == Enum.UserInputType.MouseButton1 and not L_73_ then
			L_64_ = false
			if Shooting then
				Shooting = false
			end
		end;

		if L_301_arg1.KeyCode == Enum.KeyCode.E and L_15_ then
			local L_303_ = L_41_:WaitForChild('GameGui')
			if L_16_ then
				L_303_:WaitForChild('AmmoFrame').Visible = false
				L_16_ = false
			end
		end;

		if L_301_arg1.KeyCode == Enum.KeyCode.LeftShift and not L_73_ and not L_66_ and not L_61_ then -- SPRINT
			L_67_ = false
			if L_63_ and not L_60_ and not Shooting and not L_67_ then
				L_63_ = false
				L_68_ = false
				L_91_ = 70

				L_3_.Humanoid.WalkSpeed = 16
				L_144_ = 17
				L_143_ = .25
			end
		end;
	end
end)

L_99_.InputChanged:connect(function(L_304_arg1, L_305_arg2)
	if not L_305_arg2 and L_15_ and L_24_.FirstPersonOnly and L_60_ then
		if L_304_arg1.UserInputType == Enum.UserInputType.MouseWheel then
			if L_304_arg1.Position.Z == 1 and (L_50_ < 1) then
				L_50_ = L_50_ + L_24_.SensitivityIncrement
			elseif L_304_arg1.Position.Z == -1 and (L_50_ > 0.1) then
				L_50_ = L_50_ - L_24_.SensitivityIncrement
			end
		end
	end
end)

L_99_.InputChanged:connect(function(L_306_arg1, L_307_arg2)
	if not L_307_arg2 and L_15_ then
		local L_308_, L_309_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_52_.CFrame.p, (L_52_.CFrame.lookVector).unit * 10000), IgnoreList);
		if L_308_ then
			local L_310_ = (L_309_ - L_6_.Position).magnitude
			L_33_.Text = math.ceil(L_310_) .. ' m'
		end
	end
end)


Prompt:
--[[
	Calls the given callback on all nodes in the tree, traversed depth-first.
]]

Response:
function TestPlan:visitAllNodes(callback, root, level)
	root = root or self
	level = level or 0

	for _, child in ipairs(root.children) do
		callback(child, level)

		self:visitAllNodes(callback, child, level + 1)
	end
end


Prompt: -- TODO: Raycast from perimeter of objectType mesh instead of cell

Response:
function ContentsManager:_getTouchingScenery(cellId, objectType)
	local scenerySet = {}
	local cell = self:getCell(cellId)
	local rayDirection = Vector3.new(0, -self.grid.CELL_DIMENSIONS.Y, 0)
	local rayOrigins = {
		cell.center,
		cell.center + Vector3.new(self.grid.CELL_DIMENSIONS.X / 2, 0, 0),
		cell.center - Vector3.new(self.grid.CELL_DIMENSIONS.X / 2, 0, 0),
		cell.center + Vector3.new(0, 0, self.grid.CELL_DIMENSIONS.Z / 2),
		cell.center - Vector3.new(0, 0, self.grid.CELL_DIMENSIONS.Z / 2)
	}

	for _, rayOrigin in ipairs(rayOrigins) do
		local part = workspace:FindPartOnRayWithWhitelist(Ray.new(rayOrigin, rayDirection), Util.getTableKeys(SceneryManager.scenery), true)
		if part then
			scenerySet[part] = true
		end
	end

	return scenerySet
end

function ContentsManager:addForced(objectType, cell)
	return self:add(objectType, cell, nil, true)
end

function ContentsManager:add(objectType, cellId, instance, forced)
	if forced or self:canPlace(objectType, cellId) then
		if instance ~= nil then
			self:_addToContents(instance, objectType, cellId)
		else
			local gridObject = objectType:render(self, self:getCell(cellId))
			self:_addToContents(gridObject, objectType, cellId)

			-- TODO: Move this check into Grid/init.lua
			if isServer then
				local touchingObjects = self:getTouchingObjects(gridObject, objectType, self:getCell(cellId))
				weldTouchingObjects(gridObject, touchingObjects)
				gridObject.Anchored = false
			end
		end

		return true
	else
		return false
	end
end

function ContentsManager:_allocateCell(cellId)
	local cellName = tostring(cellId)
	self.contents[cellName] = self:getCell(cellId)
	return self.contents[cellName]
end

function ContentsManager:_deallocateCell(cellId)
	local cellName = tostring(cellId)
	self.contents[cellName] = nil
end

function ContentsManager:_allocateConnectivityMapForIndex(cellId, index)
	local cell = self:_allocateCell(cellId)
	local indexAsString = tostring(index)

	if cell.connectivityMap[indexAsString] == nil then
		cell.connectivityMap[indexAsString] = {}
	end

	return cell.connectivityMap[indexAsString]
end

function ContentsManager:_deallocateConnectivityMapForIndex(cellId, index)
	local cell = self:getCell(cellId)
	local indexAsString = tostring(index)

	cell.connectivityMap[indexAsString] = nil
end

function ContentsManager:_addToContents(object, objectType, cellId)
	local cell = self:_allocateCell(cellId)

	cell.contents.objects[objectType] = object

	-- Update occupancy for cell
	cell.occupancy = bit32.bor(objectType.occupancy, cell.occupancy)

	-- Update occupancyMap for cell
	for index = 0, 13 do
		if bit32.extract(objectType.occupancy, index) == 1 then
			cell.occupancyMap[tostring(index)] = object
		end
	end

	-- Update occupancy and contents for orthogonally adjacent cells
	for _, face in pairs(BitOps.FACES) do
		local adjacentCell = self:_allocateCell(cellId + face)
		adjacentCell.occupancy =
			BitOps.applyFaceOccupancy(adjacentCell.occupancy, -1 * face, objectType.occupancy, face)

		if bit32.btest(BitOps.OCCUPANCY_FACE_MASK[tostring(BitOps.normalizeVec3(face))], objectType.occupancy) then
			local simpleObjectType, objectTypeRotation, objectFaceRotation = objectType.fromString(objectType.name)
			local adjacentObjectTypeRotation = (objectTypeRotation + 180) % 360
			local adjacentObjectType = self.grid.objectTypes[simpleObjectType .. "$" .. tostring(adjacentObjectTypeRotation) .. "$" .. tostring(objectFaceRotation)]
			adjacentCell.contents.objects[adjacentObjectType] = object
		end
	end

	-- Update occupancyMap for orthogonally adjacent cells
	for _, face in pairs(BitOps.FACES) do
		local occupancyFaceIndex = BitOps.OCCUPANCY_INDEX_FOR_FACE[tostring(BitOps.normalizeVec3(face))]
		if bit32.extract(objectType.occupancy, occupancyFaceIndex) == 1 then
			-- TODO: Don't allocate cell unless you have to
			local adjacentCell = self:_allocateCell(cellId + face)
			local occupancyIndexForAdjacentFace = BitOps.OCCUPANCY_INDEX_FOR_FACE[tostring(BitOps.normalizeVec3(-1 * face))]
			adjacentCell.occupancyMap[tostring(occupancyIndexForAdjacentFace)] = object
		end
	end

	-- Update connectivity for cell
	cell.connectivity = bit32.bor(objectType.connectivity, cell.connectivity)

	-- Update connectivityMap for cell
	for index = 0, 23 do
		if bit32.extract(objectType.connectivity, index) == 1 then
			local setOfObjectsConnectedToPoint = self:_allocateConnectivityMapForIndex(cellId, index)
			setOfObjectsConnectedToPoint[object] = true
		end
	end

	-- Update connectivity for orthogonally adjacent cells
	for _, face in pairs(BitOps.FACES) do
		-- TODO: Don't allocate cell unless you have to
		local adjacentCell = self:_allocateCell(cellId + face)
		adjacentCell.connectivity =
			BitOps.applyFaceConnectivity(adjacentCell.connectivity, -1 * face, objectType.connectivity, face)
	end

	-- Update connectivityMap for orthogonally adjacent cells
	for _, face in pairs(BitOps.FACES) do
		for listIndex, bitmaskIndex in ipairs(BitOps.CONNECTIVITY_INDEXES_FOR_FACE[tostring(BitOps.normalizeVec3(face))]) do
			if bit32.extract(objectType.connectivity, bitmaskIndex) == 1 then
				local connectivityIndexesForAdjacentFace = BitOps.CONNECTIVITY_INDEXES_FOR_FACE[tostring(BitOps.normalizeVec3(-1 * face))]
				local adjacentBitmaskIndex = connectivityIndexesForAdjacentFace[listIndex]
				local setOfObjectsConnectedToAdjacentPoint = self:_allocateConnectivityMapForIndex(cellId + face, adjacentBitmaskIndex)
				setOfObjectsConnectedToAdjacentPoint[object] = true
			end
		end
	end

	-- Update connectivity and connectivityMap for diagonally adjacent cells
	for edgeAsString, connectivityIndexes in pairs(BitOps.CONNECTIVITY_INDEXES_FOR_EDGE) do
		local edge = Vector3FromString(edgeAsString)
		local connectivityIndexesSize = #connectivityIndexes
		for i, connectivityIndex in ipairs(connectivityIndexes) do
			if bit32.extract(objectType.connectivity, connectivityIndex) ~= 0 then
				-- TODO: Don't allocate cell unless you have to
				local diagonallyAdjacentCell = self:_allocateCell(cellId + edge)
				local diagonallyAdjacentEdge = BitOps.normalizeVec3(-1 * edge)
				local diagonallyAdjacentEdgeConnectivityIndexes = BitOps.CONNECTIVITY_INDEXES_FOR_EDGE[tostring(diagonallyAdjacentEdge)]

				-- Flip the order you traverse the diagonally adjacent edge's
				-- connectivity indexes if the edge is perpendicular to the Y axis
				local j = i
				if edge.Y ~= 0 then
					j = connectivityIndexesSize + 1 - j
				end

				diagonallyAdjacentCell.connectivity =
					bit32.replace(diagonallyAdjacentCell.connectivity, 1, diagonallyAdjacentEdgeConnectivityIndexes[j])

				local setOfObjectsConnectedToAdjacentPoint = self:_allocateConnectivityMapForIndex(
					diagonallyAdjacentCell.id,
					diagonallyAdjacentEdgeConnectivityIndexes[j]
				)
				setOfObjectsConnectedToAdjacentPoint[object] = true
			end
		end
	end

	if DEBUG then
		local system = "CLIENT - "
		if isServer then
			system = "SERVER - "
		end
		print(system .. "ContentsManager contents for folder " .. self.folder.Name .. " after adding " .. objectType.name .. " to " .. tostring(cellId))
		print(Util.debugPrint(self.contents))
	end

	self:broadcastContentsChange({
		type = ADDED_OBJECT,
		cellId = cellId,
		objectType = objectType,
		object = object,
	})
end

function ContentsManager:broadcastContentsChange(change)
	if self.contentsListenerCount > 0 then
		for callback in pairs(self.contentsListeners) do
			callback(change)
		end
	end
end

function ContentsManager:getTouchingObjects(object, objectType, cell)
	local result = {}

	-- Must be connected to the same object by at least two connectivity points
	local setOfConnectedObjects = {}
	for i = 0, 23 do
		local key = tostring(i)
		if bit32.extract(objectType.connectivity, i) == 1 and cell.connectivityMap[key] ~= nil then
			for touchingObject in pairs(cell.connectivityMap[key]) do
				if setOfConnectedObjects[touchingObject] then
					result[touchingObject] = true
				else
					setOfConnectedObjects[touchingObject] = true
				end
			end
		end
	end

	for sceneryObject in pairs(self:_getTouchingScenery(cell.id, objectType)) do
		result[sceneryObject] = true
	end

	return result
end

function ContentsManager:remove(objectType, cellName, suppressWarning, doNotDestroy)
	local cell = self:getCell(Vector3FromString(cellName))

	-- Get object
	local object = cell.contents.objects[objectType]
	if object == nil then
		if not suppressWarning then
			warn("Tried to remove " .. objectType.name .. " in cell " .. tostring(cell.id) .. " where none existed")
		end

		return
	end

	-- Update occupancy for cell
	cell.occupancy = bit32.band(bit32.bnot(objectType.occupancy), cell.occupancy)

	-- Update occupancyMap for cell
	for index = 0, 13 do
		if bit32.extract(objectType.occupancy, index) == 1 then
			cell.occupancyMap[tostring(index)] = nil
		end
	end

	-- Update occupancy for orthogonally adjacent cells
	for _, face in pairs(BitOps.FACES) do
		local adjacentCell = self:getCell(cell.id + face)
		adjacentCell.occupancy =
			BitOps.removeFaceOccupancy(adjacentCell.occupancy, -1 * face, objectType.occupancy, face)
	end

	-- Update occupancyMap for orthogonally adjacent cells
	for _, face in pairs(BitOps.FACES) do
		local occupancyFaceIndex = BitOps.OCCUPANCY_INDEX_FOR_FACE[tostring(BitOps.normalizeVec3(face))]
		if bit32.extract(objectType.occupancy, occupancyFaceIndex) == 1 then
			local adjacentCell = self:getCell(cell.id + face)
			local occupancyIndexForAdjacentFace = BitOps.OCCUPANCY_INDEX_FOR_FACE[tostring(BitOps.normalizeVec3(-1 * face))]
			adjacentCell.occupancyMap[tostring(occupancyIndexForAdjacentFace)] = nil

			local simpleObjectType, objectTypeRotation, objectFaceRotation = objectType.fromString(objectType.name)
			local adjacentObjectTypeRotation = (objectTypeRotation + 180) % 360
			local adjacentObjectType = self.grid.objectTypes[simpleObjectType .. "$" .. tostring(adjacentObjectTypeRotation) .. "$" .. tostring(objectFaceRotation)]
			adjacentCell.contents.objects[adjacentObjectType] = nil
		end
	end

	-- Update connectivity and connectivityMap for cell
	for index = 0, 23 do
		if bit32.extract(objectType.connectivity, index) == 1 then
			local setOfObjectsConnectedToPoint = self:_allocateConnectivityMapForIndex(cell.id, index)
			setOfObjectsConnectedToPoint[object] = nil
			if next(setOfObjectsConnectedToPoint) == nil then
				self:_deallocateConnectivityMapForIndex(cell.id, index)
				cell.connectivity = bit32.replace(cell.connectivity, 0, index)
			end
		end
	end

	-- Update connectivity and connectivityMap for orthogonally adjacent cells
	for _, face in pairs(BitOps.FACES) do
		for listIndex, bitmaskIndex in ipairs(BitOps.CONNECTIVITY_INDEXES_FOR_FACE[tostring(BitOps.normalizeVec3(face))]) do
			if bit32.extract(objectType.connectivity, bitmaskIndex) == 1 then
				local connectivityIndexesForAdjacentFace = BitOps.CONNECTIVITY_INDEXES_FOR_FACE[tostring(BitOps.normalizeVec3(-1 * face))]
				local adjacentBitmaskIndex = connectivityIndexesForAdjacentFace[listIndex]
				local setOfObjectsConnectedToAdjacentPoint = self:_allocateConnectivityMapForIndex(cell.id + face, adjacentBitmaskIndex)
				setOfObjectsConnectedToAdjacentPoint[object] = nil
				if next(setOfObjectsConnectedToAdjacentPoint) == nil then
					local adjacentCell = self:getCell(cell.id + face)
					self:_deallocateConnectivityMapForIndex(adjacentCell.id, adjacentBitmaskIndex)
					adjacentCell.connectivity = bit32.replace(adjacentCell.connectivity, 0, adjacentBitmaskIndex)
				end
			end
		end
	end

	-- Update connectivity and connectivityMap for diagonally adjacent cells
	for edgeAsString, connectivityIndexes in pairs(BitOps.CONNECTIVITY_INDEXES_FOR_EDGE) do
		local edge = Vector3FromString(edgeAsString)
		local connectivityIndexesSize = #connectivityIndexes
		for i, connectivityIndex in ipairs(connectivityIndexes) do
			if bit32.extract(objectType.connectivity, connectivityIndex) ~= 0 then
				local diagonallyAdjacentCell = self:getCell(cell.id + edge)
				local diagonallyAdjacentEdge = BitOps.normalizeVec3(-1 * edge)
				local diagonallyAdjacentEdgeConnectivityIndexes = BitOps.CONNECTIVITY_INDEXES_FOR_EDGE[tostring(diagonallyAdjacentEdge)]

				-- Flip the order you traverse the diagonally adjacent edge's
				-- connectivity indexes if the edge is perpendicular to the Y axis
				local j = i
				if edge.Y ~= 0 then
					j = connectivityIndexesSize + 1 - j
				end

				local setOfObjectsConnectedToAdjacentPoint = self:_allocateConnectivityMapForIndex(
					diagonallyAdjacentCell.id,
					diagonallyAdjacentEdgeConnectivityIndexes[j]
				)
				setOfObjectsConnectedToAdjacentPoint[object] = nil
				if next(setOfObjectsConnectedToAdjacentPoint) == nil then
					diagonallyAdjacentCell.connectivity =
						bit32.replace(diagonallyAdjacentCell.connectivity, 0, diagonallyAdjacentEdgeConnectivityIndexes[j])
				end
			end
		end
	end

	-- Remove object from cell contents
	cell.contents.objects[objectType] = nil

	-- Remove object from adjacent cell contents
	for _, face in pairs(BitOps.FACES) do
		local occupancyFaceIndex = BitOps.OCCUPANCY_INDEX_FOR_FACE[tostring(BitOps.normalizeVec3(face))]
		if bit32.extract(objectType.occupancy, occupancyFaceIndex) == 1 then
			local adjacentCell = self:getCell(cell.id + face)
			local simpleObjectType, objectTypeRotation, objectFaceRotation = objectType.fromString(objectType.name)
			local adjacentObjectTypeRotation = (objectTypeRotation + 180) % 360
			local adjacentObjectType = self.grid.objectTypes[simpleObjectType .. "$" .. tostring(adjacentObjectTypeRotation) .. "$" .. tostring(objectFaceRotation)]
			adjacentCell.contents.objects[adjacentObjectType] = nil
		end
	end

	-- Destroy object
	if not doNotDestroy then
		object:Destroy()
	end

	-- Deallocate all affected cells that are empty and disconnected
	local affectedCells = { cell }
	for _, face in pairs(BitOps.FACES) do
		table.insert(affectedCells, self:getCell(cell.id + face))
	end
	for edge in pairs(BitOps.CONNECTIVITY_INDEXES_FOR_EDGE) do
		table.insert(affectedCells, self:getCell(cell.id + Vector3FromString(edge)))
	end

	for _, affectedCell in ipairs(affectedCells) do
		if affectedCell.occupancy == 0 and affectedCell.connectivity == 0 then
			self:_deallocateCell(affectedCell.id)
		end
	end

	if DEBUG then
		local system = "CLIENT - "
		if isServer then
			system = "SERVER - "
		end
		print(system .. "ContentsManager contents for folder " .. self.folder.Name .. " after removing " .. objectType.name .. " to " .. cellName)
		print(Util.debugPrint(self.contents))
	end

	self:broadcastContentsChange({
		type = REMOVED_OBJECT,
		cellId = cell.id,
		objectType = objectType,
		doNotDestroy = doNotDestroy,
	})

	-- TODO: This should be moved into Grid/init.lua
	if isServer then
		RemoveGridObject:FireAllClients(objectType:toString(cell), doNotDestroy)
	end
end

function ContentsManager:removeByName(name, suppressWarning, doNotDestroy)
	local parsedName = {}
	for word in name:gmatch("[^|]+") do
		table.insert(parsedName, word)
	end

	local objectTypeName = parsedName[1]
	local cellName = parsedName[2]

	if self.grid.objectTypes[objectTypeName] then
		self:remove(self.grid.objectTypes[objectTypeName], cellName, suppressWarning, doNotDestroy)
	else
		warn("Could not find object type " .. objectTypeName)
	end
end

function ContentsManager:destroy()
	-- TODO
end

return ContentsManager


Prompt:
--[=[
	Checks if a string is empty or nil
	@param str string
	@return boolean
]=]

Response:
function String.isEmptyOrWhitespaceOrNil(str: string): boolean
	return type(str) ~= "string" or str == "" or String.isWhitespace(str)
end


Prompt: --[[ Touch Events ]]

Response:
--
if IsTouchDevice then
	-- On touch devices we need to recreate the guis on character load.
	LocalPlayer.CharacterAdded:connect(function(character)
		createTouchGuiContainer()
		if CurrentControlModule then
			CurrentControlModule:Disable()
			CurrentControlModule = nil
		end
		onControlsChanged()
	end)

	UserInputService.Changed:connect(function(property)
		if property == 'ModalEnabled' then
			IsModalEnabled = UserInputService.ModalEnabled
			setJumpModule(not UserInputService.ModalEnabled)
			if UserInputService.ModalEnabled then
				if CurrentControlModule then
					CurrentControlModule:Disable()
				end
			else
				if CurrentControlModule then
					CurrentControlModule:Enable()
				end
			end
		end
	end)

	BindableEvent_OnFailStateChanged.Event:connect(function(isOn)
		if ClickToMoveTouchControls then
			if isOn then
				ClickToMoveTouchControls:Enable()
			else
				ClickToMoveTouchControls:Disable()
			end
			if ClickToMoveTouchControls == ControlModules.Thumbpad or ClickToMoveTouchControls == ControlModules.Thumbstick or
				ClickToMoveTouchControls == ControlModules.Default then
				--
				if isOn then
					TouchJumpModule:Enable()
				else
					TouchJumpModule:Disable()
				end
			end
		end
	end)
end

MasterControl:Init()
onControlsChanged()


Prompt: -- How many times per second the gun can fire

Response: local FireRate = 1 / 1000


Prompt:
-- ================================================================================
-- PUBLIC FUNCTIONS
-- ================================================================================

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

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

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


Prompt: --Bosun math

Response:
speedDiv = 66/maxSpeed
elevationAngle = 66/upRaise
turnAngleDiv = 66 / turnInclineAngle


Prompt:
--[=[
	Deep-reconciles a dictionary into another dictionary.

	```lua
	local template = {
		A = 0,
		B = 0,
		C = {
			D = "",
		},
	}

	local toReconcile = {
		A = 9,
		B = 8,
		C = {},
	}

	print(TableKit.Reconcile(toReconcile, template)) -- prints { A = 9, B = 8, C = { D = "" }
	```

	@within TableKit
	@param original table
	@param reconcile table
	@return table
]=]

Response:
function TableKit.Reconcile(original: { [unknown]: unknown }, reconcile: { [unknown]: any })
	local tbl = table.clone(original)

	for key, value in reconcile do
		if tbl[key] == nil then
			if typeof(value) == "table" then
				tbl[key] = TableKit.DeepCopy(value)
			else
				tbl[key] = value
			end
		elseif typeof(reconcile[key]) == "table" then
			if typeof(value) == "table" then
				tbl[key] = TableKit.Reconcile(value, reconcile[key])
			else
				tbl[key] = TableKit.DeepCopy(reconcile[key])
			end
		end
	end

	return tbl
end


Prompt: --- Event handler for text box focus lost

Response:
function Window:LoseFocus(submit)
	local text = Entry.TextBox.Text

	self:ClearHistoryState()

	if Gui.Visible and not GuiService.MenuIsOpen then
		Entry.TextBox:CaptureFocus()
	elseif GuiService.MenuIsOpen and Gui.Visible then
		self:Hide()
	end

	if submit and self.Valid then
		wait()
		self:SetEntryText("")
		self.ProcessEntry(text)
	elseif submit then
		self:AddLine(self._errorText, Color3.fromRGB(255, 153, 153))
	end
end

function Window:TraverseHistory(delta)
	local history = self.Cmdr.Dispatcher:GetHistory()

	if self.HistoryState == nil then
		self.HistoryState = {
			Position = #history + 1,
			InitialText = self:GetEntryText(),
		}
	end

	self.HistoryState.Position = math.clamp(self.HistoryState.Position + delta, 1, #history + 1)

	self:SetEntryText(
		self.HistoryState.Position == #history + 1 and self.HistoryState.InitialText
			or history[self.HistoryState.Position]
	)
end

function Window:ClearHistoryState()
	self.HistoryState = nil
end

function Window:SelectVertical(delta)
	if self.AutoComplete:IsVisible() and not self.HistoryState then
		self.AutoComplete:Select(delta)
	else
		self:TraverseHistory(delta)
	end
end

local lastPressTime = 0
local pressCount = 0


Prompt: --------AUDIENCE BACK RIGHT--------

Response:
game.Workspace.audiencebackright1.Part1.BrickColor = BrickColor.new(1023)
game.Workspace.audiencebackright1.Part2.BrickColor = BrickColor.new(1023)
game.Workspace.audiencebackright1.Part3.BrickColor = BrickColor.new(1023)
game.Workspace.audiencebackright1.Part4.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackright1.Part5.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackright1.Part6.BrickColor = BrickColor.new(106)
game.Workspace.audiencebackright1.Part7.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackright1.Part8.BrickColor = BrickColor.new(1013)
game.Workspace.audiencebackright1.Part9.BrickColor = BrickColor.new(1013)


Prompt:
--[[
	Retries a Promise-returning callback N times until it succeeds.
]]

Response:
function Promise.retry(callback, times, ...)
	assert(type(callback) == "function", "Parameter #1 to Promise.retry must be a function")
	assert(type(times) == "number", "Parameter #2 to Promise.retry must be a number")

	local args, length = {...}, select("#", ...)

	return Promise.resolve(callback(...)):catch(function(...)
		if times > 0 then
			return Promise.retry(callback, times - 1, unpack(args, 1, length))
		else
			return Promise.reject(...)
		end
	end)
end


Response:
local sight = 18
local walking = true
local shooting = false
local canshoot = true
local cansay = true
local saycooldown = 0
local akweld = Instance.new("Weld", npc["AK-47"])
akweld.Part0 = rightarm
akweld.Part1 = npc["AK-47"]
function walkanim(walkspeed)
	if walkspeed > 5 then
		walking = true
	else
		walking = false
	end
end
npchumanoid.Running:connect(walkanim)
function randomwalk()
	while wait(math.random(3,6)) do
		if not shooting and not walking then
			npchumanoid.WalkSpeed = 16
			local function createwalkpart()
				local walkpart = Instance.new("Part", npc)
				walkpart.Size = Vector3.new(1,1,1)
				walkpart.Anchored = true
				walkpart.Material = "Neon"
				walkpart.Transparency = 1
				walkpart.BrickColor = BrickColor.new("Maroon")
				walkpart.CFrame = torso.CFrame * CFrame.new(math.random(-60,60),math.random(-30,30),math.random(-60,60))
				local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
				local waypoints = path:GetWaypoints()
				if path.Status == Enum.PathStatus.Success then
					for i,v in pairs(waypoints) do
						local pospart = Instance.new("Part", npc)
						pospart.Size = Vector3.new(1,1,1)
						pospart.Anchored = true
						pospart.Material = "Neon"
						pospart.Transparency = 1
						pospart.Position = v.Position
						pospart.Name = "pospart"
						pospart.CanCollide = false
					end
					for i,v in pairs(waypoints) do
						npchumanoid:MoveTo(v.Position)
						local allow = 0
						while (torso.Position - v.Position).magnitude > 4 and allow < 35 do
							allow = allow + 1
							wait()
						end
						if v.Action == Enum.PathWaypointAction.Jump then
							npchumanoid.Jump = true
						end
					end
					for i,v in pairs(npc:GetChildren()) do
						if v.Name == "pospart" then
							v:destroy()
						end
					end
				else
					createwalkpart()
					wait()
				end
				walkpart:destroy()
			end
			createwalkpart()
		end
	end
end
function checkandshoot()
	while wait() do
		saycooldown = saycooldown + 1
		if saycooldown == 500 then
			cansay = true
			saycooldown = 0
		end
		for i,v in pairs(workspace:GetChildren()) do
			if v.ClassName == "Model" and v.Name ~= "Rufus14" then
				local victimhumanoid = v:findFirstChildOfClass("Humanoid")
				local victimhead = v:findFirstChild("Head")
				if victimhumanoid and victimhead and v.Name ~= npc.Name then
					if (victimhead.Position - head.Position).magnitude < sight then
						if victimhumanoid.Name == "noneofurbusiness" and cansay then

						elseif not shooting and victimhumanoid.Health > 0 and canshoot then
							shooting = true
							walking = false
							local doesshoot = 0
							local hpnow = npchumanoid.Health
							local walk = 0
							npchumanoid.WalkSpeed = 0
							while shooting and (victimhead.Position - head.Position).magnitude < sight and victimhumanoid.Health > 0 and canshoot do
								doesshoot = doesshoot + 1
								walk = walk + 1
								if npchumanoid.PlatformStand == false then
									npc.HumanoidRootPart.CFrame = CFrame.new(npc.HumanoidRootPart.Position,Vector3.new(victimhead.Position.x,npc.HumanoidRootPart.Position.y,victimhead.Position.z))
								end
								if walk == 100 and not walking then
									local function createwalkpart()
										local walkpart = Instance.new("Part", npc)
										walkpart.Size = Vector3.new(1,1,1)
										walkpart.Anchored = true
										walkpart.Material = "Neon"
										walkpart.Transparency = 1
										walkpart.BrickColor = BrickColor.new("Maroon")
										walkpart.CFrame = torso.CFrame * CFrame.new(-math.random(20,60),math.random(-40,40),math.random(-10,10))
										local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
										local waypoints = path:GetWaypoints()
										if path.Status == Enum.PathStatus.Success then
											shooting = false
											canshoot = false
											npchumanoid.WalkSpeed = 20
											for i,v in pairs(waypoints) do
												local pospart = Instance.new("Part", npc)
												pospart.Size = Vector3.new(1,1,1)
												pospart.Anchored = true
												pospart.Material = "Neon"
												pospart.Transparency = 1
												pospart.Position = v.Position
												pospart.Name = "pospart"
												pospart.CanCollide = false
											end
											for i,v in pairs(waypoints) do
												npchumanoid:MoveTo(v.Position)
												local allow = 0
												while (torso.Position - v.Position).magnitude > 4 and allow < 35 do
													allow = allow + 1
													wait()
												end
												if v.Action == Enum.PathWaypointAction.Jump then
													npchumanoid.Jump = true
												end
											end
											canshoot = true
											npchumanoid.WalkSpeed = 16
											for i,v in pairs(npc:GetChildren()) do
												if v.Name == "pospart" then
													v:destroy()
												end
											end
										else
											createwalkpart()
											wait()
										end
										walkpart:destroy()
									end
									createwalkpart()
								end
								if doesshoot == 2 then
									doesshoot = 0
									npc["AK-47"].shoot:Play()
									local bullet = Instance.new("Part", npc)
									bullet.Size = Vector3.new(0.3,0.3,3.5)
									bullet.Material = "Neon"
									bullet.CFrame = npc["AK-47"].CFrame * CFrame.new(0,0,-4)
									bullet.CanCollide = false
									local velocity = Instance.new("BodyVelocity", bullet)
									velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
									bullet.CFrame = CFrame.new(bullet.Position, victimhead.Position)
									velocity.Velocity = bullet.CFrame.lookVector * 500 + Vector3.new(math.random(-20,20),math.random(-20,20),0)
									local pointlight = Instance.new("PointLight", npc["AK-47"])
									game.Debris:AddItem(pointlight,0.1)
									local function damage(part)
										local damage = math.random(1,10)
										if part.Parent.ClassName ~= "Accessory" and part.Parent.Parent.ClassName ~= "Accessory" and part.ClassName ~= "Accessory" and part.Parent.Name ~= npc.Name and part.CanCollide == true then
											bullet:destroy()
											local victimhumanoid = part.Parent:findFirstChildOfClass("Humanoid")
											if victimhumanoid then
												if victimhumanoid.Health > damage then
													victimhumanoid:TakeDamage(damage)
												else
													victimhumanoid:TakeDamage(damage)
												end
											end
										end
									end
									game.Debris:AddItem(bullet, 5)
									bullet.Touched:connect(damage)
								end
								wait()
							end
							walking = false
							shooting = false
						end
					end
				end
			end
		end
	end
end
function run()
	while wait() do
		local hpnow = npchumanoid.Health
		wait()
		if npchumanoid.Health < hpnow then
			local dorun = math.random(1,1)
			if dorun == 1 and not walking then
				local function createwalkpart()
					local walkpart = Instance.new("Part", npc)
					walkpart.Size = Vector3.new(1,1,1)
					walkpart.Anchored = true
					walkpart.Material = "Neon"
					walkpart.Transparency = 1
					walkpart.BrickColor = BrickColor.new("Maroon")
					walkpart.CFrame = torso.CFrame * CFrame.new(math.random(20,60),math.random(-20,20),math.random(-60,60))
					local path = game:GetService("PathfindingService"):FindPathAsync(torso.Position, walkpart.Position)
					local waypoints = path:GetWaypoints()
					if path.Status == Enum.PathStatus.Success then
						shooting = false
						canshoot = false
						walking = true
						npchumanoid.WalkSpeed = 20
						for i,v in pairs(waypoints) do
							local pospart = Instance.new("Part", npc)
							pospart.Size = Vector3.new(1,1,1)
							pospart.Anchored = true
							pospart.Material = "Neon"
							pospart.Transparency = 1
							pospart.Position = v.Position
							pospart.Name = "pospart"
							pospart.CanCollide = false
						end
						for i,v in pairs(waypoints) do
							npchumanoid:MoveTo(v.Position)
							local allow = 0
							while (torso.Position - v.Position).magnitude > 4 and allow < 35 do
								allow = allow + 1
								wait()
							end
							if v.Action == Enum.PathWaypointAction.Jump then
								npchumanoid.Jump = true
							end
						end
						shooting = false
						canshoot = true
						walking = false
						npchumanoid.WalkSpeed = 16
						for i,v in pairs(npc:GetChildren()) do
							if v.Name == "pospart" then
								v:destroy()
							end
						end
					else
						createwalkpart()
						wait()
					end
					walkpart:destroy()
				end
				createwalkpart()
			end
		end
	end
end
function death()
	if head:findFirstChild("The Prodigy - Voodoo People (Pendulum Remix)") then
		head["The Prodigy - Voodoo People (Pendulum Remix)"]:destroy()
	end
	if npc:findFirstChild("Health") then
		npc.Health.Disabled = true
	end
	npchumanoid.Archivable = true
	local zombiecorpse = npchumanoid.Parent:Clone()
	npchumanoid.Parent:destroy()
	zombiecorpse.Parent = workspace
	game.Debris:AddItem(zombiecorpse, 15)
	local Humanoid = zombiecorpse:findFirstChildOfClass("Humanoid")
	local Torso = zombiecorpse.Torso
	Humanoid.PlatformStand = true
	Humanoid:SetStateEnabled("Dead", false)
	for i,v in pairs(Humanoid.Parent.Torso:GetChildren()) do
		if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
			v:destroy()
		end
	end
	for i,v in pairs(zombiecorpse:GetChildren()) do
		if v.ClassName == "Part" then
			for q,w in pairs(v:GetChildren()) do
				if w.ClassName == "BodyPosition" or w.ClassName == "BodyVelocity" then
					w:destroy()
				end
			end
		end
	end
	local function makeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
		local connection = Instance.new('BallSocketConstraint', limb)
		connection.LimitsEnabled = true
		connection.Attachment0 = attachementone
		connection.Attachment1 = attachmenttwo
		connection.TwistLimitsEnabled = true
		connection.TwistLowerAngle = twistlower
		connection.TwistUpperAngle = twistupper
		connection.UpperAngle = 70
	end
	local function makehingeconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, upperangle)
		local connection = Instance.new('HingeConstraint', limb)
		connection.Attachment0 = attachementone
		connection.Attachment1 = attachmenttwo
		connection.LimitsEnabled = true
		connection.LowerAngle = twistlower
		connection.UpperAngle = twistupper
	end
	Humanoid.Parent['Right Arm'].RightShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
	Torso.RightCollarAttachment.Position = Vector3.new(1.5, 0.5, 0)
	Humanoid.Parent['Left Arm'].LeftShoulderAttachment.Position = Vector3.new(0, 0.5, 0)
	Torso.LeftCollarAttachment.Position = Vector3.new(-1.5, 0.5, 0)
	local RightLegAttachment = Instance.new("Attachment", Humanoid.Parent["Right Leg"])
	RightLegAttachment.Position = Vector3.new(0, 1, 0)
	local TorsoRightLegAttachment = Instance.new("Attachment", Torso)
	TorsoRightLegAttachment.Position = Vector3.new(0.5, -1, 0)
	--
	local LeftLegAttachment = Instance.new("Attachment", Humanoid.Parent["Left Leg"])
	LeftLegAttachment.Position = Vector3.new(0, 1, 0)
	local TorsoLeftLegAttachment = Instance.new("Attachment", Torso)
	TorsoLeftLegAttachment.Position = Vector3.new(-0.5, -1, 0)
	--
	if Humanoid.Parent:findFirstChild("Head") then
		local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
		HeadAttachment.Position = Vector3.new(0, -0.5, 0)
		makehingeconnections(Humanoid.Parent.Head, HeadAttachment, Torso.NeckAttachment, -20, 20, 70)
	end
	makeconnections(Humanoid.Parent['Right Arm'], Humanoid.Parent['Right Arm'].RightShoulderAttachment, Torso.RightCollarAttachment, -80, 80)
	makeconnections(Humanoid.Parent['Left Arm'], Humanoid.Parent['Left Arm'].LeftShoulderAttachment, Torso.LeftCollarAttachment, -80, 80)
	makeconnections(Humanoid.Parent['Right Leg'], RightLegAttachment, TorsoRightLegAttachment, -80, 80, 70)
	makeconnections(Humanoid.Parent['Left Leg'], LeftLegAttachment, TorsoLeftLegAttachment, -80, 80, 70)
	if Humanoid.Parent:findFirstChild("Right Arm") then
		local limbcollider = Instance.new("Part", Humanoid.Parent["Right Arm"])
		limbcollider.Size = Vector3.new(1,1.3,1)
		limbcollider.Shape = "Cylinder"
		limbcollider.Transparency = 1
		local limbcolliderweld = Instance.new("Weld", limbcollider)
		limbcolliderweld.Part0 = Humanoid.Parent["Right Arm"]
		limbcolliderweld.Part1 = limbcollider
		limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
		for i,v in pairs(zombiecorpse["Right Arm"]:GetChildren()) do
			if v.ClassName == 'Motor6D' or v.ClassName == 'Weld' then
				v:destroy()
			end
		end
	end
	--
	if Humanoid.Parent:findFirstChild("Left Arm") then
		local limbcollider = Instance.new("Part", Humanoid.Parent["Left Arm"])
		limbcollider.Size = Vector3.new(1,1.3,1)
		limbcollider.Shape = "Cylinder"
		limbcollider.Transparency = 1
		local limbcolliderweld = Instance.new("Weld", limbcollider)
		limbcolliderweld.Part0 = Humanoid.Parent["Left Arm"]
		limbcolliderweld.Part1 = limbcollider
		limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
	end
	--
	if Humanoid.Parent:findFirstChild("Left Leg") then
		local limbcollider = Instance.new("Part", Humanoid.Parent["Left Leg"])
		limbcollider.Size = Vector3.new(1,1.3,1)
		limbcollider.Shape = "Cylinder"
		limbcollider.Transparency = 1
		local limbcolliderweld = Instance.new("Weld", limbcollider)
		limbcolliderweld.Part0 = Humanoid.Parent["Left Leg"]
		limbcolliderweld.Part1 = limbcollider
		limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
	end
	--
	if Humanoid.Parent:findFirstChild("Right Leg") then
		local limbcollider = Instance.new("Part", Humanoid.Parent["Right Leg"])
		limbcollider.Size = Vector3.new(1,1.3,1)
		limbcollider.Shape = "Cylinder"
		limbcollider.Transparency = 1
		local limbcolliderweld = Instance.new("Weld", limbcollider)
		limbcolliderweld.Part0 = Humanoid.Parent["Right Leg"]
		limbcolliderweld.Part1 = limbcollider
		limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.4,0,0)
	end
	local ragdoll = zombiecorpse
	if ragdoll:findFirstChild("HumanoidRootPart") then
		ragdoll.HumanoidRootPart.CanCollide = false
		ragdoll.HumanoidRootPart:destroy()
	end
end
npchumanoid.Died:connect(death)
spawn(run)
spawn(checkandshoot)
spawn(randomwalk)
while wait() do --check animations and other things
	if not walking and not shooting then
		for i = 0.2,0.8 , 0.09 do
			if not walking and not shooting then
				akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.599619389, -1.99128425, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, 0, 0, 1),i)
				righthip.C0 = righthip.C0:lerp(CFrame.new(0.599619389, -1.99128449, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1),i)
				root.C0 = root.C0:lerp(CFrame.new(0,0,0),i)
				neck.C0 = neck.C0:lerp(CFrame.new(0,1.5,0),i)
				wait()
			end
		end
	end
	if walking then --this is the walking animation
		for i = 0.2,0.8 , 0.09 do
			if walking then
				akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.527039051, -1.78302765, 0.642787695, 0.999390841, 0.026734557, 0.0224329531, -0.0348994918, 0.765577614, 0.642395973, 0, -0.642787635, 0.766044438),i)
				righthip.C0 = righthip.C0:lerp(CFrame.new(0.522737741, -1.65984559, -0.766044617, 0.999390841, -0.0224329531, 0.0267345682, 0.0348994918, 0.642395794, -0.765577734, 0, 0.766044497, 0.642787457),i)
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.996194661, 6.98491931e-09, -0.0871561021, 0.00759615982, 0.996194661, 0.0868242308, 0.0868244469, -0.087155886, 0.992403805),i)
				neck.C0 = neck.C0:lerp(CFrame.new(2.38418579e-07, 1.49809694, 0.0435779095, 0.996194661, 6.38283382e-09, 0.0871560946, 0.00759615889, 0.996194601, -0.0868242308, -0.0868244469, 0.087155886, 0.992403746),i)
				wait()
			end
		end
		head.footstep:Play()
		for i = 0.2,0.8 , 0.09 do
			if walking then
				akweld.C0 = akweld.C0:lerp(CFrame.new(-0.583096504, -1.87343168, 0.0918724537, 0.808914721, -0.582031429, 0.0830438882, -0.166903317, -0.0918986499, 0.981681228, -0.56373775, -0.807956576, -0.171481162),i)
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.32261992, 0.220639229, -0.279059082, 0.766044497, 0.604022682, -0.219846413, -0.492403805, 0.331587851, -0.804728508, -0.413175881, 0.724711061, 0.551434159),i)
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.16202736, -0.00836706161, -0.880517244, 0.939692557, -0.342020094, -2.98023224e-08, 0.171009958, 0.46984598, -0.866025567, 0.296198159, 0.813797832, 0.499999642),i)
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.520322084, -1.59067655, -0.819151878, 0.999390841, 0.0200175196, -0.028587997, -0.0348994918, 0.573226929, -0.818652987, 0, 0.819151998, 0.57357645),i)
				righthip.C0 = righthip.C0:lerp(CFrame.new(0.528892756, -1.83610249, 0.573575974, 0.999390841, -0.0285879895, -0.020017527, 0.0348994955, 0.818652987, 0.57322675, -7.4505806e-09, -0.573576212, 0.819152057),i)
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.996194661, -1.44354999e-08, 0.0871558934, -0.00759615237, 0.996194661, 0.0868244395, -0.0868242383, -0.0871560946, 0.992403805),i)
				neck.C0 = neck.C0:lerp(CFrame.new(0, 1.49809742, 0.0435781479, 0.996194601, -1.27129169e-08, -0.0871559009, -0.0075961519, 0.996194661, -0.0868244097, 0.0868242458, 0.0871560723, 0.992403746),i)
				wait()
			end
		end
		head.footstep:Play()
	end
	if shooting then --this is the shooting animation
		for i = 0.2,0.8 , 0.45 do
			if shooting then
				akweld.C0 = akweld.C0:lerp(CFrame.new(-0.109231472, -2.24730468, -0.300003052, 0.984807491, 1.94707184e-07, 0.173647866, -0.173648044, -2.68220873e-07, 0.984807491, 3.67846468e-07, -0.999999821, -8.00420992e-08),i)
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.173648223, 0, -0.98480773, 0, 1, 0, 0.98480773, 0, 0.173648223),i)
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.21384871, 0.500000477, -0.879925251, 0.342019856, 0.939692438, -1.49501886e-08, 1.94707184e-07, -2.68220873e-07, -0.999999821, -0.939692438, 0.342020035, -3.76157232e-07),i)
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.59201181, 0.470158577, -0.794548988, 0.271118939, 0.181368172, 0.945304275, 0.902039766, -0.390578717, -0.18377316, 0.335885108, 0.902526498, -0.269494623),i)
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
				righthip.C0 = righthip.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
				neck.C0 = neck.C0:lerp(CFrame.new(0.0296957493, 1.49240398, -0.0815882683, 0.336824059, 0.059391167, 0.939692557, -0.173648164, 0.98480773, -7.4505806e-09, -0.925416589, -0.163175896, 0.342020094),i)
				wait()
			end
		end
		for i = 0.2,0.8 , 0.45 do
			if shooting then
				akweld.C0 = akweld.C0:lerp(CFrame.new(-0.109231472, -2.24730468, -0.300003052, 0.984807491, 1.94707184e-07, 0.173647866, -0.173648044, -2.68220873e-07, 0.984807491, 3.67846468e-07, -0.999999821, -8.00420992e-08),i)
				root.C0 = root.C0:lerp(CFrame.new(0, 0, 0, 0.173648223, 0, -0.98480773, 0, 1, 0, 0.98480773, 0, 0.173648223),i)
				rightshoulder.C0 = rightshoulder.C0:lerp(CFrame.new(1.60777056, 0.499999523, -0.81046629, 0.342019439, 0.939691842, 1.55550936e-07, 4.10554577e-08, -3.93739697e-07, -0.999999464, -0.939691901, 0.342019975, -4.77612389e-07),i)
				leftshoulder.C0 = leftshoulder.C0:lerp(CFrame.new(-1.10000956, 0.482372284, -0.926761627, 0.27112025, 0.263066441, 0.925899446, 0.902039289, -0.405109912, -0.149033815, 0.335885197, 0.875603914, -0.347129732),i)
				lefthip.C0 = lefthip.C0:lerp(CFrame.new(-0.681244373, -2.07163191, 0, 0.98480773, 0.173648283, 0, -0.173648283, 0.98480767, 0, 0, -1.86264515e-09, 0.99999994),i)
				righthip.C0 = righthip.C0:lerp(CFrame.new(0.681244612, -2.07163191, -4.76837158e-07, 0.98480773, -0.173648283, 0, 0.173648283, 0.98480767, 0, 0, 1.86264515e-09, 0.99999994),i)
				neck.C0 = neck.C0:lerp(CFrame.new(0.121206045, 1.4753027, -0.0450725555, 0.336823881, 0.221664757, 0.915103495, -0.173648164, 0.969846308, -0.171010077, -0.925416648, -0.101305753, 0.365159094),i)
				wait()
			end
		end
	end
end


Prompt: --Scripted by DermonDarble

Response:
local userInputService = game:GetService("UserInputService")
local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
local character = player.Character
local humanoidRootPart = character.HumanoidRootPart
local car = script:WaitForChild("Car").Value
local stats = car:WaitForChild("Configurations")
local Raycast = require(car.CarScript.RaycastModule)

local cameraType = Enum.CameraType.Follow

local movement = Vector2.new()
local gamepadDeadzone = 0.14


Prompt:
------------------------------------------------------------------------
--
-- * used in luaK:dischargevars(), (lparser) luaY:assignment()
------------------------------------------------------------------------

Response:
function luaK:setoneret(fs, e)
  if e.k == "VCALL" then  -- expression is an open function call?
    e.k = "VNONRELOC"
    e.info = luaP:GETARG_A(self:getcode(fs, e))
  elseif e.k == "VVARARG" then
    luaP:SETARG_B(self:getcode(fs, e), 2)
    e.k = "VRELOCABLE"  -- can relocate its simple result
  end
end


Prompt:
-- ROBLOX upstream: https://github.com/facebook/jest/blob/v27.4.7/packages/jest-matcher-utils/src/deepCyclicCopyReplaceable.ts
-- /**
-- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
-- *
-- * This source code is licensed under the MIT license found in the
-- * LICENSE file in the root directory of this source tree.
-- */


Prompt: --[[Steering]]

Response:
	Tune.SteerInner		= 65		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 65		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .45		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .4		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree

	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 6000		-- Steering Aggressiveness


Prompt:
-- NOTE: To me, this appears a bit 'hackish' so I can't
-- promise that it will always work!

Response:
local h = script.Parent:WaitForChild("Humanoid")

h.Changed:connect(function()
	h.Jump = false	-- Yes, it's this simple
end)


Prompt:
--[=[
	`Stop` is called when the component is stopped. This occurs either when the
	bound instance is removed from one of the whitelisted ancestors _or_ when
	the matching tag is removed from the instance. This also means that the
	instance _might_ be destroyed, and thus it is not safe to continue using
	the bound instance (e.g. `self.Instance`) any longer.

	This should be used to clean up the component.

	```lua
	local MyComponent = Component.new({Tag = "MyComponent"})

	function MyComponent:Stop()
		self.SomeStuff:Destroy()
	end
	```
]=]

Response:
function Component:Stop()
end


Prompt: --Tune

Response:
local WheelieButton = "C"
local DeadZone = 70


Prompt: --[[Standardized Values: Don't touch unless needed]]

Response:
	--[WEIGHT // Cubic stud : pounds ratio]
	Tune.WeightScaling = 1/50	--Default = 1/50 (1 cubic stud = 50 lbs)
	Tune.LegacyScaling = 1/10	--Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF]

return Tune


Prompt: --print("Loading anims " .. name)

Response:
table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
local idx = 1
for _, childPart in pairs(config:GetChildren()) do
if (childPart:IsA("Animation")) then
table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
animTable[name][idx] = {}
animTable[name][idx].anim = childPart
local weightObject = childPart:FindFirstChild("Weight")
if (weightObject == nil) then
animTable[name][idx].weight = 1
else
animTable[name][idx].weight = weightObject.Value
end
animTable[name].count = animTable[name].count + 1
animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight


Prompt:
--- If you don't know where you can get your ID, then go to this link: https://pics.supersgames.cf/uploads/big/298a69fa7bd0c7b3a03e460568065562.png (ID marked in yellow). ---
--- Enable HttpEnabled when using this on your game ---
--- My official site is: www.supersgames.cf. ---


Prompt: --[[Brakes]]

Response:
	Tune.ABSEnabled		= false		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS)

	Tune.FBrakeForce	= 700		-- Front brake force
	Tune.RBrakeForce	= 500		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force

	Tune.FLgcyBForce	= 7000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 5000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]


Prompt: -- EVENTS

Response:
IconController.iconAdded = Signal.new()
IconController.iconRemoved = Signal.new()
IconController.controllerModeStarted = Signal.new()
IconController.controllerModeEnded = Signal.new()
IconController.healthbarDisabledSignal = Signal.new()


Prompt: --[[Engine]]

Response:
	--		[TORQUE CURVE VISUAL]
	--		https://www.desmos.com/calculator/nap6stpjqf
	--		Use sliders to manipulate values
	--		Edit everything as if your car is NATURALLY aspirated, or as if it lacks a turbo.

	Tune.Horsepower		= 400
	Tune.IdleRPM		= 700
	Tune.PeakRPM		= 5800
	Tune.Redline		= 7000
	Tune.EqPoint		= 6000
	Tune.PeakSharpness	= 20
	Tune.CurveMult		= 0.2

	Tune.InclineComp	= 1.2		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)

	--Turbo Settings
	Tune.Aspiration		= "Single"												--[[
	[Aspiration]
		"Natural"		: N/A, Naturally aspirated engine
		"Single"		: Single turbocharger
		"Double"		: Twin turbocharger											]]

	Tune.Boost			= 15		--Max PSI per turbo (If you have two turbos and this is 15, the PSI will be 30)
	Tune.TurboSize		= 18		--Turbo size; the bigger it is, the more lag it has.
	Tune.CompressRatio	= 10 		--The compression ratio (look it up)

	--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		= 150		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)


Prompt: --[[Wheel Configuration]]

Response:
	--Store Reference Orientation Function
	function getParts(model,t,a)
		for i,v in pairs(model:GetChildren()) do
			if v:IsA("BasePart") then table.insert(t,{v,a.CFrame:toObjectSpace(v.CFrame)})
			elseif v:IsA("Model") then getParts(v,t,a)
			end
		end
	end

	--PGS/Legacy
	local fDensity = _Tune.FWheelDensity
	local rDensity = _Tune.RWheelDensity
	if not PGS_ON then
		fDensity = _Tune.FWLgcyDensity
		rDensity = _Tune.RWLgcyDensity
	end

	local fDistX=_Tune.FWsBoneLen*math.cos(math.rad(_Tune.FWsBoneAngle))
	local fDistY=_Tune.FWsBoneLen*math.sin(math.rad(_Tune.FWsBoneAngle))
	local rDistX=_Tune.RWsBoneLen*math.cos(math.rad(_Tune.RWsBoneAngle))
	local rDistY=_Tune.RWsBoneLen*math.sin(math.rad(_Tune.RWsBoneAngle))

	local fSLX=_Tune.FSusLength*math.cos(math.rad(_Tune.FSusAngle))
	local fSLY=_Tune.FSusLength*math.sin(math.rad(_Tune.FSusAngle))
	local rSLX=_Tune.RSusLength*math.cos(math.rad(_Tune.RSusAngle))
	local rSLY=_Tune.RSusLength*math.sin(math.rad(_Tune.RSusAngle))

	for _,v in pairs(Drive) do
		--Apply Wheel Density
		if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
			if v:IsA("BasePart") then
				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
				v.CustomPhysicalProperties = PhysicalProperties.new(
					fDensity,
					v.CustomPhysicalProperties.Friction,
					v.CustomPhysicalProperties.Elasticity,
					v.CustomPhysicalProperties.FrictionWeight,
					v.CustomPhysicalProperties.ElasticityWeight
				)
			end
		else
			if v:IsA("BasePart") then
				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
				v.CustomPhysicalProperties = PhysicalProperties.new(
					rDensity,
					v.CustomPhysicalProperties.Friction,
					v.CustomPhysicalProperties.Elasticity,
					v.CustomPhysicalProperties.FrictionWeight,
					v.CustomPhysicalProperties.ElasticityWeight
				)
			end
		end

		--Resurface Wheels
		for _,a in pairs({"Top","Bottom","Left","Right","Front","Back"}) do
			v[a.."Surface"]=Enum.SurfaceType.SmoothNoOutlines
		end

		--Store Axle-Anchored/Suspension-Anchored Part Orientation
		local WParts = {}

		local tPos = v.Position-car.DriveSeat.Position
		if v.Name=="FL" or v.Name=="RL" then
			v.CFrame = car.DriveSeat.CFrame*CFrame.Angles(math.rad(90),0,math.rad(90))
		else
			v.CFrame = car.DriveSeat.CFrame*CFrame.Angles(math.rad(90),0,math.rad(-90))
		end
		v.CFrame = v.CFrame+tPos

		if v:FindFirstChild("Parts")~=nil then
			getParts(v.Parts,WParts,v)
		end
		if v:FindFirstChild("Fixed")~=nil then
			getParts(v.Fixed,WParts,v)
		end

		--Align Wheels
		if v.Name=="FL" or v.Name=="FR" then
			v.CFrame = v.CFrame*CFrame.Angles(math.rad(_Tune.FCamber),0,0)
			if v.Name=="FL" then
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(_Tune.FToe))
			else
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(-_Tune.FToe))
			end
		elseif v.Name=="RL" or v.Name=="RR" then
			v.CFrame = v.CFrame*CFrame.Angles(math.rad(_Tune.RCamber),0,0)
			if v.Name=="RL" then
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(_Tune.RToe))
			else
				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(-_Tune.RToe))
			end
		end

		--Re-orient Axle-Anchored/Suspension-Anchored Parts
		for _,a in pairs(WParts) do
			a[1].CFrame=v.CFrame:toWorldSpace(a[2])
		end


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .4		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .4		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .4		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 4			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .4		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .4		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .4		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 4			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Really black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

	--Front Suspension
	Tune.FSusDamping	= 200		-- Spring Dampening
	Tune.FSusStiffness	= 3000		-- Spring Force
	Tune.FSusLength		= 3		-- Suspension length (in studs)
	Tune.FSusMaxExt		= 1.5		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 70		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 5.7			-- Wishbone Length
	Tune.FWsBoneAngle	= 5			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 200		-- Spring Dampening
	Tune.RSusStiffness	= 3000		-- Spring Force
	Tune.RSusLength		= 3			-- Suspension length (in studs)
	Tune.RSusMaxExt		= 1.5		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .1   	-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 70		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 5.7			-- Wishbone Length
	Tune.RWsBoneAngle	= 5			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= true			-- Wishbone Visible
	Tune.SusRadius		= .4			-- Suspension Coil Radius
	Tune.SusThickness	= .0			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 3				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .0			-- Wishbone Rod Thickness


Prompt: -- ROBLOX deviation: There is no console width since we only have log fn

Response: local CONSOLE_WIDTH = 0


Prompt: --		print(animName .. " " .. idx .. " [" .. origRoll .. "]")

Response:
	local anim = animTable[animName][idx].anim

	-- switch animation
	if (anim ~= currentAnimInstance) then

		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0

		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		currentAnimTrack.Priority = Enum.AnimationPriority.Core

		-- play the animation
		currentAnimTrack:Play(transitionTime)
		currentAnim = animName
		currentAnimInstance = anim

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)

	end

end