Prompt:
--[[
	Construct the value that is assigned to Roact's context storage.
]]

Response:
local function createContextEntry(currentValue)
	return {
		value = currentValue,
		onUpdate = createSignal(),
	}
end

local function createProvider(context)
	local Provider = Component:extend("Provider")

	function Provider:init(props)
		self.contextEntry = createContextEntry(props.value)
		self:__addContext(context.key, self.contextEntry)
	end

	function Provider:willUpdate(nextProps)
		-- If the provided value changed, immediately update the context entry.
		--
		-- During this update, any components that are reachable will receive
		-- this updated value at the same time as any props and state updates
		-- that are being applied.
		if nextProps.value ~= self.props.value then
			self.contextEntry.value = nextProps.value
		end
	end

	function Provider:didUpdate(prevProps)
		-- If the provided value changed, after we've updated every reachable
		-- component, fire a signal to update the rest.
		--
		-- This signal will notify all context consumers. It's expected that
		-- they will compare the last context value they updated with and only
		-- trigger an update on themselves if this value is different.
		--
		-- This codepath will generally only update consumer components that has
		-- a component implementing shouldUpdate between them and the provider.
		if prevProps.value ~= self.props.value then
			self.contextEntry.onUpdate:fire(self.props.value)
		end
	end

	function Provider:render()
		return createFragment(self.props[Children])
	end

	return Provider
end

local function createConsumer(context)
	local Consumer = Component:extend("Consumer")

	function Consumer.validateProps(props)
		if type(props.render) ~= "function" then
			return false, "Consumer expects a `render` function"
		else
			return true
		end
	end

	function Consumer:init(_props)
		-- This value may be nil, which indicates that our consumer is not a
		-- descendant of a provider for this context item.
		self.contextEntry = self:__getContext(context.key)
	end

	function Consumer:render()
		-- Render using the latest available for this context item.
		--
		-- We don't store this value in state in order to have more fine-grained
		-- control over our update behavior.
		local value
		if self.contextEntry ~= nil then
			value = self.contextEntry.value
		else
			value = context.defaultValue
		end

		return self.props.render(value)
	end

	function Consumer:didUpdate()
		-- Store the value that we most recently updated with.
		--
		-- This value is compared in the contextEntry onUpdate hook below.
		if self.contextEntry ~= nil then
			self.lastValue = self.contextEntry.value
		end
	end

	function Consumer:didMount()
		if self.contextEntry ~= nil then
			-- When onUpdate is fired, a new value has been made available in
			-- this context entry, but we may have already updated in the same
			-- update cycle.
			--
			-- To avoid sending a redundant update, we compare the new value
			-- with the last value that we updated with (set in didUpdate) and
			-- only update if they differ. This may happen when an update from a
			-- provider was blocked by an intermediate component that returned
			-- false from shouldUpdate.
			self.disconnect = self.contextEntry.onUpdate:subscribe(function(newValue)
				if newValue ~= self.lastValue then
					-- Trigger a dummy state update.
					self:setState({})
				end
			end)
		end
	end

	function Consumer:willUnmount()
		if self.disconnect ~= nil then
			self.disconnect()
			self.disconnect = nil
		end
	end

	return Consumer
end

local Context = {}
Context.__index = Context

function Context.new(defaultValue)
	return setmetatable({
		defaultValue = defaultValue,
		key = Symbol.named("ContextKey"),
	}, Context)
end

function Context:__tostring()
	return "RoactContext"
end

local function createContext(defaultValue)
	local context = Context.new(defaultValue)

	return {
		Provider = createProvider(context),
		Consumer = createConsumer(context),
	}
end

return createContext


Prompt: --[[ Module functions ]]

Response:
--
function Invisicam:LimbBehavior(castPoints)
	for limb, _ in pairs(self.trackedLimbs) do
		castPoints[#castPoints + 1] = limb.Position
	end
end

function Invisicam:MoveBehavior(castPoints)
	for i = 1, MOVE_CASTS do
		local position, velocity = self.humanoidRootPart.Position, self.humanoidRootPart.Velocity
		local horizontalSpeed = Vector3.new(velocity.X, 0, velocity.Z).Magnitude / 2
		local offsetVector = (i - 1) * self.humanoidRootPart.CFrame.lookVector * horizontalSpeed
		castPoints[#castPoints + 1] = position + offsetVector
	end
end

function Invisicam:CornerBehavior(castPoints)
	local cframe = self.humanoidRootPart.CFrame
	local centerPoint = cframe.p
	local rotation = cframe - centerPoint
	local halfSize = self.char:GetExtentsSize() / 2 --NOTE: Doesn't update w/ limb animations
	castPoints[#castPoints + 1] = centerPoint
	for i = 1, #CORNER_FACTORS do
		castPoints[#castPoints + 1] = centerPoint + (rotation * (halfSize * CORNER_FACTORS[i]))
	end
end

function Invisicam:CircleBehavior(castPoints)
	local cframe
	if self.mode == MODE.CIRCLE1 then
		cframe = self.humanoidRootPart.CFrame
	else
		local camCFrame = self.camera.CoordinateFrame
		cframe = camCFrame - camCFrame.p + self.humanoidRootPart.Position
	end
	castPoints[#castPoints + 1] = cframe.p
	for i = 0, CIRCLE_CASTS - 1 do
		local angle = (2 * math.pi / CIRCLE_CASTS) * i
		local offset = 3 * Vector3.new(math.cos(angle), math.sin(angle), 0)
		castPoints[#castPoints + 1] = cframe * offset
	end
end

function Invisicam:LimbMoveBehavior(castPoints)
	self:LimbBehavior(castPoints)
	self:MoveBehavior(castPoints)
end

function Invisicam:CharacterOutlineBehavior(castPoints)
	local torsoUp = self.torsoPart.CFrame.upVector.unit
	local torsoRight = self.torsoPart.CFrame.rightVector.unit

	-- Torso cross of points for interior coverage
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoUp
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoUp
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoRight
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoRight
	if self.headPart then
		castPoints[#castPoints + 1] = self.headPart.CFrame.p
	end

	local cframe = CFrame.new(ZERO_VECTOR3,Vector3.new(self.camera.CoordinateFrame.lookVector.X,0,self.camera.CoordinateFrame.lookVector.Z))
	local centerPoint = (self.torsoPart and self.torsoPart.Position or self.humanoidRootPart.Position)

	local partsWhitelist = {self.torsoPart}
	if self.headPart then
		partsWhitelist[#partsWhitelist + 1] = self.headPart
	end

	for i = 1, CHAR_OUTLINE_CASTS do
		local angle = (2 * math.pi * i / CHAR_OUTLINE_CASTS)
		local offset = cframe * (3 * Vector3.new(math.cos(angle), math.sin(angle), 0))

		offset = Vector3.new(offset.X, math.max(offset.Y, -2.25), offset.Z)

		local ray = Ray.new(centerPoint + offset, -3 * offset)
		local hit, hitPoint = game.Workspace:FindPartOnRayWithWhitelist(ray, partsWhitelist, false, false)

		if hit then
			-- Use hit point as the cast point, but nudge it slightly inside the character so that bumping up against
			-- walls is less likely to cause a transparency glitch
			castPoints[#castPoints + 1] = hitPoint + 0.2 * (centerPoint - hitPoint).unit
		end
	end
end

function Invisicam:SmartCircleBehavior(castPoints)
	local torsoUp = self.torsoPart.CFrame.upVector.unit
	local torsoRight = self.torsoPart.CFrame.rightVector.unit

	-- SMART_CIRCLE mode includes rays to head and 5 to the torso.
	-- Hands, arms, legs and feet are not included since they
	-- are not canCollide and can therefore go inside of parts
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoUp
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoUp
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p + torsoRight
	castPoints[#castPoints + 1] = self.torsoPart.CFrame.p - torsoRight
	if self.headPart then
		castPoints[#castPoints + 1] = self.headPart.CFrame.p
	end

	local cameraOrientation = self.camera.CFrame - self.camera.CFrame.p
	local torsoPoint = Vector3.new(0,0.5,0) + (self.torsoPart and self.torsoPart.Position or self.humanoidRootPart.Position)
	local radius = 2.5

	-- This loop first calculates points in a circle of radius 2.5 around the torso of the character, in the
	-- plane orthogonal to the camera's lookVector. Each point is then raycast to, to determine if it is within
	-- the free space surrounding the player (not inside anything). Two iterations are done to adjust points that
	-- are inside parts, to try to move them to valid locations that are still on their camera ray, so that the
	-- circle remains circular from the camera's perspective, but does not cast rays into walls or parts that are
	-- behind, below or beside the character and not really obstructing view of the character. This minimizes
	-- the undesirable situation where the character walks up to an exterior wall and it is made invisible even
	-- though it is behind the character.
	for i = 1, SMART_CIRCLE_CASTS do
		local angle = SMART_CIRCLE_INCREMENT * i - 0.5 * math.pi
		local offset = radius * Vector3.new(math.cos(angle), math.sin(angle), 0)
		local circlePoint = torsoPoint + cameraOrientation * offset

		-- Vector from camera to point on the circle being tested
		local vp = circlePoint - self.camera.CFrame.p

		local ray = Ray.new(torsoPoint, circlePoint - torsoPoint)
		local hit, hp, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {self.char}, false, false )
		local castPoint = circlePoint

		if hit then
			local hprime = hp + 0.1 * hitNormal.unit -- Slightly offset hit point from the hit surface
			local v0 = hprime - torsoPoint -- Vector from torso to offset hit point

			local perp = (v0:Cross(vp)).unit

			-- Vector from the offset hit point, along the hit surface
			local v1 = (perp:Cross(hitNormal)).unit

			-- Vector from camera to offset hit
			local vprime = (hprime - self.camera.CFrame.p).unit

			-- This dot product checks to see if the vector along the hit surface would hit the correct
			-- side of the invisicam cone, or if it would cross the camera look vector and hit the wrong side
			if ( v0.unit:Dot(-v1) < v0.unit:Dot(vprime)) then
				castPoint = RayIntersection(hprime, v1, circlePoint, vp)

				if castPoint.Magnitude > 0 then
					local ray = Ray.new(hprime, castPoint - hprime)
					local hit, hitPoint, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {self.char}, false, false )

					if hit then
						local hprime2 = hitPoint + 0.1 * hitNormal.unit
						castPoint = hprime2
					end
				else
					castPoint = hprime
				end
			else
				castPoint = hprime
			end

			local ray = Ray.new(torsoPoint, (castPoint - torsoPoint))
			local hit, hitPoint, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {self.char}, false, false )

			if hit then
				local castPoint2 = hitPoint - 0.1 * (castPoint - torsoPoint).unit
				castPoint = castPoint2
			end
		end

		castPoints[#castPoints + 1] = castPoint
	end
end

function Invisicam:CheckTorsoReference()
	if self.char then
		self.torsoPart = self.char:FindFirstChild("Torso")
		if not self.torsoPart then
			self.torsoPart = self.char:FindFirstChild("UpperTorso")
			if not self.torsoPart then
				self.torsoPart = self.char:FindFirstChild("HumanoidRootPart")
			end
		end

		self.headPart = self.char:FindFirstChild("Head")
	end
end

function Invisicam:CharacterAdded(char, player)
	-- We only want the LocalPlayer's character
	if player~=PlayersService.LocalPlayer then return end

	if self.childAddedConn then
		self.childAddedConn:Disconnect()
		self.childAddedConn = nil
	end
	if self.childRemovedConn then
		self.childRemovedConn:Disconnect()
		self.childRemovedConn = nil
	end

	self.char = char

	self.trackedLimbs = {}
	local function childAdded(child)
		if child:IsA("BasePart") then
			if LIMB_TRACKING_SET[child.Name] then
				self.trackedLimbs[child] = true
			end

			if child.Name == "Torso" or child.Name == "UpperTorso" then
				self.torsoPart = child
			end

			if child.Name == "Head" then
				self.headPart = child
			end
		end
	end

	local function childRemoved(child)
		self.trackedLimbs[child] = nil

		-- If removed/replaced part is 'Torso' or 'UpperTorso' double check that we still have a TorsoPart to use
		self:CheckTorsoReference()
	end

	self.childAddedConn = char.ChildAdded:Connect(childAdded)
	self.childRemovedConn = char.ChildRemoved:Connect(childRemoved)
	for _, child in pairs(self.char:GetChildren()) do
		childAdded(child)
	end
end

function Invisicam:SetMode(newMode)
	AssertTypes(newMode, 'number')
	for _, modeNum in pairs(MODE) do
		if modeNum == newMode then
			self.mode = newMode
			self.behaviorFunction = self.behaviors[self.mode]
			return
		end
	end
	error("Invalid mode number")
end

function Invisicam:GetObscuredParts()
	return self.savedHits
end


Prompt: -- @outline // RUNNER

Response:
function Module.ClientInit()
	Module.CreateModel()
end

function Module.ClientUpdate(dt)
	local Cam = game.Workspace.CurrentCamera

	Module.Model:SetPrimaryPartCFrame(Cam.CFrame * CFrame.new(1.5, -1, -1.5))
end

return Module


Prompt:
--[[
		___      _______                _
	   / _ |____/ ___/ /  ___ ____ ___ (_)__
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]

Response:
local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 220				,
		spInc			= 20				, -- Increment between labelled notches
	},

	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 360				,
		spInc			= 30				, -- Increment between labelled notches
	},

	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 320				,
		spInc			= 40				, -- Increment between labelled notches
	}
}


Prompt: --[[Controls]]

Response:
	local _CTRL = _Tune.Controls
	local Controls = Instance.new("Folder")
	Controls.Name = "Controls"
	Controls.Parent = script.Parent
	for i,v in pairs(_CTRL) do
		local a=Instance.new("StringValue")
		a.Name=i
		a.Value=v.Name
		a.Parent = Controls
		a.Changed:Connect(function()
			if i=="MouseThrottle" or i=="MouseBrake" then
				if a.Value == "MouseButton1" or a.Value == "MouseButton2" then
					_CTRL[i]=Enum.UserInputType[a.Value]
				else
					_CTRL[i]=Enum.KeyCode[a.Value]
				end
			else
				_CTRL[i]=Enum.KeyCode[a.Value]
			end
		end)
	end

	--Deadzone Adjust
	local _PPH = _Tune.Peripherals
		for i,v in pairs(_PPH) do
		local a = Instance.new("IntValue")
		a.Name = i
		a.Value = v
		a.Parent = Controls
		a.Changed:Connect(function()
			a.Value=math.min(100,math.max(0,a.Value))
			_PPH[i] = a.Value
		end)
	end

	--Input Handler
	function DealWithInput(input,IsRobloxFunction)
		if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus
			--Shift Down [Manual Transmission]
			if _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.max(_CGear-1,-1)

			--Shift Up [Manual Transmission]
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.min(_CGear+1,#_Tune.Ratios-2)

			--Toggle Clutch
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then
				if input.UserInputState == Enum.UserInputState.Begin then
					_ClutchOn = false
					_ClPressing = true
				elseif input.UserInputState == Enum.UserInputState.End then
					_ClutchOn = true
					_ClPressing = false
				end

			--Toggle PBrake
			elseif _IsOn and  input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_PBrake = not _PBrake
				elseif input.UserInputState == Enum.UserInputState.End then
					if car.DriveSeat.Velocity.Magnitude>5 then
						_PBrake = false
					end
				end

			--Toggle Transmission Mode
			elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then
				local n=1
				for i,v in pairs(_Tune.TransModes) do
					if v==_TMode then n=i break end
				end
				n=n+1
				if n>#_Tune.TransModes then n=1 end
				_TMode = _Tune.TransModes[n]

			--Throttle
			elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GThrot = 1
				else
					_GThrot = _Tune.IdleThrottle/100
				end

			--Brake
			elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ((((_CTRL["MouseBrake"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseBrake"]) or input.KeyCode == _CTRL["MouseBrake"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GBrake = 1
				else
					_GBrake = 0
				end

			--Steer Left
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = -1
					_SteerL = true
				else
					if _SteerR then
						_GSteerT = 1
					else
						_GSteerT = 0
					end
					_SteerL = false
				end

			--Steer Right
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = 1
					_SteerR = true
				else
					if _SteerL then
						_GSteerT = -1
					else
						_GSteerT = 0
					end
					_SteerR = false
				end

			--Toggle Mouse Controls
			elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then
				if input.UserInputState == Enum.UserInputState.End then
					_MSteer = not _MSteer
					_GThrot = _Tune.IdleThrottle/100
					_GBrake = 0
					_GSteerT = 0
					_ClutchOn = true
				end

			--Toggle TCS
			elseif  _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then
				if input.UserInputState == Enum.UserInputState.End then
					_TCS = not _TCS
				end

			--Toggle ABS
			elseif  _Tune. ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then
				if input.UserInputState == Enum.UserInputState.End then
					_ABS = not _ABS
				end
			end

			--Variable Controls
			if input.UserInputType.Name:find("Gamepad") then
				--Gamepad Steering
				if input.KeyCode == _CTRL["ContlrSteer"] then
					if input.Position.X>= 0 then
						local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X-cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					else
						local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X+cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					end

				--Gamepad Throttle
				elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
					_GThrot = math.max(_Tune.IdleThrottle/100,input.Position.Z)

				--Gamepad Brake
				elseif input.KeyCode == _CTRL["ContlrBrake"] then
					_GBrake = input.Position.Z
				end
			end
		else
			_GThrot = _Tune.IdleThrottle/100
			_GSteerT = 0
			_GBrake = 0
			if _CGear~=0 then _ClutchOn = true end
		end
	end
	UserInputService.InputBegan:connect(DealWithInput)
	UserInputService.InputChanged:connect(DealWithInput)
	UserInputService.InputEnded:connect(DealWithInput)


Prompt:
--[[**
	Yields the current thread until the specified amount of seconds have elapsed. This uses Heartbeat to avoid using the legacy scheduler.

	@param [t:optional<t:numberMin<0>>] Seconds The amount of seconds the thread will be yielded for. Defaults to 0.03.
	@returns [t:number] The actual time yielded (in seconds).
**--]]

Response:
function Scheduler.Wait(Seconds)
	assert(OptionalNonNegativeNumber(Seconds))
	Seconds = math.max(Seconds or 0.03, 0)
	local TimeRemaining = Seconds

	while TimeRemaining > 0 do
		TimeRemaining = TimeRemaining - Heartbeat:Wait()
	end

	return Seconds - TimeRemaining
end


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

Response:
function PlaySound()
	script.Sound:Play();
end;
script.Parent.MouseButton1Click:Connect(PlaySound);


Prompt:
--[[
	A signal value indicating that a child should use its parent's key, because
	it has no key of its own.

	This occurs when you return only one element from a function component or
	stateful render function.
]]

Response:
ElementUtils.UseParentKey = Symbol.named("UseParentKey")

type Iterator<K, V> = ({ [K]: V }, K?) -> (K?, V?)
type Element = { [any]: any }


Prompt: --Made by Luckymaxer

Response:
Figure = script.Parent

RunService = game:GetService("RunService")

Creator = Figure:FindFirstChild("Creator")

Humanoid = Figure:WaitForChild("Humanoid")
Head = Figure:WaitForChild("Head")
Torso = Figure:WaitForChild("Torso")

Neck = Torso:WaitForChild("Neck")
LeftShoulder = Torso:WaitForChild("Left Shoulder")
RightShoulder = Torso:WaitForChild("Right Shoulder")
LeftHip = Torso:WaitForChild("Left Hip")
RightHip = Torso:WaitForChild("Right Hip")

for i, v in pairs({--[[Neck, ]]LeftShoulder, RightShoulder, LeftHip, RightHip}) do
	if v and v.Parent then
		v.DesiredAngle = 0
		v.CurrentAngle = 0
	end
end

Pose = "None"
LastPose = Pose
PoseTime = tick()

ToolAnimTime = 0

function SetPose(pose)
	LastPose = Pose
	Pose = pose
	PoseTime = tick()
end

function OnRunning(Speed)
	if Speed > 0 then
		SetPose("Running")
	else
		SetPose("Standing")
	end
end

function OnDied()
	SetPose("Dead")
end

function OnJumping()
	SetPose("Jumping")
end

function OnClimbing()
	SetPose("Climbing")
end

function OnGettingUp()
	SetPose("GettingUp")
end

function OnFreeFall()
	SetPose("FreeFall")
end

function OnFallingDown()
	SetPose("FallingDown")
end

function OnSeated()
	SetPose("Seated")
end

function OnPlatformStanding()
	SetPose("PlatformStanding")
end

function OnSwimming(Speed)
	return OnRunning(Speed)
end

function MoveJump()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle = 0.5
	LeftShoulder.DesiredAngle = -0.5
	RightHip.DesiredAngle = -0.5
	LeftHip.DesiredAngle = 0.5
end

function MoveFreeFall()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle = 0.5
	LeftShoulder.DesiredAngle = -0.5
	RightHip.DesiredAngle = -0.5
	LeftHip.DesiredAngle = 0.5
end

function MoveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle = (math.pi / 2)
	LeftShoulder.DesiredAngle = -(math.pi / 2)
	RightHip.DesiredAngle = 1
	LeftHip.DesiredAngle = -1
end

function GetTool()
	for i, v in pairs(Figure:GetChildren()) do
		if v:IsA("Tool") then
			return v
		end
	end
end

function GetToolAnim(Tool)
	for i, v in pairs(Tool:GetChildren()) do
		if v:IsA("StringValue") and v.Name == "ToolAnim" then
			return v
		end
	end
	return nil
end

function AnimateTool()

	if (ToolAnim == "None") then
		return
	end

	if (ToolAnim == "Slash") then
		RightShoulder.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = 0
		return
	end

	if (ToolAnim == "Lunge") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		RightHip.MaxVelocity = 0.5
		LeftHip.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = (math.pi / 2)
		LeftShoulder.DesiredAngle = 0
		RightHip.DesiredAngle = (math.pi / 2)
		LeftHip.DesiredAngle = 1
		return
	end

end

function Move(Time)
	local LimbAmplitude
	local LimbFrequency
	local NeckAmplitude
	local NeckFrequency
	local NeckDesiredAngle

	if (Pose == "Jumping") then
		MoveJump()
		return
	elseif (Pose == "FreeFall") then
		MoveFreeFall()
		return
	elseif (Pose == "Seated") then
		MoveSit()
		return
	end

	local ClimbFudge = 0

	if (Pose == "Running") then
		RightShoulder.MaxVelocity = 0.15
		LeftShoulder.MaxVelocity = 0.15
		LimbAmplitude = 1
		LimbFrequency = 9
		NeckAmplitude = 0
		NeckFrequency = 0
		NeckDesiredAngle = 0
		--[[if Creator and Creator.Value and Creator.Value:IsA("Player") and Creator.Value.Character then
			local CreatorCharacter = Creator.Value.Character
			local CreatorHead = CreatorCharacter:FindFirstChild("Head")
			if CreatorHead then
				local TargetPosition = CreatorHead.Position
				local Direction = Torso.CFrame.lookVector
				local HeadPosition = Head.Position
				NeckDesiredAngle = ((((HeadPosition - TargetPosition).Unit):Cross(Direction)).Y / 4)
			end
		end]]
	elseif (Pose == "Climbing") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		LimbAmplitude = 1
		LimbFrequency = 9
		NeckAmplitude = 0
		NeckFrequency = 0
		NeckDesiredAngle = 0
		ClimbFudge = math.pi
	else
		LimbAmplitude = 0.1
		LimbFrequency = 1
		NeckAmplitude = 0.25
		NeckFrequency = 1.25
	end

	NeckDesiredAngle = ((not NeckDesiredAngle and (NeckAmplitude * math.sin(Time * NeckFrequency))) or NeckDesiredAngle)
	LimbDesiredAngle = (LimbAmplitude * math.sin(Time * LimbFrequency))

	--Neck.DesiredAngle = NeckDesiredAngle
	RightShoulder.DesiredAngle = (LimbDesiredAngle + ClimbFudge)
	LeftShoulder.DesiredAngle = (LimbDesiredAngle - ClimbFudge)
	RightHip.DesiredAngle = -LimbDesiredAngle
	LeftHip.DesiredAngle = -LimbDesiredAngle

	local Tool = GetTool()

	if Tool then

		AnimStringValueObject = GetToolAnim(Tool)

		if AnimStringValueObject then
			ToolAnim = AnimStringValueObject.Value
			if AnimStringValueObject and AnimStringValueObject.Parent then
				AnimStringValueObject:Destroy()
			end
			ToolAnimTime = (Time + 0.3)
		end

		if Time > ToolAnimTime then
			ToolAnimTime = 0
			ToolAnim = "None"
		end

		AnimateTool()

	else
		ToolAnim = "None"
		ToolAnimTime = 0
	end

end

Humanoid.Died:connect(OnDied)
Humanoid.Running:connect(OnRunning)
Humanoid.Jumping:connect(OnJumping)
Humanoid.Climbing:connect(OnClimbing)
Humanoid.GettingUp:connect(OnGettingUp)
Humanoid.FreeFalling:connect(OnFreeFall)
Humanoid.FallingDown:connect(OnFallingDown)
Humanoid.Seated:connect(OnSeated)
Humanoid.PlatformStanding:connect(OnPlatformStanding)
Humanoid.Swimming:connect(OnSwimming)

Humanoid:ChangeState(Enum.HumanoidStateType.None)

RunService.Stepped:connect(function()
	local _, Time = wait(0.1)
	Move(Time)
end)


Prompt:
-- May return NaN or inf or -inf
-- This is a way of finding the angle between the two vectors:

Response:
local function findAngleBetweenXZVectors(vec2, vec1)
	return math.atan2(vec1.X*vec2.Z-vec1.Z*vec2.X, vec1.X*vec2.X + vec1.Z*vec2.Z)
end

local function GetOrientationZY(backVector, upVector)
	local rightVector = upVector:Cross(backVector).unit;
	local upVector = backVector:Cross(rightVector).unit;
	backVector = backVector.unit;
	return CFrame.new(0, 0, 0, rightVector.x, upVector.x, backVector.x, rightVector.y, upVector.y, backVector.y, rightVector.z, upVector.z, backVector.z);
end

local function CreateClassicCamera()
	local module = RootCameraCreator()

	local tweenAcceleration = math.rad(220)
	local tweenSpeed = math.rad(0)
	local tweenMaxSpeed = math.rad(250)
	local timeBeforeAutoRotate = 2

	local lastThumbstickRotate = nil
	local numOfSeconds = 0.7
	local currentSpeed = 0
	local maxSpeed = 0.1
	local thumbstickSensitivity = 1
	local lastThumbstickPos = Vector2.new(0,0)
	local ySensitivity = 0.8
	local lastVelocity = nil

	local lastUpdate = tick()
	module.LastUserPanCamera = tick()
	function module:Update()
		local now = tick()

		local userPanningTheCamera = (self.UserPanningTheCamera == true)
		local camera = 	workspace.CurrentCamera
		local player = PlayersService.LocalPlayer
		local humanoid = self:GetHumanoid()
		local cameraSubject = camera and camera.CameraSubject
		local isInVehicle = cameraSubject and cameraSubject:IsA('VehicleSeat')
		local isOnASkateboard = cameraSubject and cameraSubject:IsA('SkateboardPlatform')

		if lastUpdate == nil or now - lastUpdate > 1 then
			module:ResetCameraLook()
			self.LastCameraTransform = nil
		end

		if lastUpdate then
			-- Cap out the delta to 0.5 so we don't get some crazy things when we re-resume from
			local delta = math.min(0.5, now - lastUpdate)
			local angle = 0
			if not (isInVehicle or isOnASkateboard) then
				angle = angle + (self.TurningLeft and -120 or 0)
				angle = angle + (self.TurningRight and 120 or 0)
			end

			local gamepadRotation = self:UpdateGamepad()
			if gamepadRotation ~= Vector2.new(0,0) then
				userPanningTheCamera = true
				self.RotateInput = self.RotateInput + gamepadRotation
			end

			if angle ~= 0 then
				userPanningTheCamera = true
				self.RotateInput = self.RotateInput + Vector2.new(math.rad(angle * delta), 0)
			end
		end

		-- Reset tween speed if user is panning
		if userPanningTheCamera then
			tweenSpeed = 0
			module.LastUserPanCamera = tick()
		end

		local userRecentlyPannedCamera = now - module.LastUserPanCamera < timeBeforeAutoRotate
		local subjectPosition = self:GetSubjectPosition()

		if subjectPosition and player and camera then
			local zoom = self:GetCameraZoom()
			if zoom < 0.5 then
				zoom = 0.5
			end

			if self:GetShiftLock() and not self:IsInFirstPerson() then
				-- We need to use the right vector of the camera after rotation, not before
				local newLookVector = self:RotateCamera(self:GetCameraLook(), self.RotateInput)
				local offset = ((newLookVector * XZ_VECTOR):Cross(UP_VECTOR).unit * 1.75)

				if IsFiniteVector3(offset) then
					subjectPosition = subjectPosition + offset
				end
			else
				if self.LastCameraTransform and not userPanningTheCamera then
					local isInFirstPerson = self:IsInFirstPerson()
					if (isInVehicle or isOnASkateboard) and lastUpdate and humanoid and humanoid.Torso then
						if isInFirstPerson then
							if self.LastSubjectCFrame and (isInVehicle or isOnASkateboard) and cameraSubject:IsA('BasePart') then
								local y = -findAngleBetweenXZVectors(self.LastSubjectCFrame.lookVector, cameraSubject.CFrame.lookVector)
								if IsFinite(y) then
									self.RotateInput = self.RotateInput + Vector2.new(y, 0)
								end
								tweenSpeed = 0
							end
						elseif not userRecentlyPannedCamera then
							local forwardVector = humanoid.Torso.CFrame.lookVector
							if isOnASkateboard then
								forwardVector = cameraSubject.CFrame.lookVector
							end
							local timeDelta = (now - lastUpdate)

							tweenSpeed = clamp(0, tweenMaxSpeed, tweenSpeed + tweenAcceleration * timeDelta)

							local percent = clamp(0, 1, tweenSpeed * timeDelta)
							if self:IsInFirstPerson() then
								percent = 1
							end

							local y = findAngleBetweenXZVectors(forwardVector, self:GetCameraLook())
							if IsFinite(y) and math.abs(y) > 0.0001 then
								self.RotateInput = self.RotateInput + Vector2.new(y * percent, 0)
							end
						end
					end
				end
			end

			local newLookVector = self:RotateCamera(self:GetCameraLook(), self.RotateInput)
			self.RotateInput = Vector2.new()

			camera.Focus = CFrame.new(subjectPosition)
			local downVector = (self.DownVector or {Value=Vector3.new(0, -1, 0)}).Value;
			local camOrientation = GetOrientationZY(-newLookVector, -downVector);
			camera.CoordinateFrame = CFrame.new(camera.Focus.p) * camOrientation * CFrame.new(0, 0, zoom);
			self.LastCameraTransform = camera.CoordinateFrame
			if isInVehicle or isOnASkateboard and cameraSubject:IsA('BasePart') then
				self.LastSubjectCFrame = cameraSubject.CFrame
			else
				self.LastSubjectCFrame = nil
			end
		end

		lastUpdate = now
	end

	return module
end

return CreateClassicCamera


Prompt:
--[[
		___      _______                _
	   / _ |____/ ___/ /  ___ ____ ___ (_)__
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]

Response:
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_SoundsMisc")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.6

script:WaitForChild("Rel")
script:WaitForChild("Start")

script.Parent.Values.Gear.Changed:connect(function() mult=1 end)

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rel",car.DriveSeat,script.Rel.SoundId,0,script.Rel.Volume,true)
handler:FireServer("newSound","Start",car.DriveSeat,script.Start.SoundId,1,script.Start.Volume,false)
handler:FireServer("playSound","Rel")
car.DriveSeat:WaitForChild("Rel")
car.DriveSeat:WaitForChild("Start")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	if script.Parent.Values.PreOn.Value then
		handler:FireServer("playSound","Start")
		wait(1.2)
	else
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		RelVolume = 10*(1 - math.min(((script.Parent.Values.RPM.Value*3)/_Tune.Redline),1))
		RelPitch = (math.max((((script.Rel.SetPitch.Value + script.Rel.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rel.SetPitch.Value)) * on
	end
	if FE then
		handler:FireServer("updateSound","Rel",script.Rel.SoundId,RelPitch,RelVolume)
	else
		car.DriveSeat.Rel.Volume = RelVolume
		car.DriveSeat.Rel.Pitch = RelPitch
	end
end


Prompt: --!strict

Response:
local Array = script.Parent
local isArray = require(Array.isArray)
type Array<T> = { [number]: T }

local RECEIVED_OBJECT_ERROR = "Array.concat(...) only works with array-like tables but "
	.. "it received an object-like table.\nYou can avoid this error by wrapping the "
	.. "object-like table into an array. Example: `concat({1, 2}, {a = true})` should "
	.. "be `concat({1, 2}, { {a = true} }`"


Prompt: --[[Transmission]]

Response:
	Tune.Clutch			= true		-- Implements a realistic clutch, change to "false" for the chassis to act like AC6.81T.

	Tune.TransModes		= {"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													]]

	Tune.ClutchMode		= "New"												--[[
	[Modes]
		"New"		: Speed controls clutch engagement			(AC6C V1.2)
		"Old"		: Speed and RPM control clutch engagement	(AC6C V1.1)		]]

	--Transmission Settings
	Tune.Stall			= true		-- Stalling, enables the car to stall. An ignition plugin would be necessary. Disables if Tune.Clutch is false.
	Tune.ClutchRel		= false		-- If true, the driver must let off the gas before shifting to a higher gear. Recommended false for beginners.
	Tune.ClutchEngage	= 25		-- How fast engagement is (0 = instant, 99 = super slow)
	Tune.SpeedEngage 	= 15		-- Speed the clutch fully engages at (Based on SPS)

	--Clutch: "Old" mode
	Tune.ClutchRPMMult	= 1.0		-- Clutch RPM multiplier, recommended to leave at 1.0

	--Automatic Settings
	Tune.AutoShiftMode	= "RPM"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM										]]
	Tune.AutoShiftType	= "DCT"												--[[
	[Types]
		"Rev"		: Clutch engages fully once RPM reached			(AC6C V1)
		"DCT"		: Clutch engages after a set time has passed	(AC6.81T)	]]
	Tune.AutoShiftVers	= "New"												--[[
	[Versions]
		"New"		: Shift from Reverse, Neutral, and Drive		(AC6.81T)
		"Old"		: Auto shifts into R or D when stopped.			(AC6.52S2)	]]
	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)

	--Automatic: Revmatching
	Tune.ShiftThrot		= 100		-- Throttle level when shifting down to revmatch, 0 - 100%

	--Automatic: DCT
	Tune.ShiftUpTime	= 0.25		-- Time required to shift into next gear, from a lower gear to a higher one.
	Tune.ShiftDnTime	= 0.125		-- Time required to shift into next gear, from a higher gear to a lower one.

	--Gear Ratios

	Tune.FinalDrive		= 4
	Tune.Ratios			= {
		--[[Reverse]]	5			,
		--[[Neutral]]	0			,
		--[[ 1 ]]		3.9			,
		--[[ 2 ]]		2.52		,
		--[[ 3 ]]		1.85		,
		--[[ 4 ]]		1.38		,
		--[[ 5 ]]		1.05		,
		--[[ 6 ]]		.87			,
	}
	Tune.FDMult			= 1			-- Ratio multiplier (keep this at 1 if car is not struggling with torque)


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

	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
		Car.BodyVelocity.velocity = Vector3.new(0, -20, 0)
	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:FindFirstChild(script.Parent.Name)
		then StopE() DoorOpen()
	end
end)end)

function StopE()
 Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
 Car.BodyPosition.position = Elevator.Floors:FindFirstChild(script.Parent.Name).Position
	clicker = true
end

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


Prompt: --lighting.Technology = default

Response:
button.MouseButton1Down:connect(function()
	toggle = not toggle
	if toggle == true then
		button.Text = "low"
		lighting.GlobalShadows = false
		--lighting.Technology = "ShadowMap"
	else
		button.Text = "high"
		lighting.GlobalShadows = true
		--lighting.Technology = "Future"
	end
end)


Prompt:
--[[
	Package link auto-generated by Rotriever
]]

Response:
local PackageIndex = script.Parent.Parent.Parent._Index

local Package = require(PackageIndex["JestMessageUtil"]["JestMessageUtil"])

export type StackTraceConfig = Package.StackTraceConfig
export type StackTraceOptions = Package.StackTraceOptions

return Package


Prompt:
--[[
	This component acts as a stand-in for the ScreenshotHud camera button.

	In the event that ScreenshotHud is not available (from the flag being off or
	when testing in stories) we render our own camera button so we can see how
	everything will look before hitting production.

	When ScreenshotHud is available, this component acts as a "phantom" by
	setting CameraButtonPosition to the position of this component/ This creates
	a Frame that the ScreenshotHud's camera button will follow to make it look
	like it's part of the actual Roact tree.
]]

Response:
local SelfieMode = script:FindFirstAncestor("SelfieMode")

local ExperienceComponents = require(SelfieMode.Packages.ExperienceComponents)
local Roact = require(SelfieMode.Packages.Roact)
local assets = require(SelfieMode.assets)

local BACKGROUND_COLOR = Color3.fromHex("#00b46d")
local CONTENT_COLOR = Color3.fromHex("#fff")

local function shift(color: Color3, percent: number)
	local h, s, v = color:ToHSV()
	return Color3.fromHSV(h, s, v * percent)
end

local PhotoButton = Roact.Component:extend("PhotoButton")

export type Props = {
	layoutOrder: number?,
	size: UDim2?,
	screenshotHud: ScreenshotHud?,
	keyCode: Enum.KeyCode?,
	onActivated: (() -> ())?,
	transparency: any?,
}

function PhotoButton:init()
	self.setGuiPosition = function(rbx: Frame)
		local props: Props = self.props

		if props.screenshotHud then
			local offset = rbx.AbsoluteSize / 2
			local position = rbx.AbsolutePosition + offset

			props.screenshotHud.CameraButtonPosition = UDim2.fromOffset(position.X, position.Y)
		end
	end
end

function PhotoButton:render()
	local props: Props = self.props

	if props.screenshotHud then
		return Roact.createElement("Frame", {
			LayoutOrder = props.layoutOrder,
			Size = props.size,
			BackgroundTransparency = 1,
			[Roact.Change.AbsolutePosition] = self.setGuiPosition,
		})
	else
		return Roact.createElement(ExperienceComponents.PillButton, {
			layoutOrder = props.layoutOrder,
			backgroundColor = BACKGROUND_COLOR,
			borderColor = shift(BACKGROUND_COLOR, 0.8),
			borderSize = if props.keyCode then 0 else 6,
			contentColor = CONTENT_COLOR,
			text = if props.keyCode then "Take Photo" else nil,
			icon = assets.CameraFilled,
			size = props.size,
			keyCode = props.keyCode,
			onActivated = props.onActivated,
			transparency = props.transparency,
		})
	end
end

return PhotoButton


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 2500		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		9		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible

	--Unsprung Weight
	Tune.FWheelDensity	= 1.0 	-- Front Wheel Density
	Tune.RWheelDensity	= 1.0		-- 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: -- yaw-axis rotational velocity of a part with a given CFrame and total RotVelocity

Response:
local function yawVelocity(rotVel, cf)
	return math.abs(cf.YVector:Dot(rotVel))
end

local worldDt = 1/60
local VRVehicleCamera = setmetatable({}, VRBaseCamera)
VRVehicleCamera.__index = VRVehicleCamera

function VRVehicleCamera.new()
	local self = setmetatable(VRBaseCamera.new(), VRVehicleCamera)
	self:Reset()

	-- track physics solver time delta separately from the render loop to correctly synchronize time delta
	RunService.Stepped:Connect(function(_, _worldDt)
		worldDt = _worldDt
	end)

	return self
end

function VRVehicleCamera:Reset()
	self.vehicleCameraCore = VehicleCameraCore.new(self:GetSubjectCFrame())
	self.pitchSpring = Spring.new(0, -math.rad(VehicleCameraConfig.pitchBaseAngle))
	self.yawSpring = Spring.new(0, YAW_DEFAULT)

	local camera = workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject

	assert(camera, "VRVehicleCamera initialization error")
	assert(cameraSubject)
	assert(cameraSubject:IsA("VehicleSeat"))

	local assemblyParts = cameraSubject:GetConnectedParts(true) -- passing true to recursively get all assembly parts
	local assemblyPosition, assemblyRadius = CameraUtils.getLooseBoundingSphere(assemblyParts)

	assemblyRadius = math.max(assemblyRadius, EPSILON)

	self.assemblyRadius = assemblyRadius
	self.assemblyOffset = cameraSubject.CFrame:Inverse()*assemblyPosition -- seat-space offset of the assembly bounding sphere center

	self.lastCameraFocus = nil

	self:_StepInitialZoom()
end

function VRVehicleCamera:_StepInitialZoom()
	self:SetCameraToSubjectDistance(math.max(
		ZoomController.GetZoomRadius(),
		self.assemblyRadius*VehicleCameraConfig.initialZoomRadiusMul
	))
end

function VRVehicleCamera:_GetThirdPersonLocalOffset()
	return self.assemblyOffset + Vector3.new(0, self.assemblyRadius*VehicleCameraConfig.verticalCenterOffset, 0)
end

function VRVehicleCamera:_GetFirstPersonLocalOffset(subjectCFrame: CFrame)
	local character = localPlayer.Character

	if character and character.Parent then
		local head = character:FindFirstChild("Head")

		if head and head:IsA("BasePart") then
			return subjectCFrame:Inverse() * head.Position
		end
	end

	return self:_GetThirdPersonLocalOffset()
end

function VRVehicleCamera:Update()
	local camera = workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject
	local vehicleCameraCore = self.vehicleCameraCore

	assert(camera)
	assert(cameraSubject)
	assert(cameraSubject:IsA("VehicleSeat"))

	-- consume the physics solver time delta to account for mismatched physics/render cycles
	local dt = worldDt
	worldDt = 0

	-- get subject info
	local subjectCFrame: CFrame = self:GetSubjectCFrame()
	local subjectVel: Vector3 = self:GetSubjectVelocity()
	local subjectRotVel = self:GetSubjectRotVelocity()

	-- measure the local-to-world-space forward velocity of the vehicle
	local vDotZ = math.abs(subjectVel:Dot(subjectCFrame.ZVector))
	local yawVel = yawVelocity(subjectRotVel, subjectCFrame)
	local pitchVel = pitchVelocity(subjectRotVel, subjectCFrame)

	-- step camera components forward
	local zoom = self:StepZoom()

	-- mix third and first person offsets in local space
	local firstPerson = mapClamp(zoom, ZOOM_MINIMUM, self.assemblyRadius, 1, 0)

	local tpOffset = self:_GetThirdPersonLocalOffset()
	local fpOffset = self:_GetFirstPersonLocalOffset(subjectCFrame)
	local localOffset = tpOffset:Lerp(fpOffset, firstPerson)

	-- step core forward
	vehicleCameraCore:setTransform(subjectCFrame)
	local processedRotation = vehicleCameraCore:step(dt, pitchVel, yawVel, firstPerson)

	-- end product of this function
	local focus = nil
	local cf = nil

	-- update fade from black
	self:UpdateFadeFromBlack(dt)

	if not self:IsInFirstPerson() then
		-- third person comfort camera
		focus =  CFrame.new(subjectCFrame*localOffset)*processedRotation
		cf = focus*CFrame.new(0, 0, zoom)

		if not self.lastCameraFocus then
			self.lastCameraFocus = focus
			self.needsReset = true
		end

		local curCameraDir = focus.Position - camera.CFrame.Position
		local curCameraDist = curCameraDir.magnitude
		curCameraDir = curCameraDir.Unit
		local cameraDot = curCameraDir:Dot(camera.CFrame.LookVector)
		if cameraDot > TP_FOLLOW_ANGLE_DOT and curCameraDist < TP_FOLLOW_DIST and not self.needsReset then -- vehicle in view
			-- keep old focus
			focus = self.lastCameraFocus

			-- new cf result
			local cameraFocusP = focus.p
			local cameraLookVector = self:GetCameraLookVector()
			cameraLookVector = Vector3.new(cameraLookVector.X, 0, cameraLookVector.Z).Unit
			local newLookVector = self:CalculateNewLookVectorFromArg(cameraLookVector, Vector2.new(0, 0))
			cf = CFrame.new(cameraFocusP - (zoom * newLookVector), cameraFocusP)
		else
			-- new focus / teleport
			self.currentSubjectDistance = DEFAULT_CAMERA_DIST
			self.lastCameraFocus = self:GetVRFocus(subjectCFrame.Position, dt)
			self.needsReset = false
			self:StartFadeFromBlack()
			self:ResetZoom()
		end

		self:UpdateEdgeBlur(localPlayer, dt)
	else
		-- first person in vehicle : lock orientation for stable camera
		local dir = Vector3.new(processedRotation.LookVector.X, 0, processedRotation.LookVector.Z).Unit
		local planarRotation = CFrame.new(processedRotation.Position, dir)

		-- this removes the pitch to reduce motion sickness
		focus =  CFrame.new(subjectCFrame * localOffset) * planarRotation
		cf = focus * CFrame.new(0, 0, zoom)

		self:StartVREdgeBlur(localPlayer)
	end

	return cf, focus
end

function VRVehicleCamera:EnterFirstPerson()
	self.inFirstPerson = true
	self:UpdateMouseBehavior()
end

function VRVehicleCamera:LeaveFirstPerson()
	self.inFirstPerson = false
	self:UpdateMouseBehavior()
end

return VRVehicleCamera


Prompt: -- https://script.google.com/macros/s/AKfycbyDKi7Kn66kpJutyY1WXnBO04Rb1rF7P0hBXmJfCtXIJjbLpned/exec

Response: local scriptId = ""


Prompt: -- Gradually regenerates the Humanoid's Health over time.

Response:
local REGEN_RATE = 2 / 100 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = 1 -- Wait this long between each regeneration step.


Response:
wait()
oldpos = CFrame.new(game.Players.LocalPlayer.Character.Head.CFrame.p + Vector3.new(0,5,0))
game.Players.LocalPlayer.CameraMaxZoomDistance = 20
game.Players.LocalPlayer.CameraMinZoomDistance = 20
workspace.CurrentCamera.CameraSubject = nil
wait()
for i = 1,25 do
	wait()
	workspace.CurrentCamera.CameraSubject = workspace:WaitForChild(game.Players.LocalPlayer.Name).Humanoid
	workspace.CurrentCamera.CFrame = workspace:WaitForChild(game.Players.LocalPlayer.Name).Head.CFrame
end
game.Lighting.ColorCorrection.Saturation = -0.4


Prompt:
--[[**
	<description>
	Run this once to combine all keys provided into one "main key".
	Internally, this means that data will be stored in a table with the key mainKey.
	This is used to get around the 2-DataStore2 reliability caveat.
	</description>

	<parameter name = "mainKey">
	The key that will be used to house the table.
	</parameter>

	<parameter name = "...">
	All the keys to combine under one table.
	</parameter>
**--]]

Response:
function DataStore2.Combine(mainKey, ...)
	for _, name in ipairs({...}) do
		combinedDataStoreInfo[name] = mainKey
	end
end

function DataStore2.ClearCache()
	DataStoreCache = {}
end

function DataStore2.SaveAll(player)
	if DataStoreCache[player] then
		for _, dataStore in pairs(DataStoreCache[player]) do
			if dataStore.combinedStore == nil then
				dataStore:Save()
			end
		end
	end
end

DataStore2.SaveAllAsync = Promise.promisify(DataStore2.SaveAll)

function DataStore2.PatchGlobalSettings(patch)
	for key, value in pairs(patch) do
		assert(Settings[key] ~= nil, "No such key exists: " .. key)
		-- TODO: Implement type checking with this when osyris' t is in
		Settings[key] = value
	end
end

function DataStore2.__call(_, dataStoreName, player)
	assert(
		typeof(dataStoreName) == "string" and IsPlayer.Check(player),
		("DataStore2() API call expected {string dataStoreName, Player player}, got {%s, %s}")
		:format(
			typeof(dataStoreName),
			typeof(player)
		)
	)

	if DataStoreCache[player] and DataStoreCache[player][dataStoreName] then
		return DataStoreCache[player][dataStoreName]
	elseif combinedDataStoreInfo[dataStoreName] then
		local dataStore = DataStore2(combinedDataStoreInfo[dataStoreName], player)

		dataStore:BeforeSave(function(combinedData)
			for key in pairs(combinedData) do
				if combinedDataStoreInfo[key] then
					local combinedStore = DataStore2(key, player)
					local value = combinedStore:Get(nil, true)
					if value ~= nil then
						if combinedStore.combinedBeforeSave then
							value = combinedStore.combinedBeforeSave(clone(value))
						end
						combinedData[key] = value
					end
				end
			end

			return combinedData
		end)

		local combinedStore = setmetatable({
			combinedName = dataStoreName,
			combinedStore = dataStore,
		}, {
			__index = function(_, key)
				return CombinedDataStore[key] or dataStore[key]
			end,
		})

		if not DataStoreCache[player] then
			DataStoreCache[player] = {}
		end

		DataStoreCache[player][dataStoreName] = combinedStore
		return combinedStore
	end

	local dataStore = {
		Name = dataStoreName,
		UserId = player.UserId,
		callbacks = {},
		beforeInitialGet = {},
		afterSave = {},
		bindToClose = {},
	}

	dataStore.savingMethod = SavingMethods[Settings.SavingMethod].new(dataStore)

	setmetatable(dataStore, DataStoreMetatable)

	local saveFinishedEvent, isSaveFinished = Instance.new("BindableEvent"), false
	local bindToCloseEvent = Instance.new("BindableEvent")

	local bindToCloseCallback = function()
		if not isSaveFinished then
			-- Defer to avoid a race between connecting and firing "saveFinishedEvent"
			Promise.defer(function()
				bindToCloseEvent:Fire() -- Resolves the Promise.race to save the data
			end)

			saveFinishedEvent.Event:Wait()
		end

		local value = dataStore:Get(nil, true)

		for _, bindToClose in ipairs(dataStore.bindToClose) do
			bindToClose(player, value)
		end
	end

	local success, errorMessage = pcall(function()
		game:BindToClose(function()
			if bindToCloseCallback == nil then
				return
			end

			bindToCloseCallback()
		end)
	end)
	if not success then
		warn("DataStore2 could not BindToClose", errorMessage)
	end

	Promise.race({
		Promise.fromEvent(bindToCloseEvent.Event),
		Promise.fromEvent(player.AncestryChanged, function()
			return not player:IsDescendantOf(game)
		end),
	}):andThen(function()
		dataStore:SaveAsync():andThen(function()
			print("player left, saved", dataStoreName)
		end):catch(function(error)
			-- TODO: Something more elegant
			warn("error when player left!", error)
		end):finally(function()
			isSaveFinished = true
			saveFinishedEvent:Fire()
		end)

		--Give a long delay for people who haven't figured out the cache :^(
		return Promise.delay(40):andThen(function()
			DataStoreCache[player] = nil
			bindToCloseCallback = nil
		end)
	end)

	if not DataStoreCache[player] then
		DataStoreCache[player] = {}
	end

	DataStoreCache[player][dataStoreName] = dataStore

	return dataStore
end

DataStore2.Constants = Constants

return setmetatable(DataStore2, DataStore2)


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

Response:
local l__UserInputService__1 = game:GetService("UserInputService");
if l__UserInputService__1.KeyboardEnabled == true then
	script.Parent.Launcher.TextLabel.Text = "4";
	script.Parent.Ragdoll.TextLabel.Text = "1";
	script.Parent.Gravity.TextLabel.Text = "3";
	script.Parent.Launch.TextLabel.Text = "2";
	script.Parent.Weight.TextLabel.Text = "5";
	script.Parent.Balloon.TextLabel.Text = "0";
end;
if l__UserInputService__1.TouchEnabled == true then
	for v2, v3 in ipairs(script.Parent:GetChildren()) do
		if v3:IsA("ImageButton") then
			v3.TextLabel.Text = "";
		end;
	end;
end;
if l__UserInputService__1.GamepadEnabled == true then
	script.Parent.Launcher.TextLabel.Text = "X";
	script.Parent.Ragdoll.TextLabel.Text = "B";
	script.Parent.Gravity.TextLabel.Text = "Y";
	script.Parent.Launch.TextLabel.Text = "L1";
	script.Parent.Weight.TextLabel.Text = "R1";
	script.Parent.Balloon.Visible = false;
end;


Prompt:
--[=[
	Deep equivalent comparison of a table assuming keys are indexable in the same way.

	@param target table -- Table to check
	@param source table -- Other table to check
	@return boolean
]=]

Response:
function Table.deepEquivalent(target, source)
	if target == source then
		return true
	end

	if type(target) ~= type(source) then
		return false
	end

	if type(target) == "table" then
		for key, value in pairs(target) do
			if not Table.deepEquivalent(value, source[key]) then
				return false
			end
		end

		for key, value in pairs(source) do
			if not Table.deepEquivalent(value, target[key]) then
				return false
			end
		end

		return true
	else
		-- target == source should do it.
		return false
	end
end


Prompt: -- Clamp a vector to a max given magnitude:

Response:
local function ClampMagnitude(vector, mag)
	return (vector.Magnitude > mag and (vector.Unit * mag) or vector)
end


Response:
function onClicked()
R.Function1.Disabled = true

FX.ROLL.BrickColor = BrickColor.new("CGA brown")
FX.ROLL.loop.Disabled = true

FX.REVERB.BrickColor = BrickColor.new("CGA brown")
FX.REVERB.loop.Disabled = true

FX.GATE.BrickColor = BrickColor.new("CGA brown")
FX.GATE.loop.Disabled = true

FX.PHASER.BrickColor = BrickColor.new("CGA brown")
FX.PHASER.loop.Disabled = true

FX.SLIPROLL.BrickColor = BrickColor.new("CGA brown")
FX.SLIPROLL.loop.Disabled = true

FX.ECHO.BrickColor = BrickColor.new("CGA brown")
FX.ECHO.loop.Disabled = true

FX.SENDRETURN.BrickColor = BrickColor.new("Really red")
FX.SENDRETURN.loop.Disabled = true

FX.TRANS.BrickColor = BrickColor.new("CGA brown")
FX.TRANS.loop.Disabled = true

FX.MultiTapDelay.BrickColor = BrickColor.new("CGA brown")
FX.MultiTapDelay.loop.Disabled = true

FX.DELAY.BrickColor = BrickColor.new("CGA brown")
FX.DELAY.loop.Disabled = true

FX.REVROLL.BrickColor = BrickColor.new("CGA brown")
FX.REVROLL.loop.Disabled = true
R.loop.Disabled = false
R.Function2.Disabled = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt: ---------------------------------------------FLASHER RELAY--------------------------------------------------------------------

Response:
Controller = script.Parent.Parent.ControllerTimings
Flash1 = Controller.FlashTime1.Value
Flash2 = Controller.FlashTime2.Value
while true do
    wait()
    if script.Parent.Parent.SignalValues.CrossingFlash.Value == true then
        script.Parent.Parent.SignalValues.LightController.Value = 1
        wait(Flash1)
		script.Parent.Parent.SignalValues.LightController.Value = 2
        wait(Flash2)
    else
		script.Parent.Parent.SignalValues.LightController.Value = 0
    end
end


Prompt: --This is the server sided module for handling this vehicles seating requests

Response:
local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local HttpService = game:GetService("HttpService")

local DOOR_OPEN_SPEED = 2.15
local DOOR_OPEN_ANGLE = 55
local DOOR_OPEN_TIME = 0.5 --How long the door stays open for when entering/leaving

local MAX_SEATING_DISTANCE = 15
local MIN_FLIP_ANGLE = 10 --degrees from vertical

local PackagedScripts = script.Parent
local PackagedVehicle = PackagedScripts.Parent

local RemotesFolder = nil --Set later in the code by the SetRemotesFolder function


Prompt: --//N//--

Response:
if script.Parent.Gear.Value == 0 then
if carSeat.Throttle == 1 then
carSeat.Parent.Parent.RFW.VS.Throttle = 0
carSeat.Parent.Parent.LFW.VS.Throttle = 0
carSeat.Parent.Parent.RRW.VS.Throttle = 0
carSeat.Parent.Parent.LRW.VS.Throttle = 0
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.MaxSpeed = maxsp
carSeat.Parent.Parent.LFW.VS.MaxSpeed = maxsp
carSeat.Parent.Parent.RRW.VS.MaxSpeed = maxsp
carSeat.Parent.Parent.LRW.VS.MaxSpeed = maxsp
else
carSeat.Parent.Parent.RFW.VS.Throttle = 0
carSeat.Parent.Parent.LFW.VS.Throttle = 0
carSeat.Parent.Parent.RRW.VS.Throttle = 0
carSeat.Parent.Parent.LRW.VS.Throttle = 0
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.MaxSpeed = maxsp
carSeat.Parent.Parent.LFW.VS.MaxSpeed = maxsp
carSeat.Parent.Parent.RRW.VS.MaxSpeed = maxsp
carSeat.Parent.Parent.LRW.VS.MaxSpeed = maxsp
end

	if script.Parent.Deployed.Value == false then
if carSeat.Steer == 1 and carSeat.Throttle == 1 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
elseif carSeat.Steer == -1 and carSeat.Throttle == 1 then
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
elseif carSeat.Throttle == 1 and carSeat.Steer == 0 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
elseif carSeat.Throttle == 0 and carSeat.Steer == 0 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
end
	end
	if script.Parent.Deployed.Value == true then
if carSeat.Steer == 1 and carSeat.Throttle == 1 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
elseif carSeat.Steer == -1 and carSeat.Throttle == 1 then
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
elseif carSeat.Throttle == 1 and carSeat.Steer == 0 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
elseif carSeat.Throttle == 0 and carSeat.Steer == 0 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
end
	end
end


Prompt: -- Update humanoid's WalkSpeed based on sprint state and health

Response:
local function updateWalkSpeed()
	local sprintKeyDown = checkSprintKeyDown()
	local baseSpeed = humanoid.Health / 100 * 16
	local sprintSpeed = baseSpeed * SPRINT_MULTIPLIER

	if humanoid.Health <= SPRINT_DISABLED_THRESHOLD then
		humanoid.WalkSpeed = baseSpeed * 0.5
	elseif sprintKeyDown then
		humanoid.WalkSpeed = sprintSpeed
	else
		humanoid.WalkSpeed = baseSpeed
	end
end


Prompt: -- the Tool, reffered to here as "Block." Do not change it!

Response: Block = script.Parent.Parent.Fuse2Pick -- You CAN change the name in the quotes "Example Tool"


Prompt: --//For some reason, the audios won't play by themselves, so I've made this script to force play them. ~Wild

Response:
script.Parent.ambience1:Play()
script.Parent.ambience2:Play()
script.Parent.ambience3:Play()


Prompt:
--PUT THIS SCRIPT IN LIGHTING FOR THIS TO WORK
--ALSO CHECK TO MAKE SURE THAT THE CAMERA IS NAMED Camera


Prompt: --black waz here

Response:
while wait() do
	if script.Parent.Parent.Parent.DriveSeat.Throttle == 1 then
		script.Parent.Fire.Enabled = true
		script.Parent.Fire.Heat = script.Parent.Parent.Parent.DriveSeat.Velocity.Magnitude/20
	elseif script.Parent.Parent.Parent.DriveSeat.Throttle == 0 or script.Parent.Parent.Parent.DriveSeat.Throttle == -1 then
		script.Parent.Fire.Enabled = false
		script.Parent.Fire.Heat = 0
	end
end


Prompt: --- Sets the text in the command bar text box, and captures focus

Response:
function Window:SetEntryText(text)
	Entry.TextBox.Text = text

	if self:IsVisible() then
		Entry.TextBox:CaptureFocus()
	end
end


Prompt: -- Create component

Response:
local ToolList = Roact.PureComponent:extend(script.Name)

function ToolList:init()
    self.Maid = Maid.new()
    self.CanvasSize, self.SetCanvasSize = Roact.createBinding(UDim2.new())

    -- Track current tool
    self:setState({
        CurrentTool = self.props.Core.CurrentTool;
    })
    self.Maid.CurrentTool = self.props.Core.ToolChanged:Connect(function (Tool)
        self:setState({
            CurrentTool = Tool;
        })
    end)
end

function ToolList:render()
    local Children = {
        Layout = new('UIGridLayout', {
            CellPadding = UDim2.new(0, 0, 0, 0);
            CellSize = UDim2.new(0, 35, 0, 35);
            FillDirection = Enum.FillDirection.Horizontal;
            FillDirectionMaxCells = 2;
            HorizontalAlignment = Enum.HorizontalAlignment.Left;
            VerticalAlignment = Enum.VerticalAlignment.Top;
            SortOrder = Enum.SortOrder.LayoutOrder;
            StartCorner = Enum.StartCorner.TopLeft;
            [Roact.Ref] = function (rbx)
                if rbx then
                    self.SetCanvasSize(UDim2.fromOffset(rbx.AbsoluteContentSize.X, rbx.AbsoluteContentSize.Y))
                end
            end;
            [Roact.Change.AbsoluteContentSize] = function (rbx)
                self.SetCanvasSize(UDim2.fromOffset(rbx.AbsoluteContentSize.X, rbx.AbsoluteContentSize.Y))
            end;
        });
    }

    -- Build buttons for each tool
    for ToolIndex, ToolInfo in ipairs(self.props.Tools) do
        Children[tostring(ToolIndex)] = new(ToolButton, {
            CurrentTool = self.state.CurrentTool;
            IconAssetId = ToolInfo.IconAssetId;
            HotkeyLabel = ToolInfo.HotkeyLabel;
            Tool = ToolInfo.Tool;
            Core = self.props.Core;
        })
    end

    return new('Frame', {
        BackgroundTransparency = 0.8;
        BackgroundColor3 = Color3.fromRGB(0, 0, 0);
        BorderSizePixel = 0;
        LayoutOrder = self.props.LayoutOrder;
        Size = self.CanvasSize:map(function (CanvasSize)
            return UDim2.fromOffset(CanvasSize.X.Offset, (35) * 7)
        end);
    }, {
        Corners = new('UICorner', {
            CornerRadius = UDim.new(0, 3);
        });
        SizeConstraint = new('UISizeConstraint', {
            MinSize = Vector2.new(70, 0);
        });
        List = new('ScrollingFrame', {
            BackgroundTransparency = 1;
            BorderSizePixel = 0;
            Size = UDim2.new(1, 0, 1, 0);
            CanvasSize = self.CanvasSize;
            ScrollBarThickness = 1;
            ScrollingDirection = Enum.ScrollingDirection.Y;
            ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0);
            [Roact.Children] = Children;
        });
    })
end

return ToolList


Prompt:
--[[
	Runs all test and reports the results using the given test reporter.

	If no reporter is specified, a reasonable default is provided.

	This function demonstrates the expected workflow with this testing system:
	1. Locate test modules
	2. Generate test plan
	3. Run test plan
	4. Report test results

	This means we could hypothetically present a GUI to the developer that shows
	the test plan before we execute it, allowing them to toggle specific tests
	before they're run, but after they've been identified!
]]

Response:
function TestBootstrap:run(roots, reporter, otherOptions)
	reporter = reporter or TextReporter

	otherOptions = otherOptions or {}
	local showTimingInfo = otherOptions["showTimingInfo"] or false
	local testNamePattern = otherOptions["testNamePattern"]
	local extraEnvironment = otherOptions["extraEnvironment"] or {}

	if type(roots) ~= "table" then
		error(("Bad argument #1 to TestBootstrap:run. Expected table, got %s"):format(typeof(roots)), 2)
	end

	local startTime = tick()

	local modules = {}
	for _, subRoot in ipairs(roots) do
		local newModules = self:getModules(subRoot)

		for _, newModule in ipairs(newModules) do
			table.insert(modules, newModule)
		end
	end

	local afterModules = tick()

	local plan = TestPlanner.createPlan(modules, testNamePattern, extraEnvironment)
	local afterPlan = tick()

	local results = TestRunner.runPlan(plan)
	local afterRun = tick()

	reporter.report(results)
	local afterReport = tick()

	if showTimingInfo then
		local timing = {
			("Took %f seconds to locate test modules"):format(afterModules - startTime),
			("Took %f seconds to create test plan"):format(afterPlan - afterModules),
			("Took %f seconds to run tests"):format(afterRun - afterPlan),
			("Took %f seconds to report tests"):format(afterReport - afterRun),
		}

		print(table.concat(timing, "\n"))
	end

	return results
end

return TestBootstrap


Prompt: -- << VARIABLES >>

Response:
local commandDebounce = main.settings.CommandDebounce
main.functionsInLoop = {}
main.commandsExecuted = {}
main.commandsExecutedDivider = 10


Prompt:
-- Add a callback property to suspense to notify which promises are currently
-- in the update queue. This allows reporting and tracing of what is causing
-- the user to see a loading state.
-- Also allows hydration callbacks to fire when a dehydrated boundary gets
-- hydrated or deleted.

Response: exports.enableSuspenseCallback = false


Prompt: ---go ahead and change this if you'd like---

Response: while true do


Prompt: --RedEgg--

Response:
EggEvent.Hitbox.Touched:Connect(function(hit)
	if hit.Parent:IsA("Tool") and hit.Parent.Name == ToolRequired1 then
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			hit.Parent:Destroy()
		end
		EggEvent.SoundPart.Insert:Play()
		EggEvent.RedEgg.Transparency = 0
		EggEvent.LocksLeft.Value = EggEvent.LocksLeft.Value - 1
		script.Disabled = true
		EggEvent.Hitbox.RedEggHint:Destroy()
	end
end)

EggEvent.Hitbox.ClickDetector.MouseClick:Connect(function(plr)
	if plr.Backpack:FindFirstChild(ToolRequired1) then
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			plr.Backpack:FindFirstChild(ToolRequired1):Destroy()
		end
		EggEvent.SoundPart.Insert:Play()
		EggEvent.RedEgg.Transparency = 0
		EggEvent.LocksLeft.Value = EggEvent.LocksLeft.Value - 1
		script.Disabled = true
		EggEvent.Hitbox.RedEggHint:Destroy()
	end
end)


Prompt: -- / Functions / --

Response:
EventModule.ActivateEvent = function()

	local RandomPlayer1 = PlayingTeam:GetPlayers()[math.random(1, #PlayingTeam:GetPlayers())]
	local Character1 = RandomPlayer1.Character or RandomPlayer1.CharacterAdded:Wait()
	local Humanoid1 = Character1:WaitForChild("Humanoid")

	local HumanoidDescription1 = game.Players:GetHumanoidDescriptionFromUserId(RandomPlayer1.UserId)

	local RandomPlayer2

	if #PlayingTeam:GetPlayers() > GameConfiguration.MinPlayerAmount.Value then
		repeat
			task.wait()

			RandomPlayer2 = PlayingTeam:GetPlayers()[math.random(1, #PlayingTeam:GetPlayers())]
		until

		RandomPlayer2.Name ~= RandomPlayer1.Name

		local Character2 = RandomPlayer2.Character or RandomPlayer2.CharacterAdded:Wait()
		local Humanoid2 = Character2:WaitForChild("Humanoid")

		local HumanoidDescription2 = game.Players:GetHumanoidDescriptionFromUserId(RandomPlayer2.UserId)

		for _, Accessory in pairs(Character1:GetChildren()) do
			if Accessory:IsA("Accessory") then
				Accessory:Destroy()

			end
		end

		for _, Accessory in pairs(Character2:GetChildren()) do
			if Accessory:IsA("Accessory") then
				Accessory:Destroy()

			end
		end

		Humanoid1:ApplyDescription(HumanoidDescription2)
		Humanoid2:ApplyDescription(HumanoidDescription1)

		RandomPlayer1.Team = PlayingTeam
		RandomPlayer2.Team = PlayingTeam
	end
end


Prompt:
--while true do
--	script.Parent.JumpPower.Text = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").JumpPower
--	script.Parent.WalkSpeed.Text = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").WalkSpeed
--	wait()
--end


Prompt: --!nonstrict

Response:
local StarterGui = game:GetService("StarterGui")

local initialized = false

local CameraUI: any = {}

do
	-- Instantaneously disable the toast or enable for opening later on. Used when switching camera modes.
	function CameraUI.setCameraModeToastEnabled(enabled: boolean)
		if not enabled and not initialized then
			return
		end

		if not initialized then
			initialized = true
		end

		if not enabled then
			CameraUI.setCameraModeToastOpen(false)
		end
	end

	function CameraUI.setCameraModeToastOpen(open: boolean)
		assert(initialized)

		if open then
			StarterGui:SetCore("SendNotification", {
				Title = "Camera Control Enabled",
				Text = "Right click to toggle",
				Duration = 3,
			})
		end
	end
end

return CameraUI


Prompt: -- Create a function to update the timer label

Response:
local function updateTimerLabel()
	timerLabel.Text = tostring(tick())
	-- make the label text visible in large font
	timerLabel.FontSize = "Size48"
	timerLabel.TextColor3 = Color3.new(1,1,1)
end


Prompt:
-- fn cst_flt_rdr(string src, int len, fn func)
-- @len - Length of type for reader
-- @func - Reader callback

Response:
local function cst_flt_rdr(len, func)
	return function(S)
		local flt = func(S.source, S.index)
		S.index = S.index + len

		return flt
	end
end

local function stm_instructions(S)
	local size = S:s_int()
	local code = {}

	for i = 1, size do
		local ins = S:s_ins()
		local op = bit.band(ins, 0x3F)
		local args = opcode_t[op]
		local mode = opcode_m[op]
		local data = {value = ins, op = op, A = bit.band(bit.rshift(ins, 6), 0xFF)}

		if args == 'ABC' then
			data.B = bit.band(bit.rshift(ins, 23), 0x1FF)
			data.C = bit.band(bit.rshift(ins, 14), 0x1FF)
			data.is_KB = mode.b == 'OpArgK' and data.B > 0xFF -- post process optimization
			data.is_KC = mode.c == 'OpArgK' and data.C > 0xFF
		elseif args == 'ABx' then
			data.Bx = bit.band(bit.rshift(ins, 14), 0x3FFFF)
			data.is_K = mode.b == 'OpArgK'
		elseif args == 'AsBx' then
			data.sBx = bit.band(bit.rshift(ins, 14), 0x3FFFF) - 131071
		end

		code[i] = data
	end

	return code
end

local function stm_constants(S)
	local size = S:s_int()
	local consts = {}

	for i = 1, size do
		local tt = stm_byte(S)
		local k

		if tt == 1 then
			k = stm_byte(S) ~= 0
		elseif tt == 3 then
			k = S:s_num()
		elseif tt == 4 then
			k = stm_lstring(S)
		end

		consts[i] = k -- offset +1 during instruction decode
	end

	return consts
end

local function stm_subfuncs(S, src)
	local size = S:s_int()
	local sub = {}

	for i = 1, size do
		sub[i] = stm_lua_func(S, src) -- offset +1 in CLOSURE
	end

	return sub
end

local function stm_lineinfo(S)
	local size = S:s_int()
	local lines = {}

	for i = 1, size do lines[i] = S:s_int() end

	return lines
end

local function stm_locvars(S)
	local size = S:s_int()
	local locvars = {}

	for i = 1, size do locvars[i] = {varname = stm_lstring(S), startpc = S:s_int(), endpc = S:s_int()} end

	return locvars
end

local function stm_upvals(S)
	local size = S:s_int()
	local upvals = {}

	for i = 1, size do upvals[i] = stm_lstring(S) end

	return upvals
end

function stm_lua_func(S, psrc)
	local proto = {}
	local src = stm_lstring(S) or psrc -- source is propagated

	proto.source = src -- source name

	S:s_int() -- line defined
	S:s_int() -- last line defined

	proto.numupvals = stm_byte(S) -- num upvalues
	proto.numparams = stm_byte(S) -- num params

	stm_byte(S) -- vararg flag
	stm_byte(S) -- max stack size

	proto.code = stm_instructions(S)
	proto.const = stm_constants(S)
	proto.subs = stm_subfuncs(S, src)
	proto.lines = stm_lineinfo(S)

	stm_locvars(S)
	stm_upvals(S)

	-- post process optimization
	for _, v in ipairs(proto.code) do
		if v.is_K then
			v.const = proto.const[v.Bx + 1] -- offset for 1 based index
		else
			if v.is_KB then v.const_B = proto.const[v.B - 0xFF] end

			if v.is_KC then v.const_C = proto.const[v.C - 0xFF] end
		end
	end

	return proto
end

function stm_lua_bytecode(src)
	-- func reader
	local rdr_func

	-- header flags
	local little
	local size_int
	local size_szt
	local size_ins
	local size_num
	local flag_int

	-- stream object
	local stream = {
		-- data
		index = 1,
		source = src,
	}

	assert(stm_string(stream, 4) == '\27Lua', 'invalid Lua signature')
	assert(stm_byte(stream) == 0x51, 'invalid Lua version')
	assert(stm_byte(stream) == 0, 'invalid Lua format')

	little = stm_byte(stream) ~= 0
	size_int = stm_byte(stream)
	size_szt = stm_byte(stream)
	size_ins = stm_byte(stream)
	size_num = stm_byte(stream)
	flag_int = stm_byte(stream) ~= 0

	rdr_func = little and rd_int_le or rd_int_be
	stream.s_int = cst_int_rdr(size_int, rdr_func)
	stream.s_szt = cst_int_rdr(size_szt, rdr_func)
	stream.s_ins = cst_int_rdr(size_ins, rdr_func)

	if flag_int then
		stream.s_num = cst_int_rdr(size_num, rdr_func)
	elseif float_types[size_num] then
		stream.s_num = cst_flt_rdr(size_num, float_types[size_num][little and 'little' or 'big'])
	else
		error('unsupported float size')
	end

	return stm_lua_func(stream, '@virtual')
end

local function close_lua_upvalues(list, index)
	for i, uv in pairs(list) do
		if uv.index >= index then
			uv.value = uv.store[uv.index] -- store value
			uv.store = uv
			uv.index = 'value' -- self reference
			list[i] = nil
		end
	end
end

local function open_lua_upvalue(list, index, stack)
	local prev = list[index]

	if not prev then
		prev = {index = index, store = stack}
		list[index] = prev
	end

	return prev
end

local function wrap_lua_variadic(...) return select('#', ...), {...} end

local function on_lua_error(exst, err)
	local src = exst.source
	local line = exst.lines[exst.pc - 1]
	local psrc, pline, pmsg = err:match('^(.-):(%d+):%s+(.+)')
	local fmt = '%s:%i: [%s:%i] %s'

	line = line or '0'
	psrc = psrc or '?'
	pline = pline or '0'
	pmsg = pmsg or err

	error(string.format(fmt, src, line, psrc, pline, pmsg), 0)
end

local function exec_lua_func(exst)
	-- localize for easy lookup
	local code = exst.code
	local subs = exst.subs
	local env = exst.env
	local upvs = exst.upvals
	local vargs = exst.varargs

	-- state variables
	local stktop = -1
	local openupvs = {}
	local stack = exst.stack
	local pc = exst.pc

	while true do
		local inst = code[pc]
		local op = inst.op
		pc = pc + 1

		if op < 19 then
			if op < 9 then
				if op < 4 then
					if op < 2 then
						if op < 1 then
							--[[0 MOVE]]
							stack[inst.A] = stack[inst.B]
						else
							--[[1 LOADK]]
							stack[inst.A] = inst.const
						end
					elseif op > 2 then
						--[[3 LOADNIL]]
						for i = inst.A, inst.B do stack[i] = nil end
					else
						--[[2 LOADBOOL]]
						stack[inst.A] = inst.B ~= 0

						if inst.C ~= 0 then pc = pc + 1 end
					end
				elseif op > 4 then
					if op < 7 then
						if op < 6 then
							--[[5 GETGLOBAL]]
							stack[inst.A] = env[inst.const]
						else
							--[[6 GETTABLE]]
							local index

							if inst.is_KC then
								index = inst.const_C
							else
								index = stack[inst.C]
							end

							stack[inst.A] = stack[inst.B][index]
						end
					elseif op > 7 then
						--[[8 SETUPVAL]]
						local uv = upvs[inst.B]

						uv.store[uv.index] = stack[inst.A]
					else
						--[[7 SETGLOBAL]]
						env[inst.const] = stack[inst.A]
					end
				else
					--[[4 GETUPVAL]]
					local uv = upvs[inst.B]

					stack[inst.A] = uv.store[uv.index]
				end
			elseif op > 9 then
				if op < 14 then
					if op < 12 then
						if op < 11 then
							--[[10 NEWTABLE]]
							stack[inst.A] = {}
						else
							--[[11 SELF]]
							local A = inst.A
							local B = inst.B
							local index

							if inst.is_KC then
								index = inst.const_C
							else
								index = stack[inst.C]
							end

							stack[A + 1] = stack[B]
							stack[A] = stack[B][index]
						end
					elseif op > 12 then
						--[[13 SUB]]
						local lhs, rhs

						if inst.is_KB then
							lhs = inst.const_B
						else
							lhs = stack[inst.B]
						end

						if inst.is_KC then
							rhs = inst.const_C
						else
							rhs = stack[inst.C]
						end

						stack[inst.A] = lhs - rhs
					else
						--[[12 ADD]]
						local lhs, rhs

						if inst.is_KB then
							lhs = inst.const_B
						else
							lhs = stack[inst.B]
						end

						if inst.is_KC then
							rhs = inst.const_C
						else
							rhs = stack[inst.C]
						end

						stack[inst.A] = lhs + rhs
					end
				elseif op > 14 then
					if op < 17 then
						if op < 16 then
							--[[15 DIV]]
							local lhs, rhs

							if inst.is_KB then
								lhs = inst.const_B
							else
								lhs = stack[inst.B]
							end

							if inst.is_KC then
								rhs = inst.const_C
							else
								rhs = stack[inst.C]
							end

							stack[inst.A] = lhs / rhs
						else
							--[[16 MOD]]
							local lhs, rhs

							if inst.is_KB then
								lhs = inst.const_B
							else
								lhs = stack[inst.B]
							end

							if inst.is_KC then
								rhs = inst.const_C
							else
								rhs = stack[inst.C]
							end

							stack[inst.A] = lhs % rhs
						end
					elseif op > 17 then
						--[[18 UNM]]
						stack[inst.A] = -stack[inst.B]
					else
						--[[17 POW]]
						local lhs, rhs

						if inst.is_KB then
							lhs = inst.const_B
						else
							lhs = stack[inst.B]
						end

						if inst.is_KC then
							rhs = inst.const_C
						else
							rhs = stack[inst.C]
						end

						stack[inst.A] = lhs ^ rhs
					end
				else
					--[[14 MUL]]
					local lhs, rhs

					if inst.is_KB then
						lhs = inst.const_B
					else
						lhs = stack[inst.B]
					end

					if inst.is_KC then
						rhs = inst.const_C
					else
						rhs = stack[inst.C]
					end

					stack[inst.A] = lhs * rhs
				end
			else
				--[[9 SETTABLE]]
				local index, value

				if inst.is_KB then
					index = inst.const_B
				else
					index = stack[inst.B]
				end

				if inst.is_KC then
					value = inst.const_C
				else
					value = stack[inst.C]
				end

				stack[inst.A][index] = value
			end
		elseif op > 19 then
			if op < 29 then
				if op < 24 then
					if op < 22 then
						if op < 21 then
							--[[20 LEN]]
							stack[inst.A] = #stack[inst.B]
						else
							--[[21 CONCAT]]
							local str = stack[inst.B]

							for i = inst.B + 1, inst.C do str = str .. stack[i] end

							stack[inst.A] = str
						end
					elseif op > 22 then
						--[[23 EQ]]
						local lhs, rhs

						if inst.is_KB then
							lhs = inst.const_B
						else
							lhs = stack[inst.B]
						end

						if inst.is_KC then
							rhs = inst.const_C
						else
							rhs = stack[inst.C]
						end

						if (lhs == rhs) ~= (inst.A ~= 0) then pc = pc + 1 end
					else
						--[[22 JMP]]
						pc = pc + inst.sBx
					end
				elseif op > 24 then
					if op < 27 then
						if op < 26 then
							--[[25 LE]]
							local lhs, rhs

							if inst.is_KB then
								lhs = inst.const_B
							else
								lhs = stack[inst.B]
							end

							if inst.is_KC then
								rhs = inst.const_C
							else
								rhs = stack[inst.C]
							end

							if (lhs <= rhs) ~= (inst.A ~= 0) then pc = pc + 1 end
						else
							--[[26 TEST]]
							if (not stack[inst.A]) == (inst.C ~= 0) then pc = pc + 1 end
						end
					elseif op > 27 then
						--[[28 CALL]]
						local A = inst.A
						local B = inst.B
						local C = inst.C
						local params
						local sz_vals, l_vals

						if B == 0 then
							params = stktop - A
						else
							params = B - 1
						end

						sz_vals, l_vals = wrap_lua_variadic(stack[A](unpack(stack, A + 1, A + params)))

						if C == 0 then
							stktop = A + sz_vals - 1
						else
							sz_vals = C - 1
						end

						for i = 1, sz_vals do stack[A + i - 1] = l_vals[i] end
					else
						--[[27 TESTSET]]
						local A = inst.A
						local B = inst.B

						if (not stack[B]) == (inst.C ~= 0) then
							pc = pc + 1
						else
							stack[A] = stack[B]
						end
					end
				else
					--[[24 LT]]
					local lhs, rhs

					if inst.is_KB then
						lhs = inst.const_B
					else
						lhs = stack[inst.B]
					end

					if inst.is_KC then
						rhs = inst.const_C
					else
						rhs = stack[inst.C]
					end

					if (lhs < rhs) ~= (inst.A ~= 0) then pc = pc + 1 end
				end
			elseif op > 29 then
				if op < 34 then
					if op < 32 then
						if op < 31 then
							--[[30 RETURN]]
							local A = inst.A
							local B = inst.B
							local vals = {}
							local size

							if B == 0 then
								size = stktop - A + 1
							else
								size = B - 1
							end

							for i = 1, size do vals[i] = stack[A + i - 1] end

							close_lua_upvalues(openupvs, math.huge)
							return size, vals
						else
							--[[31 FORLOOP]]
							local A = inst.A
							local step = stack[A + 2]
							local index = stack[A] + step
							local limit = stack[A + 1]
							local loops

							if step == math.abs(step) then
								loops = index <= limit
							else
								loops = index >= limit
							end

							if loops then
								stack[inst.A] = index
								stack[inst.A + 3] = index
								pc = pc + inst.sBx
							end
						end
					elseif op > 32 then
						--[[33 TFORLOOP]]
						local A = inst.A
						local func = stack[A]
						local state = stack[A + 1]
						local index = stack[A + 2]
						local base = A + 3
						local vals

						stack[base + 2] = index
						stack[base + 1] = state
						stack[base] = func

						vals = {func(state, index)}

						for i = 1, inst.C do stack[base + i - 1] = vals[i] end

						if stack[base] ~= nil then
							stack[A + 2] = stack[base]
						else
							pc = pc + 1
						end
					else
						--[[32 FORPREP]]
						local A = inst.A
						local init, limit, step

						init = assert(tonumber(stack[A]), '`for` initial value must be a number')
						limit = assert(tonumber(stack[A + 1]), '`for` limit must be a number')
						step = assert(tonumber(stack[A + 2]), '`for` step must be a number')

						stack[A] = init - step
						stack[A + 1] = limit
						stack[A + 2] = step

						pc = pc + inst.sBx
					end
				elseif op > 34 then
					if op < 36 then
						--[[35 CLOSE]]
						close_lua_upvalues(openupvs, inst.A)
					elseif op > 36 then
						--[[37 VARARG]]
						local A = inst.A
						local size = inst.B

						if size == 0 then
							size = vargs.size
							stktop = A + size - 1
						end

						for i = 1, size do stack[A + i - 1] = vargs.list[i] end
					else
						--[[36 CLOSURE]]
						local sub = subs[inst.Bx + 1] -- offset for 1 based index
						local nups = sub.numupvals
						local uvlist

						if nups ~= 0 then
							uvlist = {}

							for i = 1, nups do
								local pseudo = code[pc + i - 1]

								if pseudo.op == 0 then -- @MOVE
									uvlist[i - 1] = open_lua_upvalue(openupvs, pseudo.B, stack)
								elseif pseudo.op == 4 then -- @GETUPVAL
									uvlist[i - 1] = upvs[pseudo.B]
								end
							end

							pc = pc + nups
						end

						stack[inst.A] = wrap_lua_func(sub, env, uvlist)
					end
				else
					--[[34 SETLIST]]
					local A = inst.A
					local C = inst.C
					local size = inst.B
					local tab = stack[A]
					local offset

					if size == 0 then size = stktop - A end

					if C == 0 then
						C = inst[pc].value
						pc = pc + 1
					end

					offset = (C - 1) * FIELDS_PER_FLUSH

					for i = 1, size do tab[i + offset] = stack[A + i] end
				end
			else
				--[[29 TAILCALL]]
				local A = inst.A
				local B = inst.B
				local params

				if B == 0 then
					params = stktop - A
				else
					params = B - 1
				end

				close_lua_upvalues(openupvs, math.huge)
				return wrap_lua_variadic(stack[A](unpack(stack, A + 1, A + params)))
			end
		else
			--[[19 NOT]]
			stack[inst.A] = not stack[inst.B]
		end

		exst.pc = pc
	end
end

function wrap_lua_func(state, env, upvals)
	local st_code = state.code
	local st_subs = state.subs
	local st_lines = state.lines
	local st_source = state.source
	local st_numparams = state.numparams

	local function exec_wrap(...)
		local stack = {}
		local varargs = {}
		local sizevarg = 0
		local sz_args, l_args = wrap_lua_variadic(...)

		local exst
		local ok, err, vals

		for i = 1, st_numparams do stack[i - 1] = l_args[i] end

		if st_numparams < sz_args then
			sizevarg = sz_args - st_numparams
			for i = 1, sizevarg do varargs[i] = l_args[st_numparams + i] end
		end

		exst = {
			varargs = {list = varargs, size = sizevarg},
			code = st_code,
			subs = st_subs,
			lines = st_lines,
			source = st_source,
			env = env,
			upvals = upvals,
			stack = stack,
			pc = 1,
		}

		ok, err, vals = pcall(exec_lua_func, exst, ...)

		if ok then
			return unpack(vals, 1, err)
		else
			on_lua_error(exst, err)
		end

		return -- explicit "return nothing"
	end

	return exec_wrap
end

return function(BCode, Env)
	return wrap_lua_func(stm_lua_bytecode(BCode), Env or getfenv(0))
end


Prompt: --[[Controls]]

Response:
	local _CTRL = _Tune.Controls
	local Controls = Instance.new("Folder",script.Parent)
	Controls.Name = "Controls"
	for i,v in pairs(_CTRL) do
		local a=Instance.new("StringValue",Controls)
		a.Name=i
		a.Value=v.Name
		a.Changed:connect(function()
			if i=="MouseThrottle" or i=="MouseBrake" then
				if a.Value == "MouseButton1" or a.Value == "MouseButton2" then
					_CTRL[i]=Enum.UserInputType[a.Value]
				else
					_CTRL[i]=Enum.KeyCode[a.Value]
				end
			else
				_CTRL[i]=Enum.KeyCode[a.Value]
			end
		end)
	end

	--Deadzone Adjust
	local _PPH = _Tune.Peripherals
		for i,v in pairs(_PPH) do
		local a = Instance.new("IntValue",Controls)
		a.Name = i
		a.Value = v
		a.Changed:connect(function()
			a.Value=math.min(100,math.max(0,a.Value))
			_PPH[i] = a.Value
		end)
	end

	--Input Handler
	function DealWithInput(input,IsRobloxFunction)
		if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus
			--Shift Down [Manual Transmission]
			if _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.max(_CGear-1,-1)

			--Shift Up [Manual Transmission]
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.min(_CGear+1,#_Tune.Ratios-2)

			--Toggle Clutch
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then
				if input.UserInputState == Enum.UserInputState.Begin then
					_ClutchOn = false
					_ClPressing = true
				elseif input.UserInputState == Enum.UserInputState.End then
					_ClutchOn = true
					_ClPressing = false
				end

			--Toggle PBrake
			elseif _IsOn and  input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_PBrake = not _PBrake
				elseif input.UserInputState == Enum.UserInputState.End then
					if car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude>5 then
						_PBrake = false
					end
				end

			--Toggle Transmission Mode
			elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then
				local n=1
				for i,v in pairs(_Tune.TransModes) do
					if v==_TMode then n=i break end
				end
				n=n+1
				if n>#_Tune.TransModes then n=1 end
				_TMode = _Tune.TransModes[n]

			--Throttle
			elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GThrot = 1
				else
					_GThrot = _Tune.IdleThrottle/100
				end

			--Brake
			elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ((((_CTRL["MouseBrake"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseBrake"]) or input.KeyCode == _CTRL["MouseBrake"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GBrake = 1
				else
					_GBrake = 0
				end

			--Steer Left
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = -1
					_SteerL = true
				else
					if _SteerR then
						_GSteerT = 1
					else
						_GSteerT = 0
					end
					_SteerL = false
				end

			--Steer Right
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = 1
					_SteerR = true
				else
					if _SteerL then
						_GSteerT = -1
					else
						_GSteerT = 0
					end
					_SteerR = false
				end

			--Toggle Mouse Controls
			elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then
				if input.UserInputState == Enum.UserInputState.End then
					_MSteer = not _MSteer
					_GThrot = _Tune.IdleThrottle/100
					_GBrake = 0
					_GSteerT = 0
					_ClutchOn = true
				end

			--Toggle TCS
			elseif  _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then
				if input.UserInputState == Enum.UserInputState.End then
					_TCS = not _TCS
				end

			--Toggle ABS
			elseif  _Tune. ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then
				if input.UserInputState == Enum.UserInputState.End then
					_ABS = not _ABS
				end
			end

			--Variable Controls
			if input.UserInputType.Name:find("Gamepad") then
				--Gamepad Steering
				if input.KeyCode == _CTRL["ContlrSteer"] then
					if input.Position.X>= 0 then
						local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X-cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					else
						local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X+cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					end

				--Gamepad Throttle
				elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
					_GThrot = math.max(_Tune.IdleThrottle/100,input.Position.Z)

				--Gamepad Brake
				elseif input.KeyCode == _CTRL["ContlrBrake"] then
					_GBrake = input.Position.Z
				end
			end
		else
			_GThrot = _Tune.IdleThrottle/100
			_GSteerT = 0
			_GBrake = 0
			if _CGear~=0 then _ClutchOn = true end
		end
	end
	UserInputService.InputBegan:connect(DealWithInput)
	UserInputService.InputChanged:connect(DealWithInput)
	UserInputService.InputEnded:connect(DealWithInput)


Prompt: --------|    Reference    |--------

Response: local isServer = game:GetService("RunService"):IsServer()