Prompt: -- Map storing Player -> Blocked user Ids.

Response:
local BlockedUserIdsMap = {}

PlayersService.PlayerAdded:connect(function(newPlayer)
	for player, blockedUsers in pairs(BlockedUserIdsMap) do
		local speaker = ChatService:GetSpeaker(player.Name)
		if speaker then
			for i = 1, #blockedUsers do
				local blockedUserId = blockedUsers[i]
				if blockedUserId == newPlayer.UserId then
					speaker:AddMutedSpeaker(newPlayer.Name)
				end
			end
		end
	end
end)

PlayersService.PlayerRemoving:connect(function(removingPlayer)
	BlockedUserIdsMap[removingPlayer] = nil
end)

EventFolder.SetBlockedUserIdsRequest.OnServerEvent:connect(function(player, blockedUserIdsList)
	if type(blockedUserIdsList) ~= "table" then
		return
	end

	BlockedUserIdsMap[player] = blockedUserIdsList
	local speaker = ChatService:GetSpeaker(player.Name)
	if speaker then
		for i = 1, #blockedUserIdsList do
			if type(blockedUserIdsList[i]) == "number" then
				local blockedPlayer = PlayersService:GetPlayerByUserId(blockedUserIdsList[i])
				if blockedPlayer then
					speaker:AddMutedSpeaker(blockedPlayer.Name)
				end
			end
		end
	end
end)

EventFolder.GetInitDataRequest.OnServerInvoke = (function(playerObj)
	local speaker = ChatService:GetSpeaker(playerObj.Name)
	if not (speaker and speaker:GetPlayer()) then
		CreatePlayerSpeakerObject(playerObj)
		speaker = ChatService:GetSpeaker(playerObj.Name)
	end

	local data = {}
	data.Channels = {}
	data.SpeakerExtraData = {}

	for _, channelName in pairs(speaker:GetChannelList()) do
		local channelObj = ChatService:GetChannel(channelName)
		if (channelObj) then
			local channelData =
			{
				channelName,
				channelObj:GetWelcomeMessageForSpeaker(speaker),
				channelObj:GetHistoryLogForSpeaker(speaker),
				channelObj.ChannelNameColor,
			}

			table.insert(data.Channels, channelData)
		end
	end

	for _, oSpeakerName in pairs(ChatService:GetSpeakerList()) do
		local oSpeaker = ChatService:GetSpeaker(oSpeakerName)
		data.SpeakerExtraData[oSpeakerName] = oSpeaker.ExtraData
	end

	return data
end)

local function DoJoinCommand(speakerName, channelName, fromChannelName)
	local speaker = ChatService:GetSpeaker(speakerName)
	local channel = ChatService:GetChannel(channelName)

	if (speaker) then
		if (channel) then
			if (channel.Joinable) then
				if (not speaker:IsInChannel(channel.Name)) then
					speaker:JoinChannel(channel.Name)
				else
					speaker:SetMainChannel(channel.Name)
					local msg = ChatLocalization:FormatMessageToSend(
						"GameChat_SwitchChannel_NowInChannel",
						string.format("You are now chatting in channel: '%s'", channel.Name),
						"RBX_NAME",
						channel.Name)
					speaker:SendSystemMessage(msg, channel.Name)
				end
			else
				local msg = ChatLocalization:FormatMessageToSend(
					"GameChat_ChatServiceRunner_YouCannotJoinChannel",
					"You cannot join channel '" .. channelName .. "'.",
					"RBX_NAME",
					channelName)
				speaker:SendSystemMessage(msg, fromChannelName)
			end
		else
			local msg = ChatLocalization:FormatMessageToSend(
				"GameChat_ChatServiceRunner_ChannelDoesNotExist",
				"Channel '" .. channelName .. "' does not exist.",
				"RBX_NAME",
				channelName)
			speaker:SendSystemMessage(msg, fromChannelName)
		end
	end
end

local function DoLeaveCommand(speakerName, channelName, fromChannelName)
	local speaker = ChatService:GetSpeaker(speakerName)
	local channel = ChatService:GetChannel(channelName)

	if (speaker) then
		if (speaker:IsInChannel(channelName)) then
			if (channel.Leavable) then
				speaker:LeaveChannel(channel.Name)
				local msg = ChatLocalization:FormatMessageToSend(
					"GameChat_ChatService_YouHaveLeftChannel",
					string.format("You have left channel '%s'", channelName),
					"RBX_NAME",
					channel.Name)
				speaker:SendSystemMessage(msg, "System")
			else
				local msg = ChatLocalization:FormatMessageToSend(
					"GameChat_ChatServiceRunner_YouCannotLeaveChannel",
					("You cannot leave channel '" .. channelName .. "'."),
					"RBX_NAME",
					channelName)
				speaker:SendSystemMessage(msg, fromChannelName)
			end
		else
			local msg = ChatLocalization:FormatMessageToSend(
				"GameChat_ChatServiceRunner_YouAreNotInChannel",
				("You are not in channel '" .. channelName .. "'."),
				"RBX_NAME",
				channelName)
			speaker:SendSystemMessage(msg, fromChannelName)
		end
	end
end

ChatService:RegisterProcessCommandsFunction("default_commands", function(fromSpeaker, message, channel)
	if (string.sub(message, 1, 6):lower() == "/join ") then
		DoJoinCommand(fromSpeaker, string.sub(message, 7), channel)
		return true
	elseif (string.sub(message, 1, 3):lower() == "/j ") then
		DoJoinCommand(fromSpeaker, string.sub(message, 4), channel)
		return true
	elseif (string.sub(message, 1, 7):lower() == "/leave ") then
		DoLeaveCommand(fromSpeaker, string.sub(message, 8), channel)
		return true
	elseif (string.sub(message, 1, 3):lower() == "/l ") then
		DoLeaveCommand(fromSpeaker, string.sub(message, 4), channel)
		return true
	end

	return false
end)

if ChatSettings.GeneralChannelName and ChatSettings.GeneralChannelName ~= "" then
	local allChannel = ChatService:AddChannel(ChatSettings.GeneralChannelName)

	allChannel.Leavable = false
	allChannel.AutoJoin = true

	allChannel:RegisterGetWelcomeMessageFunction(function(speaker)
		if RunService:IsStudio() then
			return nil
		end
		local player = speaker:GetPlayer()
		if player then
			local success, canChat = pcall(function()
				return Chat:CanUserChatAsync(player.UserId)
			end)
			if success and not canChat then
				return ""
			end
		end
	end)
end

local systemChannel = ChatService:AddChannel("System")
systemChannel.Leavable = false
systemChannel.AutoJoin = true
systemChannel.WelcomeMessage = ChatLocalization:FormatMessageToSend(
	"GameChat_ChatServiceRunner_SystemChannelWelcomeMessage", "This channel is for system and game notifications."
)

systemChannel.SpeakerJoined:connect(function(speakerName)
	systemChannel:MuteSpeaker(speakerName)
end)

local function TryRunModule(module)
	if module:IsA("ModuleScript") then
		local ret = require(module)
		if (type(ret) == "function") then
			ret(ChatService)
		end
	end
end

local modules = Chat:WaitForChild("ChatModules")
modules.ChildAdded:connect(function(child)
	local success, returnval = pcall(TryRunModule, child)
	if not success and returnval then
		print("Error running module " ..child.Name.. ": " ..returnval)
	end
end)

for _, module in pairs(modules:GetChildren()) do
	local success, returnval = pcall(TryRunModule, module)
	if not success and returnval then
		print("Error running module " ..module.Name.. ": " ..returnval)
	end
end

PlayersService.PlayerRemoving:connect(function(playerObj)
	if (ChatService:GetSpeaker(playerObj.Name)) then
		ChatService:RemoveSpeaker(playerObj.Name)
	end
end)


Prompt: -- Critically damped spring class for fluid motion effects

Response:
local Spring = {} do
	Spring.__index = Spring

	-- Initialize to a given undamped frequency and default position
	function Spring.new(freq, pos)
		return setmetatable({
			freq = freq,
			goal = pos,
			pos = pos,
			vel = 0,
		}, Spring)
	end

	-- Advance the spring simulation by `dt` seconds
	function Spring:step(dt)
		local f = self.freq*2*math.pi
		local g = self.goal
		local p0 = self.pos
		local v0 = self.vel

		local offset = p0 - g
		local decay = math.exp(-f*dt)

		local p1 = (offset*(1 + f*dt) + v0*dt)*decay + g
		local v1 = (v0*(1 - f*dt) - offset*(f*f*dt))*decay

		self.pos = p1
		self.vel = v1

		return p1
	end
end

CameraUtils.Spring = Spring


Prompt: --local GameFolder = Workspace.Game:GetDescendants()

Response:
local Gui = PlayerGui:WaitForChild("LoadingScreen")

Gui.Enabled = true
local erase = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)

local Loaded = 0
local toLoad = #petModelFolder --+ #GameFolder


Prompt:
----------------------------------------------------------------------------------
--                                Adonis Loader                                 --
--                            By Epix Incorporated                              --
----------------------------------------------------------------------------------
--          Edit settings using the Settings module in the Config folder        --
----------------------------------------------------------------------------------
--       This script loads the Adonis source (MainModule) into the game.        --
--            Only edit this script if you know what you're doing!              --
----------------------------------------------------------------------------------

Response:
local warn = function(...)
	warn(":: Adonis ::", ...)
end

warn("Loading...")

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

local mutex = RunService:FindFirstChild("__Adonis_MUTEX")
if mutex then
	if mutex:IsA("StringValue") then
		warn("Adonis is already running! Aborting...; Running Location:", mutex.Value, "This Location:", script:GetFullName())
	else
		warn("Adonis mutex detected but is not a StringValue! Aborting anyway...; This Location:", script:GetFullName())
	end
else
	mutex = Instance.new("StringValue")
	mutex.Name = "__Adonis_MUTEX"
	mutex.Archivable = false
	mutex.Value = script:GetFullName()
	mutex.Parent = RunService

	local model = script.Parent.Parent
	local configFolder = model.Config
	local loaderFolder = model.Loader

	local dropper = loaderFolder.Dropper
	local loader = loaderFolder.Loader
	local runner = script

	local settingsModule = configFolder.Settings
	local pluginsFolder = configFolder.Plugins
	local themesFolder = configFolder.Themes

	local backup = model:Clone()

	local data = {
		Settings = {} :: {[string]: any};
		Descriptions = {} :: {[string]: string};
		Messages = {} :: {string|{[string]: any}};
		ServerPlugins = {} :: {ModuleScript};
		ClientPlugins = {} :: {ModuleScript};
		Packages = {} :: {Folder};
		Themes = {} :: {Instance};

		ModelParent = model.Parent;
		Model = model;
		Config = configFolder;
		Core = loaderFolder;

		Loader = loader;
		Dopper = dropper;
		Runner = runner;

		ModuleID = 7510592873;  		--// https://www.roblox.com/library/7510592873/Adonis-MainModule
		LoaderID = 7510622625;			--// https://www.roblox.com/library/7510622625/Adonis-Loader-Sceleratis-Davey-Bones-Epix

		--// Note: The nightly module is updated frequently with ever commit merged to the master branch on the Adonis repo.
		--// It is prone to breaking, unstable, untested, and should not be used for anything other than testing/feature preview.
		NightlyMode = false;			--// If true, uses the nightly module instead of the current release module.
		NightlyModuleID = 8612978896; 	--// https://www.roblox.com/library/8612978896/Nightlies-Adonis-MainModule

		DebugMode = false;
	}

	--// Init

	-- selene: allow(incorrect_standard_library_use)
	script.Parent = nil --script:Destroy()
	model.Name = math.random()

	local moduleId = if data.NightlyMode then data.NightlyModuleID else data.ModuleID

	if data.DebugMode then
		for _, v in model.Parent:GetChildren() do
			if v.Name == "MainModule" and v:IsA("ModuleScript") then
				moduleId = v
				break
			end
		end
		if not moduleId then
			error(`Adonis DebugMode is enabled but no ModuleScript named 'MainModule' is found in {model.Parent:GetFullName()}`)
		end
	end

	local success, setTab = pcall(require, settingsModule)
	if success then
		data.Messages = setTab.Settings.Messages
	else
		warn("[DEVELOPER ERROR] Settings module errored while loading; Using defaults; Error Message: ", setTab)
		table.insert(data.Messages, {
			Title = "Warning!";
			Icon = "rbxassetid://7495468117";
			Message = "Settings module error detected; using default settings.";
			Time = 15;
		})
		setTab = {}
	end

	data.Settings = setTab.Settings
	data.Descriptions = setTab.Description
	data.Order = setTab.Order

	for _, module in pluginsFolder:GetChildren() do
		local name = string.lower(module.Name)

		if module:IsA("Folder") then
			table.insert(data.Packages, module)

		elseif string.match(name, "^client[%-:]") then
			table.insert(data.ClientPlugins, module)

		elseif string.match(name, "^server[%-:]") then
			table.insert(data.ServerPlugins, module)

		else
			warn(`[DEVELOPER ERROR] Unknown Plugin Type for {module}; Plugin name should either start with 'Server:', 'Server-', 'Client:', or 'Client-'`)
		end
	end

	for _, theme in themesFolder:GetChildren() do
		table.insert(data.Themes, theme)
	end

	if tonumber(moduleId) then
		warn(`Requiring Adonis MainModule; Model URL: https://www.roblox.com/library/{moduleId}`)
	end

	local module = require(moduleId)
	local response = module(data)

	if response == "SUCCESS" then
		if (data.Settings and data.Settings.HideScript) and not data.DebugMode and not RunService:IsStudio() then
			model.Parent = nil
			game:BindToClose(function()
				model.Parent = ServerScriptService
				model.Name = "Adonis_Loader"
			end)
		end

		model.Name = "Adonis_Loader"
	else
		error(" !! Adonis MainModule failed to load !! ")
	end
end

																																																							--[[
--___________________________________________________________________________________________--
--___________________________________________________________________________________________--
--___________________________________________________________________________________________--
--___________________________________________________________________________________________--

					___________      .__         .___
					\_   _____/_____ |__|__  ___ |   | ____   ____
					 |    __)_\____ \|  \  \/  / |   |/    \_/ ___\
					 |        \  |_> >  |>    <  |   |   |  \  \___
					/_______  /   __/|__/__/\_ \ |___|___|  /\___  > /\
					        \/|__|            \/          \/     \/  \/
				  --------------------------------------------------------
				  Epix Incorporated. Not Everything is so Black and White.
				  --------------------------------------------------------

--___________________________________________________________________________________________--
--___________________________________________________________________________________________--
--___________________________________________________________________________________________--
--___________________________________________________________________________________________--
																																																							--]]


Prompt:
--- Same as indexing, but uses an incremented number as a key.
-- @param task An item to clean
-- @treturn number taskId

Response:
function Maid:giveTask(task)
	if not task then
		error("Task cannot be false or nil", 2)
	end

	local taskId = #self._tasks+1
	self[taskId] = task

	if type(task) == "table" and (not (task.Destroy or task.destroy)) then
		warn("[Maid.GiveTask] - Gave table task without .Destroy\n\n" .. debug.traceback())
	end

	return taskId
end


Prompt: -- functions

Response:
function onRunning(speed)
	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	pose = "Jumping"
end

function onClimbing()
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function moveJump()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
  RightShoulder:SetDesiredAngle(3.14)
	LeftShoulder:SetDesiredAngle(-3.14)
	RightHip:SetDesiredAngle(0)
	LeftHip:SetDesiredAngle(0)
end


Prompt: -- Example: Connect buttons to the castVote function

Response:
local button1 = script.Parent.MapFrame.VoteButton
local button2 = script.Parent.MapFrame1.VoteButton

button1.MouseButton1Click:Connect(function()
	castVote("Dead Town")
end)

button2.MouseButton1Click:Connect(function()
	castVote("Test Map")
end)


Prompt: --Globals

Response:
local AI = script.Parent
local AIName = AI.Name
local AItorso = AI.Torso

if true then -- if your torso doesn't have a Humanoid; flip this to false
local HumanoidType = nil   -- find-a-HumanoidObject  --  make sure

local list = AI:GetChildren()        -- temp var.
for x = 1, #list do
local temp = list[x]
	if (temp.className == "Humanoid") then
        HumanoidType = temp.Name
   end  -- found Humanoid
end -- AI Parts

if HumanoidType then
number = math.floor(number*100) -- serial# of AI
hum = AI[HumanoidType]
BRAINWave = 7/hum.WalkSpeed  -- For extreme speeds, this may have to be adjusted.
print (script, ": Humanoid = ", hum, AI:GetFullName(), number, "- Think Speed = ", BRAINWave)
end
end -- set speed


Prompt: --The main script, this regulates basic values of the local elements

Response:
local Steamer = script.Parent.Parent.Content.Steam
local Eaten = script.Parent.Parent.Content
local SoundA = script.Parent.Slurp
local WarmSoup = script.Parent.TastySoup
local Clickable = script.Parent.ClickDetector
function SoupEaten()
Clickable.MaxActivationDistance = 0 -- Fake debounce, but better than normal - less laggy
SoundA:Play()
Steamer.Enabled = false
Eaten.Transparency = 1
WarmSoup.Disabled = true
wait(50)
Eaten.Transparency = 0
WarmSoup.Disabled = false
Clickable.MaxActivationDistance = 15
Steamer.Enabled = true
end
script.Parent.ClickDetector.MouseClick:connect(SoupEaten)


Prompt: --<DON'T TOUCH THE SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING!

Response:
local RS = game:GetService('ReplicatedStorage')
local TS = game:GetService('TweenService')

local Tool = script.Parent
local TextureArray = {}

local Activated = false
local Debounce = false
local Cooldown = 1
local Prop = nil
local LaughAnim = nil

Tool.Activated:Connect(function()
	if not Debounce then
		Debounce = true
		task.delay(Cooldown, function()
			Debounce = false
		end)

		local Character = Tool.Parent

		if not Activated then
			Activated = true

			LaughAnim = Character.Humanoid:LoadAnimation(RS.GhoulV4.Laugh)
			LaughAnim:Play()
			Character.HumanoidRootPart.Anchored = true

			Prop = RS.GhoulV4.Props.Wings:Clone()
			Prop.Parent = Character

			local Attachment = Instance.new('Attachment')
			Attachment.Parent = Character.HumanoidRootPart
			Attachment.Position = Vector3.new(0,-2.5,0)

			local Wave = RS.GhoulV4.Effects.Wave:Clone()
			Wave.Parent = Attachment

			local Smoke = RS.GhoulV4.Effects.Smoke:Clone()
			Smoke.Parent = Character.HumanoidRootPart

			local Pixel = RS.GhoulV4.Effects.Pixel:Clone()
			Pixel.Parent = Character.HumanoidRootPart

			local Laugh = RS.GhoulV4.Sound.Laugh:Clone()
			Laugh.Parent = Character.HumanoidRootPart

			local SmokeSound = RS.GhoulV4.Sound.Smoke:Clone()
			SmokeSound.Parent = Character.HumanoidRootPart

			Laugh:Play()

			task.delay(1.6,function()
				Laugh:Destroy()
				task.wait(0.25)
				Character.HumanoidRootPart.Anchored = false
				LaughAnim:Stop()
			end)

			SmokeSound:Play()

			local Tween = TS:Create(SmokeSound, TweenInfo.new(1.5), {Volume = 0})
			Tween:Play()

			Tween.Completed:Connect(function()
				SmokeSound:Destroy()
			end)

			Wave:Emit(2)
			Smoke:Emit(100)
			Pixel:Emit(50)

			for _, Item in ipairs(Character.Humanoid:GetAccessories()) do
				local Hair = Item.Handle:FindFirstChild("HairAttachment") ~= nil
				if Hair then
					TextureArray[Item] = {TextureID = Item.Handle.TextureID, Color = Item.Handle.Color, Material = Item.Handle.Material}
					Item.Handle.Color = Color3.fromRGB(255, 0, 0)
					Item.Handle.TextureID = ''
					Item.Handle.Material = Enum.Material.Neon
				end
			end

		elseif Activated then
			Activated = false

			local Tween = TS:Create(Prop.Handle, TweenInfo.new(0.5), {Transparency = 1})
			Tween:Play()

			Tween.Completed:Connect(function()
				Prop:Destroy()
			end)

			for _, Item in ipairs(Character.Humanoid:GetAccessories()) do
				local Hair = Item.Handle:FindFirstChild("HairAttachment") ~= nil
				if Hair then
					Item.Handle.Color = TextureArray[Item].Color
					Item.Handle.Material = TextureArray[Item].Material
					Item.Handle.TextureID = TextureArray[Item].TextureID
					TextureArray[Item] = nil
				end
			end
		end
	end
end)


Prompt:
--[[
	Cleans up the tasks passed in as the arguments.
	A task can be any of the following:

	- an Instance - will be destroyed
	- an RBXScriptConnection - will be disconnected
	- a function - will be run
	- a table with a `Destroy` or `destroy` function - will be called
	- an array - `cleanup` will be called on each item
]]

Response:
local function cleanupOne(task: any)
	local taskType = typeof(task)

	-- case 1: Instance
	if taskType == "Instance" then
		task:Destroy()

	-- case 2: RBXScriptConnection
	elseif taskType == "RBXScriptConnection" then
		task:Disconnect()

	-- case 3: callback
	elseif taskType == "function" then
		task()

	elseif taskType == "table" then
		-- case 4: destroy() function
		if typeof(task.destroy) == "function" then
			task:destroy()

		-- case 5: Destroy() function
		elseif typeof(task.Destroy) == "function" then
			task:Destroy()

		-- case 6: array of tasks
		elseif task[1] ~= nil then
			for _, subtask in ipairs(task) do
				cleanupOne(subtask)
			end
		end
	end
end

local function cleanup(...: any)
	for index = 1, select("#", ...) do
		cleanupOne(select(index, ...))
	end
end

return cleanup


Prompt:
-- upstream: https://github.com/facebook/react/blob/75955bf1d7ff6c2c1f4052f4a84dd2ce6944c62e/packages/shared/formatProdErrorMessage.js
--!strict
--[[*
 * 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.
 *
 ]]


Prompt: --Zombie artificial stupidity script

Response:
sp=script.Parent
lastattack=0
nextrandom=0
nextsound=0
nextjump=0
chasing=false

variance=4

damage=10
attackrange=4.5
sightrange=999--60
runspeed=16
wonderspeed=8
healthregen=false
colors={"Sand red","Dusty Rose","Medium blue","Sand blue","Lavender","Earth green","Brown","Medium stone grey","Brick yellow"}

function raycast(spos,vec,currentdist)
	local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(spos+(vec*.01),vec*currentdist),script.Parent)
	if hit2~=nil and pos2 then
		if hit2.Parent==script.Parent and hit2.Transparency>=.8 or hit2.Name=="Handle" or string.sub(hit2.Name,1,6)=="Effect" or hit2.Parent:IsA("Hat") or hit2.Parent:IsA("Tool") or (hit2.Parent:FindFirstChild("Humanoid") and hit2.Parent:FindFirstChild("TEAM") and hit2.Parent:FindFirstChild("TEAM").Value == script.Parent.TEAM.Value) or (not hit2.Parent:FindFirstChild("Humanoid") and hit2.CanCollide==false) then
			local currentdist=currentdist-(pos2-spos).magnitude
			return raycast(pos2,vec,currentdist)
		end
	end
	return hit2,pos2
end

function waitForChild(parent,childName)
	local child=parent:findFirstChild(childName)
	if child then return child end
	while true do
		child=parent.ChildAdded:wait()
		if child.Name==childName then return child end
	end
end


Prompt:
--Adding additional ignorePurchases because of the unlockPurchases setting that each button
--has dependancies

Response:
local unlock = {}
local allButtons = tycoons[1].Buttons:GetChildren()
local unlockPurchases = RebirthSettings.unlockPurchases

function addDependencies(ignoreInner,obj)
	local queue = {}
	for t = 1,#allButtons,1 do
		local object = allButtons[t]:FindFirstChild("Object")
		local dependency = allButtons[t]:FindFirstChild("Dependency")
		if object ~= nil and dependency ~= nil then
			if dependency.Value == obj then
				table.insert(ignoreInner,object.Value)
				table.insert(queue,object.Value)
			end
		end
	end
	for d = 1,#queue,1 do
		addDependencies(ignoreInner,queue[d])
	end
end

for u = 1,#unlockPurchases,1 do
	unlock[u] = {rebirthCount = unlockPurchases[u].rebirthCount}
	table.insert(unlock[u],unlockPurchases[u].unlock)
	addDependencies(unlock[u],unlockPurchases[u].unlock)
end

function hideBillboadAndText(billboardGui, textLabel)
	if billboardGui then
		billboardGui.Enabled = false
		if textLabel then
			textLabel.TextTransparency = 1
		end
	end
end

function showBillboadAndText(billboardGui, textLabel)
	if billboardGui then
		billboardGui.Enabled = true
		if textLabel then
			textLabel.TextTransparency = 0
		end
	end
end

function hideButton(name,buttons)
	local allButtons = buttons:GetChildren()
	local item = nil
	for i = 1,#allButtons,1 do
		local hasObject = allButtons[i]:FindFirstChild("Object")
		if hasObject and hasObject:IsA("StringValue") and
		   allButtons[i].Object.Value == name then
			item = allButtons[i]
			break
		end
	end
	if item ~= nil then
		local head = item:FindFirstChild("Head")
		if head ~= nil then
			local billboardGui = head:FindFirstChild("BillboardGui")
			local textLabel
			if billboardGui then
				textLabel = billboardGui:FindFirstChild("TextLabel")
			end
			if TycoonSettings['ButtonsFadeOut'] then
				head.CanCollide = false
				coroutine.resume(coroutine.create(function()
					for i=1,20 do
						wait(TycoonSettings['FadeOutTime']/20)
						head.Transparency = head.Transparency + 0.05
						if textLabel then
							textLabel.TextTransparency = textLabel.TextTransparency + 0.05
						end
					end

					hideBillboadAndText(billboardGui, textLabel)
				end))
			else
				head.CanCollide = false
				head.Transparency = 1
				hideBillboadAndText(billboardGui, textLabel)
			end
		end
	end
end

local function getTouchToClaimAndDeleteGateControl(nextTycoon)
	local gate = nextTycoon.Entrance:GetChildren()
	local touchToClaim = nil
	for i = 1,#gate, 1 do
		local gateControl = gate[i]:FindFirstChild("GateControl")
		if gateControl ~= nil then
			touchToClaim = gate[i]
			gateControl:Destroy()
			break
		end
	end
	if touchToClaim == nil then
		error("Zed's tycoon Save scripts make sure you have a script called 'GateControl' in each tycoons Entrance/Touch to claim!")
	end
	return touchToClaim
end

function loadPurchedObjectFromDatabaseIfPlayerTouchToClaim(touchToClaimHead,
															purchasedObjects,
															PurchaseHandlerNew,
															tycoon)
	--TODO all purhcases must have a button
	local purchases = tycoon:WaitForChild("Purchases")
	while true do
		wait(0.1)
		if #purchases:GetChildren() < 10 then break end
	end
	local debounce = true
	touchToClaimHead.Touched:Connect(function(hit)
		local humanoid = hit.Parent:FindFirstChild("Humanoid")
		if humanoid ~= nil and humanoid.Health > 0 and debounce then
			local success,err = pcall(function()
				local playerInPlayerMoney = playerMoney:FindFirstChild(humanoid.Parent.Name)
				local ownsTycoon = nil
				if playerInPlayerMoney ~= nil then
			   		 ownsTycoon = playerInPlayerMoney:FindFirstChild("OwnsTycoon")
				end
				if ownsTycoon ~= nil and ownsTycoon.Value == nil and not tycoon.Owner.Value then

					local player = game.Players:FindFirstChild(humanoid.Parent.Name)
					print("Before loading objects in tycoon for player ",player.Name)
					print("------------------------------")

					if player ~= nil then
						debounce = false
						tycoon.CurrencyToCollect.Value = 0
						touchToClaimHead.Transparency = 1
						tycoon.Owner.Value = player
						ownsTycoon.Value = tycoon
						touchToClaimHead.Parent.Name = player.Name.."'s Tycoon"
						touchToClaimHead.Transparency = 0.6

						touchToClaimHead.CanCollide = false
						player.TeamColor = tycoon.TeamColor.Value
						local data = PlayerStatManager:getPlayerData(player)["TycoonPurchases"]

						for key,value in pairs(PurchaseHandlerNew) do
							print("Adding ",key)
							if data[key] == true then
								value.Parent = purchasedObjects
							end
						end
						wait(2.5)
						for k,v in pairs(PurchaseHandlerNew) do
							if data[k] == true then
								local buttonName = k
								local buttons = tycoon.Buttons
								hideButton(buttonName,buttons)
							end
						end
						if RebirthSettings.enabled == true then
							giveRebirthGuiIfTycoonFinished(PurchaseHandlerNew,player)
						end
					else
						print(" loadPurchedObjectFromDatabaseIfPlayerTouchToClaim Player == nil")
					end
				else
					print("ownsTycoon.Value ~= nil or ownsTycoon == nil ")
				end

			end)
			if success == false then
				print(err)
			end
		end

	end)
end

function isTycoonFinished(PurchaseHandlerNew,player)
	local purchases = PlayerStatManager:getPlayerData(player)["TycoonPurchases"]
	local rebirthCountStat = PlayerStatManager:getStat(player,"RebirthCount")
	local playerHasTycoonObject = false
	--Checking what object should be ignored
	for key1,value1 in pairs(PurchaseHandlerNew) do
		local ignorePurchases = RebirthSettings.ignorePurchases
		local canContinue = true
		for i = 1,#ignorePurchases,1 do
			if ignorePurchases[i] == key1 then
				canContinue = false
				break
			end
		end
		--Check if it should ignore unlock purchases
		for u = 1,#unlock,1 do
			if rebirthCountStat < unlock[u].rebirthCount then
				for a = 1,#unlock[u],1 do
					if unlock[u][a] == key1 then
						canContinue = false
						break
					end
				end
			end
			if canContinue == false then
				break
			end
		end

		if canContinue then
			playerHasTycoonObject =  false
			for key2,value2 in pairs(purchases) do
				if value2 == true and key1 == key2 then
					playerHasTycoonObject = true
					break
				end
			end
			if playerHasTycoonObject == false then
				return false
			end
		end
	end
	return true
end

function giveRebirthGuiIfTycoonFinished(PurchaseHandlerNew,player)
	local hasFinishedTycoon = isTycoonFinished(PurchaseHandlerNew,player)
	if hasFinishedTycoon == true then
		local canRebirth = player:FindFirstChild("CanRebirth")
		if canRebirth ~= nil then
			canRebirth.Value = true
		end
		giveRebirthGui(player)

	end
end

function giveRebirthGui(player)
	local success,err = pcall(function()
		local rebirthGuiClone = rebirthGui:Clone()
		local playerGui = player:FindFirstChild("PlayerGui")

		if playerGui ~= nil then
			--Added wait because after player died and their character is added
			--the gui does not get cloned only after I add wait
			wait(3)
			local hasRebirthGui = playerGui:FindFirstChild("RebirthGui (Don't Move)")
			if hasRebirthGui == nil then
				rebirthGuiClone.Parent = playerGui
			end
		else
			print("playerGui == nil")
		end
	end)
	if success == false then
		print(err)
	end
end

function savePurchasesObjectsInDatabase(owner,instance,PurchaseHandlerNew)

	local status,err = pcall(function()
		local player = owner.Value
		if player ~= nil then
			--local stat = PlayerStatManager:getStat(player,instance.Name)
			local stat = PlayerStatManager:getStatInTycoonPurchases(player,instance.Name)
			local statMoney = PlayerStatManager:getStat(player,"Money")

			if player ~= nil and not stat then
				PlayerStatManager:ChangeStatInTycoonPurchases(player, instance.Name, true)
				if RebirthSettings.enabled == true then
					giveRebirthGuiIfTycoonFinished(PurchaseHandlerNew,player)
				end
			end
		end
	end)
	if status == false then
		print(err)
	end
end

function playerJoinedCallFunction(player)
	local rebirthCountStat = PlayerStatManager:getStat(player,"RebirthCount")
	local plrJoinedOrDied = RebirthSettings.playerRespawned
	for i = 1,#plrJoinedOrDied,1 do
		if rebirthCountStat and rebirthCountStat >= plrJoinedOrDied[i].rebirthCount then
			plrJoinedOrDied[i][1](player)
		end
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		if RebirthSettings.enabled == true then
			local canRebirth = player:FindFirstChild("CanRebirth")

			if canRebirth and canRebirth.Value == true then
				giveRebirthGui(player)
			end
			playerJoinedCallFunction(player)
		end
	end)
end)

for i = 1,#tycoons,1 do
    --getTouchToClaimAndDeleteGateControl also destroys the gate
	local touchToClaim = getTouchToClaimAndDeleteGateControl(tycoons[i])

	purchaseHandlerNew:Clone().Parent = tycoons[i]

	local purchasedObjects = tycoons[i]:FindFirstChild("PurchasedObjects")
	local owner = tycoons[i]:FindFirstChild("Owner")
	local entrance = tycoons[i].Entrance
	local touchToClaimHead = touchToClaim.Head

	--Is PurchaseHandlerNew
	allObjects[i] = require(tycoons[i].PurchaseHandlerNew)

	--Load data
	--Check old code below long load data
	loadPurchedObjectFromDatabaseIfPlayerTouchToClaim(touchToClaimHead,
														purchasedObjects,
														allObjects[i],
														tycoons[i])

	--Save data
	if purchasedObjects ~= nil and owner ~= nil then
		purchasedObjects.ChildAdded:Connect(function(instance)
			--Check old code below long save data
			savePurchasesObjectsInDatabase(owner,instance,allObjects[i])
		end)
	else
		error("SaveTrigger script won't save data because either purchasedObjects or owner is NIL")
	end
end

tycoonsFolder.ChildAdded:Connect(function(tycoon)

	purchaseHandlerNew:Clone().Parent = tycoon
	local purchasedObjects = tycoon:FindFirstChild("PurchasedObjects")
	local owner = tycoon:FindFirstChild("Owner")

	local touchToClaim = getTouchToClaimAndDeleteGateControl(tycoon)

	local touchToClaimHead = touchToClaim.Head

	local PurchaseHandlerNew = require(tycoon.PurchaseHandlerNew)

	--Load data
	--Check old code below long load data
	loadPurchedObjectFromDatabaseIfPlayerTouchToClaim(touchToClaimHead,
													  purchasedObjects,
													  PurchaseHandlerNew,
													  tycoon)

	--Save data
	if purchasedObjects ~= nil and owner ~= nil then
		purchasedObjects.ChildAdded:Connect(function(instance)
			--Check old code below long save data
			savePurchasesObjectsInDatabase(owner,instance,PurchaseHandlerNew)
		end)
	else
		error("SaveTrigger script won't save data because either purchasedObjects or owner is NIL")
	end
end)

function getTycoonByPlayerName(playerName)
	local allTycoons = tycoonsFolder:GetChildren()
	for i = 1,#allTycoons,1 do
		local owner = allTycoons[i]:FindFirstChild("Owner")
		if owner ~= nil and allTycoons[i]:IsA("Model") then
			if owner.Value ~= nil and owner.Value.Name == playerName then
				return allTycoons[i]
			end
		else
			print("MAKE SURE EACH TYCOON HAS OWNER VALUE")
		end
	end
	return nil
end

function removeTycoonAndAddOriginal(tycoon,playerName)
	local plrStats = game.ServerStorage.PlayerMoney:FindFirstChild(playerName)
	if plrStats ~= nil then
		plrStats.OwnsTycoon.Value = nil
	end
	if tycoon then

        --Holds the original tycoons
		local backup = AllTycoons[tycoon.Name]:Clone()
		tycoon:Destroy()
		wait()
		local currencyToCollect = backup:FindFirstChild("CurrencyToCollect")
		if currencyToCollect ~= nil then
			currencyToCollect.Value = 0
		else
			print("currencyToCollect == nil ----------------------->")
		end
		backup.Parent=script.Parent.Tycoons

	end
end

function teleportCharacterToSuppliedPart(player,tycoon)
	local partName = RebirthSettings.teleportToo
	local part = tycoon:FindFirstChild(partName)

	if part and part:IsA("BasePart") then
		local character = player.Character
		if character then
			character:SetPrimaryPartCFrame(part.CFrame)
		end
	end
end

function callFunctionsIfRebirthIsReached(rebirthCountStat,player)
	local playerReachedRebirthCount = RebirthSettings.playerReachedRebirthCount

	for i = 1,#playerReachedRebirthCount do
		if playerReachedRebirthCount[i].rebirthCount == rebirthCountStat then
			playerReachedRebirthCount[i][1](player)
			break
		end
	end
end

local function getCashAmountByRebirthCount(array,rebirthCount)
	for key,value in pairs(array) do
		if value.rebirthCount == rebirthCount then
			return value.cashAmount
		end
	end
end

rebirthEvent.OnServerEvent:Connect(function(player)

	local rebirthCountStat = PlayerStatManager:getStat(player,"RebirthCount")
	--TODO real investigate if rebirth count can be nil
	if rebirthCountStat == nil then return end
	local array = RebirthSettings.cashNeededForRebirth
	local cashNeeded = getCashAmountByRebirthCount(array,rebirthCountStat+1)
	local playerStats = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)

	if not cashNeeded then cashNeeded = RebirthSettings.defaultCashNeededForRebirth end

	if RebirthSettings.enabled == true then
		if (playerStats.Value >= cashNeeded) == false then
			rebirthEvent:FireClient(player,cashNeeded)
			return
		end

		local success,err = pcall(function()
			local ownsTycoon = playerStats:FindFirstChild("OwnsTycoon")

			if ownsTycoon ~= nil and ownsTycoon.Value ~= nil then

				local tycoon = getTycoonByPlayerName(player.Name);
				if tycoon ~= nil then
					local PurchaseHandlerNew = require(tycoon.PurchaseHandlerNew)
					local hasFinishedTycoon = isTycoonFinished(PurchaseHandlerNew,player)
					if hasFinishedTycoon == true then

						PlayerStatManager:setAllTycoonPurchasesToNil(player)

						if rebirthCountStat == nil then
							PlayerStatManager:saveStat(player,"RebirthCount",0)
						end
						if RebirthSettings.resetCash then
							PlayerStatManager:saveStat(player,"Money",0)
						end

						PlayerStatManager:IncrementStat(player,"RebirthCount",1)
						rebirthCountStat = PlayerStatManager:getStat(player,"RebirthCount")
						for u = 1,#unlockPurchases,1 do
							if rebirthCountStat >= unlockPurchases[u].rebirthCount then
								--TODO check if there is bugs
								PlayerStatManager:ChangeStatInTycoonPurchases(player, unlockPurchases[u].unlock, true)
							end
						end
						callFunctionsIfRebirthIsReached(rebirthCountStat,player)

						local leaderstats = player:FindFirstChild("leaderstats")
						if leaderstats ~= nil then
							local rebirths = leaderstats:FindFirstChild("Rebirths")
							local moneyStat = leaderstats:FindFirstChild("Money")
							if rebirths ~= nil and rebirthCountStat ~= nil then
								rebirths.Value = rebirthCountStat
							end
							if moneyStat ~= nil and RebirthSettings.resetCash then
								moneyStat.Value = 0
							end
						end

						local playerStats = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
						if RebirthSettings.resetCash then
							playerStats.Value = 0
						end
						teleportCharacterToSuppliedPart(player,tycoon)
						removeTycoonAndAddOriginal(tycoon,player.Name)
						local canRebirth = player:FindFirstChild("CanRebirth")
						if canRebirth ~= nil then
							canRebirth.Value = false
						end
						local playerGui = player:FindFirstChild("PlayerGui")
						if playerGui ~= nil then
							local rebirthGui = playerGui:FindFirstChild("RebirthGui (Don't Move)")
							if rebirthGui ~= nil then
								rebirthGui:Destroy()
							end
						end

					end
				else
					print("Tycoon is nil getTycoonByPlayerName("..player.Name..")")
				end
			end
		end)
		if success == false then
			print(err)
		end
	end
end)

if runService:IsStudio() or TestSettings.showTouchTycoonButtonsGuiOutsideStudio then
	local canContinueTouchingButtons = false

	touchAllTycoonButtons.OnServerEvent:Connect(function(player,start)
		canContinueTouchingButtons = start
		if canContinueTouchingButtons then
			local character = player.Character
			local tycoon = getTycoonByPlayerName(player.Name);
			if not tycoon then return end
			while canContinueTouchingButtons do
				local allTheButtons = tycoon.Buttons:GetChildren();
				local notOpen = false
				for i = 1,#allTheButtons,1 do
					local head = allTheButtons[i]:FindFirstChild("Head")
					if not canContinueTouchingButtons then return end
					if head and head.Transparency == 0 then
						local headPos = head.Position
						local newPos = Vector3.new(headPos.X,headPos.Y+1.2,headPos.Z)
						character:MoveTo(newPos)
						wait(0.5)
						notOpen = true
					end
				end
				if notOpen == false then
					break
				end
			end
		end
	end)

	giveCashEvent.OnServerEvent:Connect(function(player,cashAmount)
		local plrCash = playerMoney:FindFirstChild(player.Name)
		if plrCash then
			plrCash.Value = plrCash.Value + cashAmount
		end
	end)
end


Prompt: -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote

Response: local emoteNames = { wave = false, point = false, dance = true, laugh = false, cheer = false}


Prompt:
--////////////////////////////// Methods
--//////////////////////////////////////

Response:
local methods = {}
methods.__index = methods

local function CreateGuiObjects()
	local BaseFrame = Instance.new("Frame")
	BaseFrame.Selectable = false
	BaseFrame.Size = UDim2.new(1, 0, 1, 0)
	BaseFrame.BackgroundTransparency = 1

	local Scroller = Instance.new("ScrollingFrame")
	Scroller.Selectable = ChatSettings.GamepadNavigationEnabled
	Scroller.Name = "Scroller"
	Scroller.BackgroundTransparency = 1
	Scroller.BorderSizePixel = 0
	Scroller.Position = UDim2.new(0, 0, 0, 3)
	Scroller.Size = UDim2.new(1, -4, 1, -6)
	Scroller.CanvasSize = UDim2.new(0, 0, 0, 0)
	Scroller.ScrollBarThickness = module.ScrollBarThickness
	Scroller.Active = FFlagUserChatHistorySinksInput
	Scroller.Parent = BaseFrame

	local Layout = Instance.new("UIListLayout")
	Layout.SortOrder = Enum.SortOrder.LayoutOrder
	Layout.Parent = Scroller

	return BaseFrame, Scroller, Layout
end

function methods:Destroy()
	self.GuiObject:Destroy()
	self.Destroyed = true
end

function methods:SetActive(active)
	self.GuiObject.Visible = active
end

function methods:UpdateMessageFiltered(messageData)
	local messageObject = nil
	local searchIndex = 1
	local searchTable = self.MessageObjectLog

	while (#searchTable >= searchIndex) do
		local obj = searchTable[searchIndex]

		if obj.ID == messageData.ID then
			messageObject = obj
			break
		end

		searchIndex = searchIndex + 1
	end

	if messageObject then
		messageObject.UpdateTextFunction(messageData)
		self:PositionMessageLabelInWindow(messageObject, searchIndex)
	end
end

function methods:AddMessage(messageData)
	self:WaitUntilParentedCorrectly()

	local messageObject = MessageLabelCreator:CreateMessageLabel(messageData, self.CurrentChannelName)
	if messageObject == nil then
		return
	end

	table.insert(self.MessageObjectLog, messageObject)
	self:PositionMessageLabelInWindow(messageObject, #self.MessageObjectLog)
end

function methods:AddMessageAtIndex(messageData, index)
	local messageObject = MessageLabelCreator:CreateMessageLabel(messageData, self.CurrentChannelName)
	if messageObject == nil then
		return
	end

	table.insert(self.MessageObjectLog, index, messageObject)

	self:PositionMessageLabelInWindow(messageObject, index)
end

function methods:RemoveLastMessage()
	self:WaitUntilParentedCorrectly()

	local lastMessage = self.MessageObjectLog[1]

	lastMessage:Destroy()
	table.remove(self.MessageObjectLog, 1)
end

function methods:IsScrolledDown()
	local yCanvasSize = self.Scroller.CanvasSize.Y.Offset
	local yContainerSize = self.Scroller.AbsoluteWindowSize.Y
	local yScrolledPosition = self.Scroller.CanvasPosition.Y

	return (yCanvasSize < yContainerSize or
		yCanvasSize - yScrolledPosition <= yContainerSize + 5)
end

function methods:UpdateMessageTextHeight(messageObject)
	local baseFrame = messageObject.BaseFrame
	for i = 1, 10 do
		if messageObject.BaseMessage.TextFits then
			break
		end

		local trySize = self.Scroller.AbsoluteSize.X - i
		baseFrame.Size = UDim2.new(1, 0, 0, messageObject.GetHeightFunction(trySize))
	end
end

function methods:PositionMessageLabelInWindow(messageObject, index)
	self:WaitUntilParentedCorrectly()

	local wasScrolledDown = self:IsScrolledDown()

	local baseFrame = messageObject.BaseFrame

	local layoutOrder = 1
	if self.MessageObjectLog[index - 1] then
		if index == #self.MessageObjectLog then
			layoutOrder = self.MessageObjectLog[index - 1].BaseFrame.LayoutOrder + 1
		else
			layoutOrder = self.MessageObjectLog[index - 1].BaseFrame.LayoutOrder
		end
	end
	baseFrame.LayoutOrder = layoutOrder

	baseFrame.Size = UDim2.new(1, 0, 0, messageObject.GetHeightFunction(self.Scroller.AbsoluteSize.X))
	baseFrame.Parent = self.Scroller

	if messageObject.BaseMessage then
		self:UpdateMessageTextHeight(messageObject)
	end

	if wasScrolledDown then
		self.Scroller.CanvasPosition = Vector2.new(
			0, math.max(0, self.Scroller.CanvasSize.Y.Offset - self.Scroller.AbsoluteSize.Y))
	end
end

function methods:ReorderAllMessages()
	self:WaitUntilParentedCorrectly()

	--// Reordering / reparenting with a size less than 1 causes weird glitches to happen
	-- with scrolling as repositioning happens.
	if self.GuiObject.AbsoluteSize.Y < 1 then return end

	local oldCanvasPositon = self.Scroller.CanvasPosition
	local wasScrolledDown = self:IsScrolledDown()

	for _, messageObject in pairs(self.MessageObjectLog) do
		self:UpdateMessageTextHeight(messageObject)
	end

	if not wasScrolledDown then
		self.Scroller.CanvasPosition = oldCanvasPositon
	else
		self.Scroller.CanvasPosition = Vector2.new(
			0, math.max(0, self.Scroller.CanvasSize.Y.Offset - self.Scroller.AbsoluteSize.Y))
	end
end

function methods:Clear()
	for _, v in pairs(self.MessageObjectLog) do
		v:Destroy()
	end
	self.MessageObjectLog = {}
end

function methods:SetCurrentChannelName(name)
	self.CurrentChannelName = name
end

function methods:FadeOutBackground(duration)
	--// Do nothing
end

function methods:FadeInBackground(duration)
	--// Do nothing
end

function methods:FadeOutText(duration)
	for i = 1, #self.MessageObjectLog do
		if self.MessageObjectLog[i].FadeOutFunction then
			self.MessageObjectLog[i].FadeOutFunction(duration, CurveUtil)
		end
	end
end

function methods:FadeInText(duration)
	for i = 1, #self.MessageObjectLog do
		if self.MessageObjectLog[i].FadeInFunction then
			self.MessageObjectLog[i].FadeInFunction(duration, CurveUtil)
		end
	end
end

function methods:Update(dtScale)
	for i = 1, #self.MessageObjectLog do
		if self.MessageObjectLog[i].UpdateAnimFunction then
			self.MessageObjectLog[i].UpdateAnimFunction(dtScale, CurveUtil)
		end
	end
end


Prompt:
-- This is for the buttons effects.
-- Edit if you know what you are doing.

Response:
local button = script.Parent
local leftarrow = script.Parent.LeftArrow
local rightarrow = script.Parent.RightArrow
local TweenService = game:GetService("TweenService")
local TweenSpeed = 0.1
local Info = TweenInfo.new(TweenSpeed, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0)


Prompt:
--[[
    Teleports all players to within the specified part
]]

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

local PlayerManager = require(ServerStorage.Source.Managers.PlayerManager)

return function(spawnPart)
	for _, player in pairs(Players:GetPlayers()) do
		if player.Character and player.Character.PrimaryPart then
			local primaryPart = player.Character.PrimaryPart
			if primaryPart:CanSetNetworkOwnership() then
				primaryPart:SetNetworkOwner(nil)
			end

			local cFrame =
				spawnPart.CFrame *
				CFrame.new(
					math.random(-spawnPart.Size.X * 0.5 * 100, spawnPart.Size.X * 0.5 * 100) / 100,
					3,
					math.random(-spawnPart.Size.Z * 0.5 * 100, spawnPart.Size.Z * 0.5 * 100) / 100
				)

			primaryPart.CFrame = cFrame

			if primaryPart:CanSetNetworkOwnership() then
				primaryPart:SetNetworkOwner(player)
			end
		else
			local serverPlayerComponent = PlayerManager.getFromPlayer(player)

			if serverPlayerComponent and serverPlayerComponent.status.currentState == "game" then
				serverPlayerComponent.stateMachine:get():startSpectating()
			end
		end
	end
end


Prompt: --Makes sure the part is scaled properly----------

Response:
local function Confirm(Grid, Plot)
	if X % Grid ~= 0 then
		X = math.clamp(X - 1, 1, 78)

		Confirm(Grid, Plot)
	end

	if Z % Grid ~= 0 then
		Z = math.clamp(Z - 1, 1, 78)

		Confirm(Grid, Plot)
	end
end


Prompt: --== OK DEVON MAKE THIS ==--

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

local Player = Players.LocalPlayer
local Character = script.Parent

local Humanoid = Character:FindFirstChildOfClass("Humanoid")

local camera = workspace.Camera

repeat wait() until Humanoid

local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Torso = Character:WaitForChild("Torso")

local RootJoint = HumanoidRootPart:WaitForChild("RootJoint")

local function Lerp(a, b, c)
	return a + (b - a) * c
end

local Force = nil
local Direction = nil
local Value1 = 0
local Value2 = 0

local RootJointC0 = RootJoint.C0

RunService.RenderStepped:Connect(function()
	Force = HumanoidRootPart.Velocity * Vector3.new(0.2, 0, 0.2)

	if Force.Magnitude > 2 then
		Direction = Force.Unit
		Value1 = HumanoidRootPart.CFrame.RightVector:Dot(Direction)
		Value2 = HumanoidRootPart.CFrame.LookVector:Dot(Direction)
	else
		Value1 = 0
		Value2 = 0
	end

	RootJoint.C0 = RootJoint.C0:Lerp(RootJointC0 * CFrame.Angles(math.rad(Value2 * 8), math.rad(-Value1 * 7), 0), 0.2)
end)


Response:
wait(1)
	powerlmp.Value = true

function Alert()
	script.Parent.Assembly.Sound.Click:Play()
script.AttackScript.Disabled = true
script.Parent.Parent.On.Value = true
end

function Test()
script.Parent.Assembly.Sound.Click:Play()
script.AttackScript.Disabled = true
script.Parent.Parent.On.Value = true
end

function Fire()
script.Parent.Assembly.Sound.Click:Play()
script.AttackScript.Disabled = true
script.Parent.Parent.On.Value = true
script.Parent.Parent.Parent.FederalSignalRC6.Modulate.Value = true
end

function Attack()
script.AttackScript.Disabled = false
end

		function Cancel()
			script.Parent.Assembly.Sound.Click:Play()
		script.AttackScript.Disabled = true
	script.Parent.Values.Mode.Value = 4
	signallmp.Value = false
	script.Parent.Parent.On.Value = false
	script.Parent.Parent.Parent.FederalSignalRC6.Modulate.Value = false
		script.Parent.Values.TimerOn.Value = false
end

function Timer()
script.Timer.Disabled = false
signallmp.Value = true
end

		script.Parent.Values.TimerOn.Changed:connect(function()
	if script.Parent.Values.TimerOn.Value == true then
if script.Parent.Values.Mode.Value == 2 then
Alert()
Timer()
elseif script.Parent.Values.Mode.Value == 3 then
Attack()
Timer()
elseif script.Parent.Values.Mode.Value == 5 then
Fire()
Timer()
elseif script.Parent.Values.Mode.Value == 1 then
Test()
elseif script.Parent.Values.Mode.Value == 4 then
script.AttackScript.Disabled = true
Cancel()
				end
		end
end)

script.Parent.Values.Mode.Changed:connect(function()
if script.Parent.Values.Mode.Value == 4 then
Cancel()
end
end)


Prompt:
--	====================
--	BASIC
--	A basic settings for the gun
--	====================

Response:
		Auto = false;
		MuzzleOffset = Vector3.new(0, 0.625, 1.25);
		BaseDamage = 25;
		FireRate = 0.05; --In second
		ReloadTime = 2.7; --In second
		AmmoPerClip = 5; --Put "math.huge" to make this gun has infinite ammo and never reload
		Spread = 1.25; --In degree
		HeadshotEnabled = true; --Enable the gun to do extra damage on headshot
		HeadshotDamageMultiplier = 3;
		MouseIconID = "316279304";
		HitSoundIDs = {186809061,186809249,186809250,186809252};
		IdleAnimationID = 94331086; --Set to "nil" if you don't want to animate
		IdleAnimationSpeed = 1;
		FireAnimationID = 94332152; --Set to "nil" if you don't want to animate
		FireAnimationSpeed = 6;
		ReloadAnimationID = nil; --Set to "nil" if you don't want to animate
		ReloadAnimationSpeed = 1;


Prompt: --RAIN PHYSICS / GENERATION

Response:
local RainFallSpeed = 150 --Studs the rain falls per second
local RainGroupsPerSecond = 400 --Amount of rain drops per second
local RainRadius = 200 --Radius from the camera in studs where rain drops will spawn
local StartY = 100 --Start height of the rain
local DefaultEndY = -10 --Default end height of the rain. Can be overriden for certain zones
local WindSpeedX = 0 --Wind speed in studs on X axis
local WindSpeedZ = 0 --Wind speed in studs on Z axis


Prompt: -- Testing AC FE support

Response:
local event = script.Parent
local car=script.Parent.Parent
local LichtNum = 0

event.OnServerEvent:connect(function(player,data)
	if data['ToggleLight'] then
		if car.Body.Light.on.Value==true then
			car.Body.Light.on.Value=false
		else
			car.Body.Light.on.Value=true
		end
	elseif data['EnableBrakes'] then
		car.Body.Lights.Brake.Value=true
	elseif data['DisableBrakes'] then
		car.Body.Lights.Brake.Value=false
	elseif data['ToggleLeftBlink'] then
		if car.Body.Lights.Left.Value==true then
			car.Body.Lights.Left.Value=false
		else
			car.Body.Lights.Left.Value=true
			car.Body.Lights.Right.Value=false
		end
	elseif data['ToggleRightBlink'] then
		if car.Body.Lights.Right.Value==true then
			car.Body.Lights.Right.Value=false
		else
			car.Body.Lights.Right.Value=true
			car.Body.Lights.Left.Value=false
		end
	elseif data['ReverseOn'] then
		car.Body.Lights.Reverse.Value=true
	elseif data['ReverseOff'] then
		car.Body.Lights.Reverse.Value=false
	elseif data['ToggleStandlicht'] then
		if LichtNum == 0 then
			LichtNum = 2
			car.Body.Lights.Headlights.Value = true
		elseif LichtNum == 1 then
			LichtNum = 2
			car.Body.Lights.Headlights.Value = true
		elseif LichtNum == 2 then
			LichtNum = 3
			car.Body.Lights.HiBeams.Value = true
		elseif LichtNum == 3 then
			LichtNum = 1
			car.Body.Lights.Headlights.Value = false
			car.Body.Lights.HiBeams.Value = false
		end
	elseif data["ToggleHazards"] then
		if car.Body.Lights.Hazards == false then
			car.Body.Lights.Right.Value=false
			car.Body.Lights.Left.Value=false
		elseif car.Body.Lights.Hazards == true then
			car.Body.Lights.Right.Value=true
			car.Body.Lights.Left.Value=true
		end
	end
end)


Prompt:
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------

Response:
	,VRecoil = {13,17}				--- Vertical Recoil
	,HRecoil = {6,8}				--- Horizontal Recoil
	,AimRecover = .75				---- Between 0 & 1

	,RecoilPunch = .15
	,VPunchBase = 2.75				--- Vertical Punch
	,HPunchBase = 1.35				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless

	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .5
	,MaxRecoilPower = 3.5
	,RecoilPowerStepAmount = .25

	,MinSpread = 1.25				--- Min bullet spread value | Studs
	,MaxSpread = 40					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0.75
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1.5					--- Max sway value based on player stamina | Studs


Prompt: -- A state object whose value can be set at any time by the user.

Response:
export type Value<T> = StateObject<T> & {
	-- kind: "State" (add this when Luau supports singleton types)
 	set: (Value<T>, newValue: any, force: boolean?) -> ()
}


Prompt: --------------------) Settings

Response:
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 5 -- cooldown for use of the tool again

ZoneModelName = "Negative zone" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage


Prompt: --- Mouse lock (prevents from being unable to zoom in first person because scrollframes

Response:
GUI.ToggleMouseLock = function(newState)
	newState = (newState ~= nil and newState or false)
	--
	if not lockMouse then
		local lockMouseScreen = Instance.new("ScreenGui")
		lockMouseScreen.Name = "LockMouse"
		lockMouseScreen.Parent = playerGui
		--
		lockMouse = Instance.new("TextButton")
		lockMouse.Visible = false
		lockMouse.BackgroundTransparency = 1
		lockMouse.Text = ""
		lockMouse.BorderSizePixel = 0
		lockMouse.Size = UDim2.new(0, 1, 0, 1)
		lockMouse.Parent = lockMouseScreen
	end
	--
	lockMouse.Modal = newState
	lockMouse.Visible = newState
end

GUI.ToggleCursor = function(newState)
	newState = (newState ~= nil and newState or false)
	--
	_L.Services.UserInputService.MouseIconEnabled = newState
end


Prompt:
--dont change any thing beside the  these numbers--
--to change explosion force go to CannonBall script--
----------------------------------------------------------------------------------------------------------------------------------------------------

Response:
	local missile = Instance.new("Part")

	local barrel

	if gunOne == true then
		barrel = gunBarrelOne
		gunOne = true

	end

	local spawnPos = barrel.CFrame * Vector3.new(5, 0, 0)

	local dx = math.random(50-cannonAcc,50+cannonAcc)
	local dy = math.random(targetRange-5,targetRange+5)
	local dz = math.random(0-cannonAcc,0+cannonAcc)
	local mag = math.random(power,power)

	local v = barrel.CFrame:vectorToWorldSpace(Vector3.new(mag + dx,dy,dz))

	local missile = cannonBall:clone()

	missile.Position = spawnPos
	missile.Velocity = v

	local new_script = script.Parent.CannonBall:clone()
	new_script.Disabled = false
	new_script.Parent = missile

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = missile

	missile.Parent = game.Workspace

		local effect=script.Parent.Parent.Effect
		local fire = effect.Fire
		local smoke1 = effect.Smoke
		local smoke2 = effect.Smoke1

		fire.Enabled = true
		smoke1.Enabled = true
		smoke2.Enabled = true
		wait(0.3)
		fire.Enabled = false
		wait(0.5)
		smoke1.Enabled =false
		smoke2.Enabled = false

end

function onClicked()
local reloadTime = 10-- +1
	if debounce == false then
		debounce = true
		switch.BrickColor = BrickColor.new(21)
		fire(player)
		wait(reloadTime)

		debounce = false
		switch.BrickColor = BrickColor.new(37)
	end
end

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


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

Response:
local v1 = script:FindFirstAncestor("MainUI");
local l__Bricks__2 = game:GetService("ReplicatedStorage"):WaitForChild("Bricks");
local l__TweenService__1 = game:GetService("TweenService");
return function(p1)
	local l__FigureCamPos__3 = workspace:FindFirstChild("FigureCamPos", true);
	p1.stopcam = true;
	p1.freemouse = true;
	p1.hideplayers = 2;
	p1.update();
	local l__WorldCFrame__4 = l__FigureCamPos__3.CamPos1.WorldCFrame;
	local l__WorldCFrame__5 = l__FigureCamPos__3.CamPos2.WorldCFrame;
	local l__CFrame__6 = p1.cam.CFrame;
	local v7 = tick() + 3;
	local l__FieldOfView__8 = p1.cam.FieldOfView;
	l__TweenService__1:Create(p1.cam, TweenInfo.new(3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
		FieldOfView = 60
	}):Play();
	for v9 = 1, 100000 do
		task.wait();
		if not (tick() <= v7) then
			break;
		end;
		p1.cam.CFrame = l__CFrame__6:Lerp(l__WorldCFrame__4, (l__TweenService__1:GetValue((3 - math.abs(tick() - v7)) / 3, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut))) * p1.csgo;
	end;
	local v10 = tick() + 5.5;
	l__TweenService__1:Create(p1.cam, TweenInfo.new(7.8, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
		FieldOfView = 70
	}):Play();
	for v11 = 1, 100000 do
		task.wait();
		if not (tick() <= v10) then
			break;
		end;
		p1.cam.CFrame = l__WorldCFrame__4:Lerp(l__WorldCFrame__5, (l__TweenService__1:GetValue((5.5 - math.abs(tick() - v10)) / 5.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut))) * p1.csgo;
	end;
	local l__CFrame__12 = p1.cam.CFrame;
	local v13 = tick() + 0.5;
	local l__FieldOfView__14 = p1.cam.FieldOfView;
	for v15 = 1, 100000 do
		task.wait();
		local v16 = l__TweenService__1:GetValue((0.5 - math.abs(tick() - v13)) / 0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut);
		if not (tick() <= v13) then
			break;
		end;
		p1.cam.CFrame = l__CFrame__12:Lerp(p1.basecamcf, v16) * p1.csgo;
		p1.cam.FieldOfView = l__FieldOfView__14 + (p1.fovspring - l__FieldOfView__14) * v16;
	end;
	p1.stopcam = false;
	p1.freemouse = false;
	p1.hideplayers = 0;
	p1.update();
end;


Prompt: --lonely function

Response:
local function getParts(parent)
	local parts = {}
	local descendants = parent:GetDescendants()

	for i = 1, #descendants do
		local part = descendants[i]

		if part:IsA("BasePart") then
			parts[#parts + 1] = part
		end
	end

	return parts
end


Prompt: -- Initialize texture tool

Response:
local TextureTool = require(CoreTools:WaitForChild 'Texture')
Core.AssignHotkey('G', Core.Support.Call(Core.EquipTool, TextureTool));
Core.AddToolButton(Core.Assets.TextureIcon, 'G', TextureTool)


Prompt: -- originalEndWaypoint is optional, causes the waypoint to tween from that position.

Response:
function ClickToMoveDisplay.CreatePathDisplay(wayPoints, originalEndWaypoint)
	createPathCount = createPathCount + 1
	local trailDots = createTrailDots(wayPoints, originalEndWaypoint)

	local function removePathBeforePoint(wayPointNumber)
		-- kill all trailDots before and at wayPointNumber
		for i = #trailDots, 1, -1 do
			local trailDot = trailDots[i]
			if trailDot.ClosestWayPoint <= wayPointNumber then
				trailDot:Destroy()
				trailDots[i] = nil
			else
				break
			end
		end
	end

	local reiszeTrailDotsUpdateName = "ClickToMoveResizeTrail" ..createPathCount
	local function resizeTrailDots()
		if #trailDots == 0 then
			RunService:UnbindFromRenderStep(reiszeTrailDotsUpdateName)
			return
		end
		local cameraPos = Workspace.CurrentCamera.CFrame.p
		for i = 1, #trailDots do
			local trailDotImage: ImageHandleAdornment = trailDots[i].DisplayModel:FindFirstChild("TrailDotImage")
			if trailDotImage then
				local distanceToCamera = (trailDots[i].DisplayModel.Position - cameraPos).magnitude
				trailDotImage.Size = getTrailDotScale(distanceToCamera, TrailDotSize)
			end
		end
	end
	RunService:BindToRenderStep(reiszeTrailDotsUpdateName, Enum.RenderPriority.Camera.Value - 1, resizeTrailDots)

	local function removePath()
		removePathBeforePoint(#wayPoints)
	end

	return removePath, removePathBeforePoint
end

local lastFailureWaypoint = nil
function ClickToMoveDisplay.DisplayFailureWaypoint(position)
	if lastFailureWaypoint then
		lastFailureWaypoint:Hide()
	end
	local failureWaypoint = FailureWaypoint.new(position)
	lastFailureWaypoint = failureWaypoint
	coroutine.wrap(function()
		failureWaypoint:RunFailureTween()
		failureWaypoint:Destroy()
		failureWaypoint = nil
	end)()
end

function ClickToMoveDisplay.CreateEndWaypoint(position)
	return EndWaypoint.new(position)
end

function ClickToMoveDisplay.PlayFailureAnimation()
	local myHumanoid = findPlayerHumanoid()
	if myHumanoid then
		local animationTrack = getFailureAnimationTrack(myHumanoid)
		animationTrack:Play()
	end
end

function ClickToMoveDisplay.CancelFailureAnimation()
	if lastFailureAnimationTrack ~= nil and lastFailureAnimationTrack.IsPlaying then
		lastFailureAnimationTrack:Stop()
	end
end

function ClickToMoveDisplay.SetWaypointTexture(texture)
	TrailDotIcon = texture
	TrailDotTemplate, EndWaypointTemplate, FailureWaypointTemplate = CreateWaypointTemplates()
end

function ClickToMoveDisplay.GetWaypointTexture()
	return TrailDotIcon
end

function ClickToMoveDisplay.SetWaypointRadius(radius)
	TrailDotSize = Vector2.new(radius, radius)
	TrailDotTemplate, EndWaypointTemplate, FailureWaypointTemplate = CreateWaypointTemplates()
end

function ClickToMoveDisplay.GetWaypointRadius()
	return TrailDotSize.X
end

function ClickToMoveDisplay.SetEndWaypointTexture(texture)
	EndWaypointIcon = texture
	TrailDotTemplate, EndWaypointTemplate, FailureWaypointTemplate = CreateWaypointTemplates()
end

function ClickToMoveDisplay.GetEndWaypointTexture()
	return EndWaypointIcon
end

function ClickToMoveDisplay.SetWaypointsAlwaysOnTop(alwaysOnTop)
	WaypointsAlwaysOnTop = alwaysOnTop
	TrailDotTemplate, EndWaypointTemplate, FailureWaypointTemplate = CreateWaypointTemplates()
end

function ClickToMoveDisplay.GetWaypointsAlwaysOnTop()
	return WaypointsAlwaysOnTop
end

return ClickToMoveDisplay


Prompt: -- ~60 c/s

Response:
game["Run Service"].Stepped:connect(function()

	--Steering
	Steering()

	--RPM
	RPM()

	--Update External Values
	_IsOn = script.Parent.IsOn.Value
	_InControls = script.Parent.ControlsOpen.Value
	script.Parent.Values.Gear.Value = _CGear
	script.Parent.Values.RPM.Value = _RPM
	script.Parent.Values.Horsepower.Value = _HP
	script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
	script.Parent.Values.TransmissionMode.Value = _TMode
	script.Parent.Values.Throttle.Value = _GThrot
	script.Parent.Values.Brake.Value = _GBrake
	script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
	script.Parent.Values.SteerT.Value = _GSteerT
	script.Parent.Values.PBrake.Value = _PBrake
	script.Parent.Values.TCS.Value = _TCS
	script.Parent.Values.TCSActive.Value = _TCSActive
	script.Parent.Values.ABS.Value = _ABS
	script.Parent.Values.ABSActive.Value = _ABSActive
	script.Parent.Values.MouseSteerOn.Value = _MSteer
	script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity
end)


Prompt: -- The list of events in chronological order.

Response:
do -- Sector 1 Events
	local shutterA = Lib.Map.SectorA.ShutterPart1
	local shutterB = Lib.Map.SectorA.ShutterPart2
	local wall1 = Lib.Map.SectorA.Wall5A
	local wall2 = Lib.Map.SectorA.Wall5B
	local weakPlatformA = Lib.Map.SectorA.WeakPlatformA
	local weakPlatformB = Lib.Map.SectorA.WeakPlatformB
	local weakPlatformC = Lib.Map.SectorA.WeakPlatformC
	local weakPlatformD = Lib.Map.SectorA.WeakPlatformD
	local lightBase1 = Lib.Map.SectorA.LightBase1
	local light1 = Lib.Map.SectorA.Light1

	local function drainWater(distance, duration)
		water1.DrainSound:Play()
		Lib.Script.moveWater(water1, Vector3.new(0, -distance, 0), duration, true)
	end

	Lib.btnFuncs[1] = function() -- When the upstairs button is pressed, drain the acid to the sewer.
		lightBase1.Anchored = false
		light1.BrickColor = BrickColor.new("Daisy orange")
		light1.Material = Enum.Material.Neon
		light1.PointLight.Enabled = true

		weakPlatformA.Anchored = false
		game.Debris:AddItem(weakPlatformA, 5)

		drainWater(19, 3)

		local drainDoor = shutterA
		Lib.Script.moveWater(drainDoor, Vector3.new(0, 2, 0), 1, true)
		drainDoor.MotorSound:Play()
		delay(1, function()
			drainDoor.MotorSound:Stop()
		end)
	end
	Lib.btnFuncs[2] = function() -- When the sewer drain button is pressed, open it fully.
		local drainDoor = shutterA
		Lib.Script.moveWater(drainDoor, Vector3.new(0, 6, 0), 3, true)
		drainDoor.MotorSound:Play()
		delay(3, function()
			drainDoor.MotorSound:Stop()
		end)
	end
	Lib.btnFuncs[3] = function()
		Lib.Script.setWaterState(water1, "lava")

		wait(18)

		-- Drop the sticky walls!
		wall1.Anchored = false
		wall2.Anchored = false
		wall2.BreakSound:Play()
	end
	autoEvents[#autoEvents + 1] = function() -- After a while, flood the sewer again!
		Lib.Script.moveWater(water1, Vector3.new(0, 3, 0), 31, true)
		wait(31)

		shutterA.Anchored = false
		shutterA.BreakSound:Play()
		Lib.Script.moveWater(water1, Vector3.new(0, 20 - 4, 0), 2, true)
		wait(2)
	end
	Lib.btnFuncs[4] = function()
		Lib.Script.setWaterState(water1, "acid")

		weakPlatformB.Anchored = false
		game.Debris:AddItem(weakPlatformD, 5)

		wait(0.5)

		weakPlatformC.Anchored = false
		game.Debris:AddItem(weakPlatformC, 5)

		wait(0.5)

		weakPlatformD.Anchored = false
		game.Debris:AddItem(weakPlatformB, 5)
	end
	Lib.btnFuncs[5] = function() -- When the spire drain button is pressed, drain the place and open the door.
		drainWater(59, 2.5)

		Lib.Script.setWaterState(water1, "acid")
		Lib.Script.moveWater(water2, Vector3.new(0, 3, 0), 2.5, true)

		local drainDoor = shutterB
		Lib.Script.moveWater(drainDoor, Vector3.new(0, 8, 0), 6, true)
		drainDoor.MotorSound:Play()
		delay(16, function()
			drainDoor.MotorSound:Stop()
		end)
	end
	autoEvents[#autoEvents + 1] = function() -- Flood the first sector entirely to kill anybody still in there.
		Lib.Script.moveWater(water1, Vector3.new(0, 2, 0), 10.5, true)
		Lib.Script.moveWater(water2, Vector3.new(0, 2, 0), 10.5, true)
		wait(10.5)

		Lib.Script.moveWater(water1, Vector3.new(0, 100, 0), 4, true)
		Lib.Script.moveWater(water2, Vector3.new(0, -5, 0), 1, true)
		shutterB.Anchored = false
		shutterB.BreakSound:Play()
		shutterB.MotorSound:Stop()
	end
end
do -- Sector 2 Events
	local lightBase1 = Lib.Map.SectorB.LightBase1
	local light1 = Lib.Map.SectorB.Light1
	local lightBase2 = Lib.Map.SectorB.LightBase2
	local light2 = Lib.Map.SectorB.Light2
	local lightCables = Lib.Map.SectorB.LightCables
	local loosePlatform1 = Lib.Map.SectorB.LoosePlatform1
	local loosePlatform2 = Lib.Map.SectorB.LoosePlatform2
	local doorSeal = Lib.Map.SectorB.DoorSeal
	local climbPlatforms = Lib.Map.SectorB.ClimbPlatforms
	local weakWall1 = Lib.Map.SectorB.WeakWall1
	local weakWall2 = Lib.Map.SectorB.WeakWall2

	autoEvents[#autoEvents + 1] = function()
		Lib.Script.moveWater(water2, Vector3.new(0, 2, 0), 27.5, true)
		wait(27.5)
	end
	Lib.btnFuncs[6] = function()
		lightBase1.BreakSound:Play()
		lightBase1.Anchored = false
		lightBase2.Anchored = false
		for i, light in ipairs({light1, light2}) do
			light.BrickColor = BrickColor.new("Daisy orange")
			light.Material = Enum.Material.Neon
			light.PointLight.Enabled = true
		end
		for i, cable in ipairs(lightCables:GetChildren()) do
			cable.Enabled = true
		end
	end
	Lib.btnFuncs[8] = function()
		Lib.Script.moveWater(weakWall1, Vector3.new(0, -17, 0), 1, true)
		weakWall1.ExplosionSound:Play()

		wait(3)
		loosePlatform1.Anchored = false
		loosePlatform1.BreakSound:Play()
	end
	autoEvents[#autoEvents + 1] = function()
		Lib.Script.setWaterState(water2, "lava")
		Lib.Script.moveWater(water2, Vector3.new(0, 80, 0), 17, true)
		wait(17)
	end
	Lib.btnFuncs[9] = function()
		local platform = climbPlatforms.MotorizedPlatform
		Lib.Script.moveWater(platform, Vector3.new(0, -6, 0), 3, true)
		platform.MotorSound:Play()
		delay(3, function()
			platform.MotorSound:Stop()
		end)

		wait(3.5)
		loosePlatform2.Anchored = false
		loosePlatform2.BreakSound:Play()
	end
	Lib.btnFuncs[10] = function()
		Lib.Script.moveWater(weakWall2, Vector3.new(0, -17, 0), 1, true)
		weakWall2.ExplosionSound:Play()
	end
	autoEvents[#autoEvents + 1] = function()
		-- Break the platforms.
		for i, item in ipairs(climbPlatforms:GetDescendants()) do
			if item:IsA("BasePart") then
				item.Anchored = false
			end
		end
		climbPlatforms:BreakJoints()
		climbPlatforms.BreakSoundPart.BreakSound:Play()

		Lib.Script.moveWater(water2, Vector3.new(0, 2, 0), 6, true)
		wait(6)

		-- Flood the remaining area.
		doorSeal.CFrame = doorSeal.CFrame * CFrame.new(0, 7, 0)
		Lib.Script.moveWater(doorSeal, Vector3.new(0, 9, 0), 1, true)
		Lib.Script.moveWater(water2, Vector3.new(0, 16 - 2, 0), 2, true)
		wait(2)
	end
end


Prompt: --// All global vars will be wiped/replaced except script

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

	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer
	local gui = service.New("ScreenGui")
	local toggle = service.New("ImageButton", gui)
	local gTable = client.UI.Register(gui)

	local clickSound = service.New("Sound")
	clickSound.Parent = toggle
	clickSound.Volume = 0.25
	clickSound.SoundId = "rbxassetid://156286438"

	if client.UI.Get("HelpButton", gui, true) then
		gui:Destroy()
		gTable:Destroy()
		return nil
	end

	gTable.Name = "HelpButton"
	gTable.CanKeepAlive = false

	toggle.Name = "Toggle"
	toggle.BackgroundTransparency = 1
	toggle.Position = UDim2.new(1, -45, 1, -45)
	toggle.Size = UDim2.new(0, 40, 0, 40)
	toggle.Image = client.HelpButtonImage
	toggle.ImageTransparency = 0.35
	toggle.Modal = client.Variables.ModalMode
	toggle.ClipsDescendants = true

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

	toggle.MouseButton1Down:Connect(function()
		task.spawn(function()
			local effect = Instance.new("ImageLabel", toggle)
			effect.AnchorPoint = Vector2.new(0.5, 0.5)
			effect.BorderSizePixel = 0
			effect.ZIndex = toggle.ZIndex + 1
			effect.BackgroundTransparency = 1
			effect.ImageTransparency = 0.8
			effect.Image = "rbxasset://textures/whiteCircle.png"
			effect.Position = UDim2.new(0.5, 0, 0.5, 0)
			effect:TweenSize(UDim2.new(0, toggle.AbsoluteSize.X * 2.5, 0, toggle.AbsoluteSize.X * 2.5), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.2)
			task.wait(0.2)
			effect:Destroy()
		end)
		local found = client.UI.Get("UserPanel",nil,true)
		if found then
			found.Object:Destroy()
		else
			clickSound:Play()
			client.UI.Make("UserPanel",{})
		end
	end)

	gTable:Ready()
end


Prompt: -- delay to stop people from getting teleported back and forth forever

Response:
DelayTime = 1.0

local db = false
TweenService = game:GetService("TweenService")
info = TweenInfo.new(FadeTime, Enum.EasingStyle.Linear)


Prompt: --Add a new title to a player's inventory

Response:
function functions.AddTitleToInventory(plr: Player, titleName: string)

	local plrStats = plr.leaderstats
	local plrTitles = plrStats.Titles

	if titles:FindFirstChild(titleName) and not plrTitles:FindFirstChild(titleName) then

		local titleValue = Instance.new("StringValue")
		titleValue.Name = titleName
		titleValue.Parent = plrTitles
	end
end


Prompt: --AdmiralLennox

Response:
Chest = script.Parent
Lid = Chest.Lid
Lid.PrimaryPart = Lid.Hinge

increment = 96
debounce = false

function rotate(model, amount)
		for i=1, math.abs(amount/2) do
			model:SetPrimaryPartCFrame(model.Hinge.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/amount,0))
			wait()
		end
end

function openChest()
	print("Clicked on handle.")

	if not debounce then
		debounce = true
		if Chest.Open.Value then
			rotate(Lid, increment)
		else
			rotate(Lid, -increment)
		end
		Chest.Open.Value = not Chest.Open.Value
		debounce = false
	else
	end
end

Lid.ClickDetector.MouseClick:Connect(openChest)


Prompt:
--local connection
--local function func()
--	script.Parent:PivotTo(CFrame.new(script.Parent.Vec3Pos.Value))
--	connection:Disconnect()
--	wait(.05)
--	connection = script.Parent.Vec3Pos.Changed:Connect(func)
--end
--connection = script.Parent.Vec3Pos.Changed:Connect(func)


Prompt: -- Damping module/instances

Response:
local Damping = require(script:WaitForChild("Damping"))
local dampCam = Damping.new()
local dampRot = Damping.new()


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


Prompt:
-----------------------------------------ONLY EDIT THESE VALUES!!!!!-----------------------------------------
-----!Instructions!-----
--Make sure you have a part in the gun named Barrel, it is where the raycast will shoot from.--
--Just place this script into any gun and edit the values below.--
--Editting anything else will risk breaking it.--
------------------------

Response:
Damage = 18
SPS = 19 -- Shots Per Second, gives a limit of how fast the gun shoots.
Recoil = 5 -- [1-10] [1 = Minigun, 10 = Sniper]
WallShoot = false -- Shoots through walls.
GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
BulletColor = "Cool yellow" -- Any Brickcolor will work.
Flash = true


Prompt: --Put this script in ServerScriptService

Response:
game.Players.PlayerAdded:Connect(function(plr)
	local Tracker = Instance.new("IntValue")
	Tracker.Name = "Tracker"
	Tracker.Parent = plr
    local Clone = game.ServerStorage.SkipGui:Clone()
    Clone.Parent = plr.PlayerGui
end)

local MP = game:GetService("MarketplaceService")
MP.ProcessReceipt = function(receipt)
	local plr = game.Players:GetPlayerByUserId(receipt.PlayerId)
	if game.ServerStorage.Locations:FindFirstChild(tostring(plr.Tracker.Value+1))~=nil then
		local To = workspace:FindFirstChild(game.ServerStorage.Locations:FindFirstChild(tostring(plr.Tracker.Value+1)).Value)
		plr.Character:MoveTo(To.Position)
		local New = Instance.new("StringValue")
		New.Name = plr.Name
		New.Parent = To.Script
		plr.Tracker.Value = plr.Tracker.Value + 1
		return Enum.ProductPurchaseDecision.PurchaseGranted
	else
		warn("PURCHASE DENIED")
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end
end


Prompt:
--[[
	Temporarily mounts a Roact element in the DataModel so that it can be tested
	with Rhodium.

	Usage:

		local wasClicked = false

		local element = Roact.createElement("TextButton", {
			[Roact.Event.Activated] = function()
				wasClicked = true
			end
		})

		withMountedElement(element, function(button: TextButton)
			button = Rhodium.Element.new(button)
			button:click()
			expect(wasClicked).toBe(true)
		end)
]]

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

local ExperienceComponents = script:FindFirstAncestor("ExperienceComponents")

local Roact = require(ExperienceComponents.Parent.Roact)

local function withMountedElement<T>(element: any, test: (T) -> ())
	local screenGui = Instance.new("ScreenGui")
	screenGui.Name = "RhodiumScreenGui"
	screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
	screenGui.Parent = CoreGui

	local handle
	local success, result = pcall(function()
		handle = Roact.mount(element, screenGui)
	end)

	if not success then
		screenGui:Destroy()
		error(result)
	end

	success, result = pcall(function()
		test(screenGui:FindFirstChildWhichIsA("GuiObject"))
	end)

	Roact.unmount(handle)
	screenGui:Destroy()

	if not success then
		error(result)
	end
end

return withMountedElement


Prompt: -- If you want to know how to retexture a hat, read this:  http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388

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 = "Hat"   -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat.
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle"
		p.formFactor = 0
		p.Size = Vector3.new(-0,-0,-1)
		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.2, 0) -- Change these to change the positiones of your hat, as I said earlier.
		wait(5)		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)


Prompt: -- Connection class

Response:
local Connection = {}
Connection.__index = Connection

function Connection.new(signal, fn)
	return setmetatable({
		_connected = true,
		_signal = signal,
		_fn = fn,
		_next = false,
	}, Connection)
end

function Connection:Disconnect()
	if not self._connected then return end
	self._connected = false

	-- Unhook the node, but DON'T clear it. That way any fire calls that are
	-- currently sitting on this node will be able to iterate forwards off of
	-- it, but any subsequent fire calls will not hit it, and it will be GCed
	-- when no more fire calls are sitting on it.
	if self._signal._handlerListHead == self then
		self._signal._handlerListHead = self._next
	else
		local prev = self._signal._handlerListHead
		while prev and prev._next ~= self do
			prev = prev._next
		end
		if prev then
			prev._next = self._next
		end
	end
end

Connection.Destroy = Connection.Disconnect


Prompt: -------- OMG HAX

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

local damage = 5

local slash_damage = 4
local lunge_damage = 12

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

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)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			end
		end

	end
end

function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end

function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end

function lunge()
	damage = lunge_damage

	LungeSound:play()

	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Lunge"
	anim.Parent = Tool

	force = Instance.new("BodyVelocity")
	force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
	force.Parent = Tool.Parent.Torso
	wait(.1)
	swordOut()
	wait(.1)
	force.Parent = nil
	wait(.2)
	swordUp()

	damage = slash_damage
end

function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end

function swordAcross()
	-- parry
end

Tool.Enabled = true
local last_attack = 0
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return
	end

	t = r.Stepped:wait()

	if (t - last_attack < .2) then
		lunge()
	else
		attack()
	end

	last_attack = t

	--wait(.5)

	Tool.Enabled = true
end

function onEquipped()
	UnsheathSound:play()
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

connection = sword.Touched:connect(blow)


Prompt: --function of all111

Response:
click.MouseClick:connect(function(player)
	if ready == true then
		ready = false
		click.MaxActivationDistance = 0
		coverdown()
		menuappear()
		local newtool = tool:clone()
		local newhandle = handle:clone()
		newtool.Parent = sp.Temporary
		newhandle.Parent = sp.Temporary
		newhandle.CFrame = CFrame.new(Vector3.new(newhandle.Position.X, newhandle.Position.Y+1,newhandle.Position.Z))

		for _,one in pairs(maingui:GetChildren()) do
				if one:IsA("TextButton") then
					one.MouseButton1Down:connect(function()
						menudisappear()
						newtool.Name = one.Name
						for _,frame in pairs(maingui:GetChildren()) do
							if frame:IsA("Frame") and frame.Name == one.Name then --lol this whole part though
								for _,button in pairs(frame:GetChildren()) do
									if button:IsA("TextButton") then
										button.Visible = true
										button.MouseButton1Down:connect(function()
											newtool.ToolTip = button.Name
											newhandle.Parent = newtool
											newhandle.Anchored = false
											newtool.Cup.Disabled = false
											newtool.Parent = player.Backpack
											coverup()
											for _,v in pairs(button.Parent:GetChildren()) do
												if v:IsA("TextButton") then
													v.Visible = false
												end
											end
											click.MaxActivationDistance = 10
											wait(5)
											ready = true
											script.Fixer.Disabled = false
										end)
									end
								end
							end
						end
					end)
				end
		end
	end
end)


Prompt:
--edit the below function to execute code when this response is chosen OR this prompt is shown
--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)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 8
	plrData.Character.Injuries.BrokenArm.Value = false
end


Prompt: --// Connections

Response:
L_100_.OnClientEvent:connect(function(L_178_arg1, L_179_arg2, L_180_arg3, L_181_arg4, L_182_arg5, L_183_arg6, L_184_arg7)
	if L_178_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_179_arg2
		L_43_ = L_180_arg3
		L_44_ = L_181_arg4
		L_45_ = L_182_arg5
		L_46_ = L_183_arg6
		L_47_ = L_184_arg7
		L_48_ = L_58_.Bolt

		L_81_ = L_47_.C1
		L_82_ = 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_87_ = 0
		L_74_ = false
		L_75_ = false
		L_76_ = false
		L_60_ = false
		L_63_ = false
		L_62_ = false
		Shooting = false

		L_91_ = 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_2_.CameraMode = Enum.CameraMode.Classic
		L_99_.MouseIconEnabled = true
		L_5_.FieldOfView = 70
		L_15_ = false
		L_99_.MouseDeltaSensitivity = L_51_
		L_4_.Icon = "http://www.roblox.com/asset?id=0"
		L_15_ = false
	end
end)


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

Response:
local v1 = {};

	for v2, v3 in ipairs((game.ReplicatedStorage.Game.Eggs:GetChildren())) do
	if not v2 then
		break;
	end;
	local v5 = v3:FindFirstChildOfClass("ModuleScript");
	if v5 then
		v1[v3.Name] = require(v5);
	end;
end;
return v1;


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

Response:
client = nil;
service = nil;
return function(p1)
	local v1 = {
		Name = "Ping",
		Title = "Ping",
		Size = { 150, 70 },
		Position = UDim2.new(0, 10, 1, -80),
		AllowMultiple = false
	};
	local u1 = true;
	function v1.OnClose()
		u1 = false;
	end;
	local v2 = client.UI.Make("Window", v1);
	if v2 then
		local v3 = v2:Add("TextLabel", {
			Text = "...",
			BackgroundTransparency = 1,
			TextSize = 20,
			Size = UDim2.new(1, 0, 1, 0),
			Position = UDim2.new(0, 0, 0, 0)
		});
		local l__gTable__4 = v2.gTable;
		v2:Ready();
		while true do
			v3.Text = client.Remote.Ping() .. "ms";
			wait(2);
			if not u1 then
				break;
			end;
			if not l__gTable__4.Active then
				break;
			end;
		end;
	end;
end;


Response:
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
        if key == "a" then
            	a = true
        elseif key == "d" then
                d = true
        elseif key == "w" then
                w = true
                rwd.Throttle = 1
				rwd.Torque = tq
				lwd.Throttle = 1
				lwd.Torque = ftq
				rrwd.Throttle = 1
				rrwd.Torque = ftq
				rwd.MaxSpeed = 80
				lwd.MaxSpeed = 80
				rrwd.MaxSpeed = 80
                carSeat.Throttle = 1
                carSeat.Torque = 0
                elseif key == "s" then
                s = true
                carSeat.Throttle = 0
                carSeat.Torque = 0
				rwd.Throttle = -1
				rwd.Torque = brk
				lwd.Throttle = -1
				lwd.Torque = brk
				rrwd.Throttle = -1
				rrwd.Torque = brk
				rwd.MaxSpeed = 15
				lwd.MaxSpeed = 15
				rrwd.MaxSpeed = 15
                end
end)

mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)

mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then
        rwd.Throttle = 0
        rwd.Torque = 0
	    lwd.Throttle = 0
		lwd.Torque = 0
		rrwd.Throttle = 0
		rrwd.Torque = 0

       carSeat.Throttle = 0
carSeat.Torque = cst
        end
end)

limitButton.MouseButton1Click:connect(function()


Prompt: -- Load libraries

Response:
while not _G.GetLibraries do wait() end;
local Support, Cheer = _G.GetLibraries(
	'F3X/SupportLibrary@^1.0.0',
	'F3X/Cheer@^0.0.0'
);

local View = script.Parent;
local Component = Cheer.CreateComponent('BTHSVColorPicker', View);

local Connections = {};

function Component.Start(InitialColor, Callback, SelectionPreventionCallback, PreviewCallback)

	-- Show the UI
	View.Visible = true;

	-- Start the color
	InitialColor = InitialColor or Color3.new(1, 1, 1);
	Hue, Saturation, Brightness = Color3.toHSV(InitialColor);
	Hue, Saturation, Brightness = Cheer.Link(Hue), Cheer.Link(Saturation), Cheer.Link(Brightness);

	-- Connect direct inputs to color setting
	Cheer.Bind(View.HueOption.Input, { Cheer.Clamp(0, 360), Cheer.Divide(360) }, Hue);
	Cheer.Bind(View.SaturationOption.Input, { Cheer.Clamp(0, 100), Cheer.Divide(100) }, Saturation);
	Cheer.Bind(View.BrightnessOption.Input, { Cheer.Clamp(0, 100), Cheer.Divide(100) }, Brightness);

	-- Connect color to inputs
	Cheer.Bind(Hue, { Cheer.Multiply(360), Cheer.Round(0) }, View.HueOption.Input):Trigger();
	Cheer.Bind(Saturation, { Cheer.Multiply(100), Cheer.Round(0), tostring, Cheer.Append('%') }, View.SaturationOption.Input):Trigger();
	Cheer.Bind(Brightness, { Cheer.Multiply(100), Cheer.Round(0), tostring, Cheer.Append('%') }, View.BrightnessOption.Input):Trigger();

	-- Connect color to color display
	Cheer.Bind(Hue, UpdateDisplay):Trigger();
	Cheer.Bind(Saturation, UpdateDisplay):Trigger();
	Cheer.Bind(Brightness, UpdateDisplay):Trigger();

	-- Connect mouse to interactive picker
	Connections.TrackColor = Support.AddGuiInputListener(View.HueSaturation, 'Began', 'MouseButton1', true, Support.Call(StartTrackingMouse, 'HS'));
	Connections.TrackBrightness = Support.AddGuiInputListener(View.Brightness, 'Began', 'MouseButton1', true, Support.Call(StartTrackingMouse, 'B'));
	Connections.StopTrackingMouse = Support.AddUserInputListener('Ended', 'MouseButton1', true, StopTrackingMouse);

	-- Connect OK button to finish color picking
	Cheer.Bind(View.OkButton, function ()

		-- Clear any preview
		if PreviewCallback then
			PreviewCallback();
		end;

		-- Remove the UI
		View:Destroy();

		-- Return the selected color
		Callback(Color3.fromHSV(#Hue, #Saturation, #Brightness));

	end);

	-- Connect cancel button to clear preview and remove UI
	Cheer.Bind(View.CancelButton, function () if PreviewCallback then PreviewCallback() end; View:Destroy(); end);

	-- Store reference to callbacks
	Component.SelectionPreventionCallback = SelectionPreventionCallback;
	Component.PreviewCallback = PreviewCallback;

	-- Clear connections when the component is removed
	Cheer.Bind(Component.OnRemove, ClearConnections);

end;

function StartTrackingMouse(TrackingType)

	-- Only start tracking if not already tracking
	if Connections.MouseTracking then
		return;
	end;

	-- Watch mouse movement and adjust current color
	Connections.MouseTracking = Support.AddUserInputListener('Changed', 'MouseMovement', true, function (Input)

		-- Track for hue-saturation
		if TrackingType == 'HS' then
			Hue('Update', Support.Clamp((Input.Position.X - View.HueSaturation.AbsolutePosition.X) / View.HueSaturation.AbsoluteSize.X, 0, 1));
			Saturation('Update', 1 - Support.Clamp((Input.Position.Y - View.HueSaturation.AbsolutePosition.Y) / View.HueSaturation.AbsoluteSize.Y, 0, 1));

		-- Track for brightness
		elseif TrackingType == 'B' then
			Brightness('Update', 1 - Support.Clamp((Input.Position.Y - View.Brightness.AbsolutePosition.Y) / View.Brightness.AbsoluteSize.Y, 0, 1));
		end;

	end);

	-- Prevent selection if a callback to do so is provided
	if Component.SelectionPreventionCallback then
		Component.SelectionPreventionCallback();
	end;

end;

function StopTrackingMouse()
	-- Releases any tracking

	-- Ensure ongoing tracking
	if not Connections.MouseTracking then
		return;
	end;

	-- Disable any current tracking
	Connections.MouseTracking:Disconnect();
	Connections.MouseTracking = nil;

end;

function UpdateDisplay()
	-- Updates the display based on the current color

	-- Get current color
	local CurrentColor = Color3.fromHSV(#Hue, #Saturation, #Brightness);

	-- Update the color display
	View.ColorDisplay.BackgroundColor3 = CurrentColor;
	View.HueOption.Bar.BackgroundColor3 = CurrentColor;
	View.SaturationOption.Bar.BackgroundColor3 = CurrentColor;
	View.BrightnessOption.Bar.BackgroundColor3 = CurrentColor;

	-- Update the interactive color picker
	View.HueSaturation.Cursor.Position = UDim2.new(
		#Hue, View.HueSaturation.Cursor.Position.X.Offset,
		1 - #Saturation, View.HueSaturation.Cursor.Position.Y.Offset
	);

	-- Update the interactive brightness picker
	View.Brightness.ColorBG.BackgroundColor3 = CurrentColor;
	View.Brightness.Cursor.Position = UDim2.new(
		View.Brightness.Cursor.Position.X.Scale, View.Brightness.Cursor.Position.X.Offset,
		1 - #Brightness, View.Brightness.Cursor.Position.Y.Offset
	);

	-- Update the preview if enabled
	if Component.PreviewCallback then
		Component.PreviewCallback(CurrentColor);
	end;

end;

function ClearConnections()
	-- Clears out temporary connections

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

end;

return Component;


Prompt: --Change this to your desired broadcast prefix.

Response: _G.broadcastPrefix = "[Server] "