Prompt: --> FUNCTIONS

Response:
function Switch(V1, V2, V3, V4)
	if Mode.Value ~= V1 then
		Mode.Value = V1
		OnBtn.Transparency = V2
		OffBtn.Transparency = V3
		V4.Beep:Play()
	end
end

function Smoke(Enable)
	Module.Smoke1.ParticleEmitter.Enabled = Enable
	Module.Smoke2.ParticleEmitter.Enabled = Enable
end

OnBtn.ClickDetector.MouseClick:Connect(function()
	Switch(true, 0, .5, OnBtn)
	-- DO YOUR OWN ADDITIONAL CODE WHEN SWITCHED ON
end)

OffBtn.ClickDetector.MouseClick:Connect(function()
	Switch(false, .5, 0, OffBtn)
	Cylinder.Generator:Stop()
	-- DO YOUR OWN ADDITIONAL CODE WHEN SWITCHED OFF
end)

script.On:GetPropertyChangedSignal("Value"):Connect(function()
	if Mode.Value == true then
		Smoke(true)
		Cylinder.Generator:Play()
		while Mode.Value == true do
			OGPosition = Cylinder.Position
			Goal = {}
			Goal.Position = OGPosition + Vector3.new(0, .5, 0)
			TweenService:Create(Cylinder, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), Goal):Play()
			wait(.5)
			Goal.Position = OGPosition
			TweenService:Create(Cylinder, TweenInfo.new(.5, Enum.EasingStyle.Sine, Enum.EasingDirection.In), Goal):Play()
			wait(.5)
		end
		Smoke(false)
	end
end)


Prompt: --// Positioning

Response:
	RestPos = CFrame.new(0.41808939, 0, -0.0273852348, 0.704155862, -0.0188415907, 0.709795356, -0.314750254, 0.887783766, 0.335815758, -0.636472106, -0.459874928, 0.61920774);

	SprintPos = CFrame.new(0, 0, 0, 0.844756603, -0.251352191, 0.472449303, 0.103136979, 0.942750931, 0.317149073, -0.525118113, -0.219186768, 0.822318792);


Prompt: --- Sets a list of keyboard keys (Enum.KeyCode) that can be used to open the commands menu

Response:
function Cmdr:SetActivationKeys (keysArray)
	self.ActivationKeys = Util.MakeDictionary(keysArray)
end


Prompt:
-- connect events
-----------------------------------------------------------------------------------------------------------------------

Response:
function unequip()
	local items=script.Parent:children()
	for i=1, #items do
		if items[i].className=="Tool" then items[i]:remove() end
	end
end

function onChatted(msg, recipient)
	msg = string.lower(msg)

	if string.match(msg, string.lower(script.Parent.Name))~=nil or string.match(msg, "everyone") then
		if string.match(msg, "equip") then
			if game.Workspace:findFirstChild("Hub") then
				if string.match(msg, "rocket") then unequip()
					game.Workspace.Hub.Rocket:clone().Parent=script.Parent
				elseif string.match(msg, "slingshot") then unequip()
					game.Workspace.Hub.Slingshot:clone().Parent=script.Parent
				elseif string.match(msg, "sword") then unequip()
					game.Workspace.Hub.Sword:clone().Parent=script.Parent
				elseif string.match(msg, "pbg") then unequip()
					game.Workspace.Hub.PBG:clone().Parent=script.Parent
				elseif string.match(msg, "superball") then unequip()
					game.Workspace.Hub.Superball:clone().Parent=script.Parent
				elseif string.match(msg, "trowel") then unequip()
					game.Workspace.Hub.Trowel:clone().Parent=script.Parent
				elseif string.match(msg, "bomb") then unequip()
					game.Workspace.Hub.Bomb:clone().Parent=script.Parent
				end
			end
		end
		if string.match(msg, "unequip") then unequip() end
		if string.match(msg, "run") then onRunning(1) end
		if string.match(msg, "climb") then onClimbing() end
		if string.match(msg, "jump") then onJumping() end
		if string.match(msg, "zombie") then pose="Zombie" end
		if string.match(msg, "disco") then pose="Boogy" end
		if string.match(msg, "float") then pose="Float" end
		if string.match(msg, "punch") then pose="Punch" end
		if string.match(msg, "kick") then pose="Kick" end
		if string.match(msg, "fly") then pose="Fly" end
		if string.match(msg, "heal") then script.Parent.Humanoid.Health=script.Parent.Humanoid.MaxHealth end
		if string.match(msg, "defend") then defence() end
		if string.match(msg, "stop") then pose="Standing"; proxkill=false; following=false; stopmoving() end
		if string.match(msg, "go home") then following=false; gohome() end
		if string.match(msg, "follow") then
			if string.match(msg, "all") then
				followany()
			else
				local egg=game.Players:children()
				for i=1, #egg do
					if string.match(msg, string.lower(egg[i].Name)) then
						follow(egg[i].Name)
						return
					end
				end
			end
		end
		if string.match(msg, "kill") then
			if string.match(msg, "all") then
				attackany()
			else
				local egg=game.Players:children()
				for i=1, #egg do
					if string.match(msg, string.lower(egg[i].Name)) then
						attack(egg[i].Name)
						return
					end
				end
			end
		end

	end
end

if game.Players.NumPlayers>1 then
	x=game.Players:children()

	for i=1, #x do
		if script.Parent:findFirstChild("Commander")~=nil then
			if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
				local ch=script.Parent.Commander:children()
				for i=1, #ch do
					if string.lower(ch[i].Name)==string.lower(x[i].Name) then
						x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
					end
				end
			elseif string.lower(script.Parent.Commander.Value)==string.lower(x[i].Name) then
				x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
			end
		else
			x[i].Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
		end
	end
end

function onPlayerEntered(Player)
	while Player.Name==nil do
		wait(2)
	end
	if script.Parent:findFirstChild("Commander")~=nil then
		if script.Parent.Commander:children()~=nil or script.Parent.Commander:children()>0 then
			local ch=script.Parent.Commander:children()
			for i=1, #ch do
				if string.lower(ch[i].Name)==string.lower(Player.Name) then
					Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
				end
			end
		elseif string.lower(script.Parent.Commander.Value)==string.lower(Player.Name) then
			Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
		end
	else
		Player.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
	end
end

game.Players.ChildAdded:connect(onPlayerEntered)


Prompt: --[[Finalize Chassis]]

Response:
	--Misc Weld
	wait()
	for i,v in pairs(script:GetChildren()) do
		if v:IsA("ModuleScript") then
			require(v)
		end
	end

	--Weld Body
	wait()
	ModelWeld(car.Body,car.DriveSeat)

	--Unanchor
	wait()
	UnAnchor(car)


Prompt: --Get important instances

Response:
local rstore = game:GetService("ReplicatedStorage")
local networking = rstore.TeleporterNetworking


Prompt: --[[Drivetrain]]

Response:
	Tune.Config			= "AWD"		--"FWD" , "RWD" , "AWD"

	--Differential Settings
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 50		-- 1 - 100%
	Tune.RDiffLockThres	= 50		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]

	--Traction Control Settings
	Tune.TCSEnabled		= false		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)


Prompt:
--////////////////////////////////////////////////////////////////////////////////////////////
--///////////// Code to talk to topbar and maintain set/get core backwards compatibility stuff
--////////////////////////////////////////////////////////////////////////////////////////////

Response:
local Util = {}
do
	function Util.Signal()
		local sig = {}

		local mSignaler = Instance.new('BindableEvent')

		local mArgData = nil
		local mArgDataCount = nil

		function sig:fire(...)
			mArgData = {...}
			mArgDataCount = select('#', ...)
			mSignaler:Fire()
		end

		function sig:connect(f)
			if not f then error("connect(nil)", 2) end
			return mSignaler.Event:connect(function()
				f(unpack(mArgData, 1, mArgDataCount))
			end)
		end

		function sig:wait()
			mSignaler.Event:wait()
			assert(mArgData, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.")
			return unpack(mArgData, 1, mArgDataCount)
		end

		return sig
	end
end

function SetVisibility(val)
	ChatWindow:SetVisible(val)
	moduleApiTable.VisibilityStateChanged:fire(val)
	moduleApiTable.Visible = val

	if (moduleApiTable.IsCoreGuiEnabled) then
		if (val) then
			InstantFadeIn()
		else
			InstantFadeOut()
		end
	end
end

do
	moduleApiTable.TopbarEnabled = true
	moduleApiTable.MessageCount = 0
	moduleApiTable.Visible = true
	moduleApiTable.IsCoreGuiEnabled = true

	function moduleApiTable:ToggleVisibility()
		SetVisibility(not ChatWindow:GetVisible())
	end

	function moduleApiTable:SetVisible(visible)
		if (ChatWindow:GetVisible() ~= visible) then
			SetVisibility(visible)
		end
	end

	function moduleApiTable:FocusChatBar()
		ChatBar:CaptureFocus()
	end

	function moduleApiTable:EnterWhisperState(player)
		ChatBar:EnterWhisperState(player)
	end

	function moduleApiTable:GetVisibility()
		return ChatWindow:GetVisible()
	end

	function moduleApiTable:GetMessageCount()
		return self.MessageCount
	end

	function moduleApiTable:TopbarEnabledChanged(enabled)
		self.TopbarEnabled = enabled
		self.CoreGuiEnabled:fire(game:GetService("StarterGui"):GetCoreGuiEnabled(Enum.CoreGuiType.Chat))
	end

	function moduleApiTable:IsFocused(useWasFocused)
		return ChatBar:IsFocused()
	end

	moduleApiTable.ChatBarFocusChanged = Util.Signal()
	moduleApiTable.VisibilityStateChanged = Util.Signal()
	moduleApiTable.MessagesChanged = Util.Signal()

	moduleApiTable.MessagePosted = Util.Signal()
	moduleApiTable.CoreGuiEnabled = Util.Signal()

	moduleApiTable.ChatMakeSystemMessageEvent = Util.Signal()
	moduleApiTable.ChatWindowPositionEvent = Util.Signal()
	moduleApiTable.ChatWindowSizeEvent = Util.Signal()
	moduleApiTable.ChatBarDisabledEvent = Util.Signal()

	function moduleApiTable:fChatWindowPosition()
		return ChatWindow.GuiObject.Position
	end

	function moduleApiTable:fChatWindowSize()
		return ChatWindow.GuiObject.Size
	end

	function moduleApiTable:fChatBarDisabled()
		return not ChatBar:GetEnabled()
	end

	if FFlagUserHandleChatHotKeyWithContextActionService then
		local TOGGLE_CHAT_ACTION_NAME = "ToggleChat"

		-- Callback when chat hotkey is pressed
		local function handleAction(actionName, inputState, inputObject)
			if actionName == TOGGLE_CHAT_ACTION_NAME and inputState == Enum.UserInputState.Begin and canChat and inputObject.UserInputType == Enum.UserInputType.Keyboard then
				DoChatBarFocus()
			end
		end
		ContextActionService:BindAction(TOGGLE_CHAT_ACTION_NAME, handleAction, true, Enum.KeyCode.Slash)
	else
		function moduleApiTable:SpecialKeyPressed(key, modifiers)
			if (key == Enum.SpecialKey.ChatHotkey) then
				if canChat then
					DoChatBarFocus()
				end
			end
		end
	end
end

moduleApiTable.CoreGuiEnabled:connect(function(enabled)
	moduleApiTable.IsCoreGuiEnabled = enabled

	enabled = enabled and (moduleApiTable.TopbarEnabled or ChatSettings.ChatOnWithTopBarOff)

	ChatWindow:SetCoreGuiEnabled(enabled)

	if (not enabled) then
		ChatBar:ReleaseFocus()
		InstantFadeOut()
	else
		InstantFadeIn()
	end
end)

function trimTrailingSpaces(str)
	local lastSpace = #str
	while lastSpace > 0 do
		--- The pattern ^%s matches whitespace at the start of the string. (Starting from lastSpace)
		if str:find("^%s", lastSpace) then
			lastSpace = lastSpace - 1
		else
			break
		end
	end
	return str:sub(1, lastSpace)
end

moduleApiTable.ChatMakeSystemMessageEvent:connect(function(valueTable)
	if (valueTable["Text"] and type(valueTable["Text"]) == "string") then
		while (not DidFirstChannelsLoads) do wait() end

		local channel = ChatSettings.GeneralChannelName
		local channelObj = ChatWindow:GetChannel(channel)

		if (channelObj) then
			local messageObject = {
				ID = -1,
				FromSpeaker = nil,
				SpeakerUserId = 0,
				OriginalChannel = channel,
				IsFiltered = true,
				MessageLength = string.len(valueTable.Text),
				MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(valueTable.Text)),
				Message = trimTrailingSpaces(valueTable.Text),
				MessageType = ChatConstants.MessageTypeSetCore,
				Time = os.time(),
				ExtraData = valueTable,
			}
			channelObj:AddMessageToChannel(messageObject)
			ChannelsBar:UpdateMessagePostedInChannel(channel)

			moduleApiTable.MessageCount = moduleApiTable.MessageCount + 1
			moduleApiTable.MessagesChanged:fire(moduleApiTable.MessageCount)
		end
	end
end)

moduleApiTable.ChatBarDisabledEvent:connect(function(disabled)
	if canChat then
		ChatBar:SetEnabled(not disabled)
		if (disabled) then
			ChatBar:ReleaseFocus()
		end
	end
end)

moduleApiTable.ChatWindowSizeEvent:connect(function(size)
	ChatWindow.GuiObject.Size = size
end)

moduleApiTable.ChatWindowPositionEvent:connect(function(position)
	ChatWindow.GuiObject.Position = position
end)


Prompt: -- Gamepad thumbstick utilities

Response:
local k = 0.5
local lowerK = 0.9
local function SCurveTransform(t)
	t = math.clamp(t, -1,1)
	if t >= 0 then
		return (k*t) / (k - t + 1)
	end
	return -((lowerK*-t) / (lowerK + t + 1))
end

local DEADZONE = 0.25
local function toSCurveSpace(t)
	return (1 + DEADZONE) * (2*math.abs(t) - 1) - DEADZONE
end

local function fromSCurveSpace(t)
	return t/2 + 0.5
end


Prompt: --Objects

Response:
local DriverSeat = Chassis.driverSeat

local function unbindActions()
	ContextActionService:UnbindAction(STEER_LEFT_ACTION_NAME)
	ContextActionService:UnbindAction(STEER_RIGHT_ACTION_NAME)
	ContextActionService:UnbindAction(THROTTLE_ACTION_NAME)
	ContextActionService:UnbindAction(BRAKE_ACTION_NAME)
	ContextActionService:UnbindAction(HAND_BRAKE_ACTION_NAME)
	ContextActionService:UnbindAction(EXIT_ACTION_NAME)
end

local function onExitSeat(Seat)
	unbindActions()
	LocalVehicleSeating.DisconnectFromSeatExitEvent(onExitSeat)
	script.Disabled = true
end
LocalVehicleSeating.OnSeatExitEvent(onExitSeat)


Prompt:
--[[
    Creates a new value, with relation to specified name, and with an optional starting amount.
]]

Response:
function BaseValueStore:addValue(name, startingData)
	self._data[name].value = startingData.value or 0
	self._data[name].max = startingData.max or nil
	self._data[name].min = startingData.min or nil
end


Prompt: -- End Scrollbar

Response:
local scrollBar = ScrollBar(false)
scrollBar.PageIncrement = 16
Create(scrollBar.GUI,{
	Position = UDim2.new(1,0,0,0);
	Size = UDim2.new(0,ScrollBarWidth,1,0);
	Parent = editorGrid;
})

local scrollBarH = ScrollBar(true)
scrollBarH.PageIncrement = 8
Create(scrollBarH.GUI,{
	Position = UDim2.new(0,0,1,0);
	Size = UDim2.new(1,0,0,ScrollBarWidth);
	Parent = editorGrid;
})

local entries = {}

local grid = {}

local count = 1
local xCount = 1

local lineSpan = 0

for i = 0,490,8 do
	local newRow = {}
	for j = 0,390,16 do
		local cellText = Instance.new("TextLabel",editorGrid)
		cellText.BackgroundTransparency = 1
		cellText.BorderSizePixel = 0
		cellText.Text = ""
		cellText.Position = UDim2.new(0,i,0,j)
		cellText.Size = UDim2.new(0,8,0,16)
		cellText.Font = Enum.Font.SourceSans
		cellText.FontSize = Enum.FontSize.Size18
		table.insert(newRow,cellText)
		xCount = xCount + 1
	end
	table.insert(grid,newRow)
	count = count + 1
	xCount = 1
end

local syntaxHighlightList = {
	{["Keyword"] = "for", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "local", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "if", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "then", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "do", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "while", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "end", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "function", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "string", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "table", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "game", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "workspace", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "return", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "break", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "elseif", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "in", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "pairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true},
	{["Keyword"] = "ipairs", ["Color"] = Color3.new(0, 0, 127/255), ["Independent"] = true}
}

function checkMouseInGui(gui)
	if gui == nil then return false end
	local plrMouse = game.Players.LocalPlayer:GetMouse()
	local guiPosition = gui.AbsolutePosition
	local guiSize = gui.AbsoluteSize

	if plrMouse.X >= guiPosition.x and plrMouse.X <= guiPosition.x + guiSize.x and plrMouse.Y >= guiPosition.y and plrMouse.Y <= guiPosition.y + guiSize.y then
		return true
	else
		return false
	end
end

function AddZeros(num,reach)
	local toConvert = tostring(num)
	while #toConvert < reach do
		toConvert = " "..toConvert
	end
	return toConvert
end

function buildScript(source,xOff,yOff,override)
	local buildingRows = true
	local buildScr = source

	local totalLines = 0

	--print(xOff,yOff)

	if currentSource ~= source then
		currentSource = source
	end

	if override then
		currentSource = source
		entries = {}
		while buildingRows do
			local x,y = string.find(buildScr,"\n")
			if x and y then
				table.insert(entries,string.sub(buildScr,1,y))
				buildScr = string.sub(buildScr,y+1,string.len(buildScr))
			else
				buildingRows = false
				table.insert(entries,buildScr)
			end
		end
	end

	totalLines = #entries
	lineSpan = #tostring(totalLines)

	if lineSpan == 1 then lineSpan = 2 end

	local currentRow = 1
	local currentColumn = 2 + lineSpan

	local colorTime = 0
	local colorReplace = nil

	local inString = false

	local workingEntries = entries

	--[[
	for i,v in pairs(entries) do
		table.insert(workingEntries,v)
	end

	for i = 1,yOff do
		table.remove(workingEntries,1)
	end
	--]]

	local delayance = xOff

	for i = 1,#grid do
		for j = 1,#grid[i] do
			if i <= lineSpan then
				local newNum = AddZeros(yOff + j,lineSpan)
				local newDigit =  string.sub(newNum,i,i)
				if newDigit == " " then
					grid[i][j].Text = ""
				else
					grid[i][j].Text = newDigit
				end
				grid[i][j].BackgroundTransparency = 0
				grid[i][j].BackgroundColor3 = Color3.new(163/255, 162/255, 165/255)
				--grid[i][j].Font = Enum.Font.SourceSansBold
			elseif i == lineSpan + 1 then
				grid[i][j].Text = ""
				grid[i][j].BackgroundTransparency = 0
				grid[i][j].BackgroundColor3 = Color3.new(200/255, 200/255, 200/255)
				--grid[i][j].Font = Enum.Font.SourceSans
			else
				grid[i][j].Text = ""
				grid[i][j].BackgroundTransparency = 1
				--grid[i][j].Font = Enum.Font.SourceSans
			end
		end
	end

	while true do
		if currentRow > #workingEntries or currentRow > #grid[1] then break end
		local entry = workingEntries[currentRow+yOff]
		while string.len(entry) > 0 do
			if string.sub(entry,1,1) == "\t" then entry = "    "..string.sub(entry,2) end

			if currentColumn > #grid then break end

			if delayance == 0 then
				grid[currentColumn][currentRow].Text = string.sub(entry,1,1)
			end

			-- Coloring

			if not inString then
				for i,v in pairs(syntaxHighlightList) do
					if string.sub(entry,1,string.len(v["Keyword"])) == v["Keyword"] then
						if v["Independent"] then
							local outCheck = string.len(v["Keyword"])+1
							local outEntry = string.sub(entry,outCheck,outCheck)
							if not string.find(outEntry,"%w") then
								colorTime = string.len(v["Keyword"])
								colorReplace = v["Color"]
							end
						else
							colorTime = string.len(v["Keyword"])
							colorReplace = v["Color"]
						end
					end
				end
			end

			if string.sub(entry,1,1) == "\"" and string.match(entry,"\".+\"") then
				inString = true
				colorTime = string.len(string.match(entry,"\".+\""))
				colorReplace = Color3.new(170/255, 0, 1)
			end

			if colorTime > 0 then
				colorTime = colorTime - 1
				grid[currentColumn][currentRow].TextColor3 = colorReplace
				if colorTime == 0 then inString = false end
			else
				grid[currentColumn][currentRow].TextColor3 = Color3.new(0,0,0)
				inString = false
			end

			if delayance == 0 then
				currentColumn = currentColumn + 1
			else
				delayance = delayance - 1
			end
			entry = string.sub(entry,2,string.len(entry))
		end
		currentRow = currentRow + 1
		currentColumn = 2 + lineSpan
		colorTime = 0
		delayance = xOff
		inString = false
	end
end

function scrollBar.UpdateCallback(self)
	scrollBar.TotalSpace = #entries * 16
	scrollBar.VisibleSpace = editorGrid.AbsoluteSize.Y
	buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
end

function scrollBarH.UpdateCallback(self)
	scrollBarH.TotalSpace = (getLongestEntry(entries) + 1 + lineSpan) * 8
	scrollBarH.VisibleSpace = editorGrid.AbsoluteSize.X
	buildScript(currentSource,math.floor(scrollBarH.ScrollIndex/8),math.floor(scrollBar.ScrollIndex/16))
end

function getLongestEntry(tab)
	local longest = 0
	for i,v in pairs(tab) do
		if string.len(v) > longest then
			longest = string.len(v)
		end
	end
	return longest
end

function openScript(scrObj)
	if scrObj:IsA("LocalScript") then
		scrObj.Archivable = true
		scrObj = scrObj:Clone()
		scrObj.Disabled = true
	end

	local scrName = scrObj.Name
	local scrSource = decompile(scrObj)

	table.insert(memoryScripts,{Name = scrName,Source = scrSource})

	local newTab = entryTemplate:Clone()
	newTab.Button.Text = scrName
	newTab.Position = UDim2.new(0,#scriptBar:GetChildren() * 100,0,0)
	newTab.Visible = true

	newTab.Button.MouseButton1Down:connect(function()
		for i,v in pairs(scriptBar:GetChildren()) do
			if v == newTab then
				editingIndex = i
				buildScript(memoryScripts[i].Source,0,0,true)
				scrollBar:ScrollTo(1)
				scrollBar:Update()
				scrollBarH:ScrollTo(1)
				scrollBarH:Update()
			end
		end
	end)

	newTab.Close.MouseButton1Click:connect(function()
		for i,v in pairs(scriptBar:GetChildren()) do
			if v == newTab then
				table.remove(memoryScripts,i)
				if editingIndex == i then
					editingIndex = #memoryScripts
					if editingIndex > 0 then
						buildScript(memoryScripts[#memoryScripts].Source,0,0,true)
					else
						buildScript("",0,0,true)
					end
				end

				scrollBar:ScrollTo(1)
				scrollBar:Update()
				scrollBarH:ScrollTo(1)
				scrollBarH:Update()

				for i2 = i,#scriptBar:GetChildren() do
					scriptBar:GetChildren()[i2].Position = scriptBar:GetChildren()[i2].Position + UDim2.new(0,-100,0,0)
				end
				if editingIndex > i then
					editingIndex = editingIndex - 1
				end
				newTab:Destroy()
			end
		end
	end)

	editingIndex = #memoryScripts
	buildScript(scrSource,0,0,true)

	newTab.Parent = scriptBar
end

function updateScriptBar()
	local entryCount = 0

	scriptBarLeft.Active = false
	scriptBarLeft.AutoButtonColor = false
	for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
		v.BackgroundTransparency = 0.7
	end
	scriptBarRight.Active = false
	scriptBarRight.AutoButtonColor = false
	for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
		v.BackgroundTransparency = 0.7
	end
	for i,v in pairs(scriptBar:GetChildren()) do
		if v.Position.X.Offset < 0 then
			scriptBarLeft.Active = true
			scriptBarLeft.AutoButtonColor = true
			for i,v in pairs(scriptBarLeft["Arrow Graphic"]:GetChildren()) do
				v.BackgroundTransparency = 0
			end
		elseif v.Position.X.Offset >= 0 then
			entryCount = entryCount + 1
			if entryCount == 5 then
				scriptBarRight.Active = true
				scriptBarRight.AutoButtonColor = true
				for i,v in pairs(scriptBarRight["Arrow Graphic"]:GetChildren()) do
					v.BackgroundTransparency = 0
				end
			end
		end
	end
end

scriptBar.ChildAdded:connect(updateScriptBar)
scriptBar.ChildRemoved:connect(updateScriptBar)

scriptBarLeft.MouseButton1Click:connect(function()
	if scriptBarLeft.Active == false then return end
	for i,v in pairs(scriptBar:GetChildren()) do
		v.Position = v.Position + UDim2.new(0,100,0,0)
	end
	updateScriptBar()
end)

scriptBarRight.MouseButton1Click:connect(function()
	if scriptBarRight.Active == false then return end
	for i,v in pairs(scriptBar:GetChildren()) do
		v.Position = v.Position + UDim2.new(0,-100,0,0)
	end
	updateScriptBar()
end)

mouse.Button1Down:connect(function()
	if checkMouseInGui(editorGrid) then
		--print("LETS EDIT!")
	end
end)

openEvent.Event:connect(function(...)
	top.Visible = true
	local args = {...}
	if #args > 0 then
		openScript(args[1])
	end
end)

clipboardButton.MouseButton1Click:connect(function()
	if Clipboard and Clipboard.set then
		Clipboard.set(currentSource)
	elseif CopyString then
		CopyString(currentSource)
	end
end)

closeButton.MouseButton1Click:connect(function()
	top.Visible = false
end)


Prompt: --// Char Parts

Response:
local Humanoid = Personagem:WaitForChild('Humanoid')
local Head = Personagem:WaitForChild('Head')
local Torso = Personagem:WaitForChild('Torso')
local HumanoidRootPart = Personagem:WaitForChild('HumanoidRootPart')
local RootJoint = HumanoidRootPart:WaitForChild('RootJoint')
local Neck = Torso:WaitForChild('Neck')
local Right_Shoulder = Torso:WaitForChild('Right Shoulder')
local Left_Shoulder = Torso:WaitForChild('Left Shoulder')
local Right_Hip = Torso:WaitForChild('Right Hip')
local Left_Hip = Torso:WaitForChild('Left Hip')

local Connections = {}

local Debris = game:GetService("Debris")

local Ignore_Model = ACS_Storage:FindFirstChild("Server")

local BulletModel = ACS_Storage:FindFirstChild("Client")

local IgnoreList = {"Ignorable","Glass"}

local Ray_Ignore = {Character, Ignore_Model, Camera, BulletModel, IgnoreList}

Camera.CameraType = Enum.CameraType.Custom
Camera.CameraSubject = Humanoid


Prompt:
--//=================================\\
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
--\\=================================//

Response:
ArtificialHB = Instance.new("BindableEvent", script)
ArtificialHB.Name = "ArtificialHB"

script:WaitForChild("ArtificialHB")

frame = 1/60
tf = 0
allowframeloss = false
tossremainder = false
lastframe = tick()
script.ArtificialHB:Fire()

game:GetService("RunService").Heartbeat:connect(function(s, p)
	tf = tf + s
	if tf >= frame then
		if allowframeloss then
			script.ArtificialHB:Fire()
			lastframe = tick()
		else
			for i = 1, math.floor(tf / frame) do
				script.ArtificialHB:Fire()
			end
		lastframe = tick()
		end
		if tossremainder then
			tf = 0
		else
			tf = tf - frame * math.floor(tf / frame)
		end
	end
end)

function PositiveAngle(NUMBER)
	if NUMBER >= 0 then
		NUMBER = 0
	end
	return NUMBER
end

function NegativeAngle(NUMBER)
	if NUMBER <= 0 then
		NUMBER = 0
	end
	return NUMBER
end

function Swait(NUMBER)
	if NUMBER == 0 or NUMBER == nil then
		ArtificialHB.Event:wait()
	else
		for i = 1, NUMBER do
			ArtificialHB.Event:wait()
		end
	end
end


Prompt:
--[[
Returns the exact decimal representation of double converted to decimal in array of table
with the length and scale by the power of ten
]]

Response:
function DoubleToDecimalConverter.ToExact(value: number): ({ number }?, number?, number?)
	value = tonumber(value)
	if not value then
		error("Argument #2 provided must be a number", 2)
	end
	value = math.abs(value)

	if value ~= value or value == 0 or value == math.huge then
		return nil, nil, nil
	end

	return bignum_dtoa(value, true)
end

return DoubleToDecimalConverter


Prompt:
--[[
	* Copyright (c) Roblox Corporation. All rights reserved.
	* Licensed under the MIT License (the "License");
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	*
	*     https://opensource.org/licenses/MIT
	*
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
]]

Response:
local Array = script.Parent.Parent
local Packages = Array.Parent.Parent
local types = require(Packages.ES7Types)
type Object = types.Object
type Array<T> = types.Array<T>
type Set<T> = types.Set<T>
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U

return function<T, U>(
	value: Set<T>,
	mapFn: (mapFn<T, U> | mapFnWithThisArg<T, U>)?,
	thisArg: Object?
	-- FIXME Luau: need overloading so the return type on this is more sane and doesn't require manual casts
): Array<U> | Array<T> | Array<string>
	local array = {}

	if mapFn then
		array = {}
		for i, v in value :: any do
			if thisArg ~= nil then
				(array :: Array<U>)[i] = (mapFn :: mapFnWithThisArg<T, U>)(thisArg, v, i)
			else
				(array :: Array<U>)[i] = (mapFn :: mapFn<T, U>)(v, i)
			end
		end
	else
		array = table.clone((value :: any)._array)
	end

	return array
end


Prompt:
--////////////////////////////////////////////////////////////////////////////////////////////
--///////////////////////////////////////////////// Code to hook client UI up to server events
--////////////////////////////////////////////////////////////////////////////////////////////

Response:
function DoChatBarFocus()
	if (not ChatWindow:GetCoreGuiEnabled()) then return end
	if (not ChatBar:GetEnabled()) then return end

	if (not ChatBar:IsFocused() and ChatBar:GetVisible()) then
		moduleApiTable:SetVisible(true)
		InstantFadeIn()
		ChatBar:CaptureFocus()
		moduleApiTable.ChatBarFocusChanged:fire(true)
	end
end

chatBarFocusChanged.Event:connect(function(focused)
	moduleApiTable.ChatBarFocusChanged:fire(focused)
end)

function DoSwitchCurrentChannel(targetChannel)
	if (ChatWindow:GetChannel(targetChannel)) then
		ChatWindow:SwitchCurrentChannel(targetChannel)
	end
end

function SendMessageToSelfInTargetChannel(message, channelName, extraData)
	local channelObj = ChatWindow:GetChannel(channelName)
	if (channelObj) then
		local messageData =
		{
			ID = -1,
			FromSpeaker = nil,
			SpeakerUserId = 0,
			OriginalChannel = channelName,
			IsFiltered = true,
			MessageLength = string.len(message),
			Message = trimTrailingSpaces(message),
			MessageType = ChatConstants.MessageTypeSystem,
			Time = os.time(),
			ExtraData = extraData,
		}

		channelObj:AddMessageToChannel(messageData)
	end
end

function chatBarFocused()
	if (not mouseIsInWindow) then
		DoBackgroundFadeIn()
		if (textIsFaded) then
			DoTextFadeIn()
		end
	end

	chatBarFocusChanged:Fire(true)
end


Prompt:
--	====================
--	SHOTGUN
--	Enable the gun to fire multiple bullet in one shot
--	====================

Response:
		ShotgunEnabled = false;
		BulletPerShot = 8;

		ShotgunReload = false; --Make user reloading like Shotgun, which user clipin shell one by one
		ShotgunClipinAnimationID = nil; --Set to "nil" if you don't want to animate
		ShotgunClipinAnimationSpeed = 1;
		ShellClipinSpeed = 0.5; --In second


Prompt: -- Directional tags

Response:
local Direction = 0
local Steer = 0


Prompt: --// Firemode Settings

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


Prompt: --[[ Constants ]]

Response:
--
local DPAD_SHEET = "rbxasset://textures/ui/DPadSheet.png"
local COMPASS_DIR = {
	Vector3.new(1, 0, 0),			-- E
	Vector3.new(1, 0, 1).unit,		-- SE
	Vector3.new(0, 0, 1),			-- S
	Vector3.new(-1, 0, 1).unit,		-- SW
	Vector3.new(-1, 0, 0),			-- W
	Vector3.new(-1, 0, -1).unit,	-- NW
	Vector3.new(0, 0, -1),			-- N
	Vector3.new(1, 0, -1).unit,		-- NE
}


Prompt:
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder

]]

Response:
--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
return function(p1, p2)
	if not p1 then
		return u1.Print("1st argument is blank or nil", true);
	end;
	if not p2 then
		return u1.Print("2nd argument is blank or nil", true);
	end;
	if type(p1) == "userdata" then
		p1 = p1:GetChildren();
	end;
	for v1, v2 in ipairs(p1) do
		if p2(v2) then
			return v2;
		end;
	end;
end;


Prompt:
--[[
	Instance references
]]

Response:
local maid = Maid.new()
maid.instance = script.Parent

maid.humanoid = maid.instance:WaitForChild("Humanoid")
maid.head = maid.instance:WaitForChild("Head")
maid.humanoidRootPart = maid.instance:FindFirstChild("HumanoidRootPart")
maid.alignOrientation = maid.humanoidRootPart:FindFirstChild("AlignOrientation")


Prompt:
--// Things in the blacklist appear to not work under a normal security level
--// About could work but apparently no window was included for about :(

Response:
local IntroFrame = Gui:WaitForChild("IntroFrame")

local SideMenu = Gui:WaitForChild("SideMenu")
local OpenToggleButton = Gui:WaitForChild("Toggle")
local CloseToggleButton = SideMenu:WaitForChild("Toggle")
local OpenScriptEditorButton = SideMenu:WaitForChild("OpenScriptEditor")

local ScriptEditor = Gui:WaitForChild("ScriptEditor")

local SlideOut = SideMenu:WaitForChild("SlideOut")
local SlideFrame = SlideOut:WaitForChild("SlideFrame")
local Slant = SideMenu:WaitForChild("Slant")

local ExplorerButton = SlideFrame:WaitForChild("Explorer")
local SettingsButton = SlideFrame:WaitForChild("Settings")

local SelectionBox = Instance.new("SelectionBox")
SelectionBox.Parent = Gui

local ExplorerPanel = Gui:WaitForChild("ExplorerPanel")
local PropertiesFrame = Gui:WaitForChild("PropertiesFrame")
local SaveMapWindow = Gui:WaitForChild("SaveMapWindow")
local RemoteDebugWindow = Gui:WaitForChild("RemoteDebugWindow")

local SettingsPanel = Gui:WaitForChild("SettingsPanel")
local SettingsListener = SettingsPanel:WaitForChild("GetSetting")
local SettingTemplate = SettingsPanel:WaitForChild("SettingTemplate")
local SettingList = SettingsPanel:WaitForChild("SettingList")

local SaveMapCopyList = SaveMapWindow:WaitForChild("CopyList")
local SaveMapSettingFrame = SaveMapWindow:WaitForChild("MapSettings")
local SaveMapName = SaveMapWindow:WaitForChild("FileName")
local SaveMapButton = SaveMapWindow:WaitForChild("Save")
local SaveMapCopyTemplate = SaveMapWindow:WaitForChild("Entry")
local SaveMapSettings = {
	CopyWhat = {
		Workspace = true,
		Lighting = true,
		ReplicatedStorage = true,
		ReplicatedFirst = true,
		StarterPack = true,
		StarterGui = true,
		StarterPlayer = true
	},
	SaveScripts = true,
	SaveTerrain = true,
	LightingProperties = true,
	CameraInstances = true
}

local Love = IntroFrame:WaitForChild("Love")

local LoveQuotes = {
	"Inspect, our love knows no bounds",
	"Inspect, I will always be there for you",
	"Inspect, nothing is more powerful than our relationship",
	"Inspect, I always think about you when you get depressed",
	"Inspect, you will always have a special place in my heart"
}

Love.Text = LoveQuotes[math.random(1,#LoveQuotes)]


Prompt: -- regular lua compatibility

Response:
local typeof = typeof or type

local function primitive(typeName)
	return function(value)
		local valueType = typeof(value)
		if valueType == typeName then
			return true
		else
			return false, string.format("%s expected, got %s", typeName, valueType)
		end
	end
end

local t = {}


Prompt: -- Listener variables and events

Response:
local events = ReplicatedStorage.Events
local roundEnd = events.RoundEnd
local roundStart = events.RoundStart


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

Response:
return {
	Sounds = {
		Dirt = 178054124,
		Wood = 177940988,
		Concrete = 277067660,
		Grass = 4776173570,
		Metal = 4790537991,
		Sand = 4777003964,
		Fabric = 4776951843,
		Gravel = 4776998555,
		Marble = 4776962643
	},
	MaterialMap = {
		Mud = "Dirt",
		Pebble = "Dirt",
		Ground = "Dirt",
		Sand = "Sand",
		Snow = "Sand",
		Sandstone = "Sand",
		Rock = "Gravel",
		Basalt = "Gravel",
		Asphalt = "Gravel",
		Glacier = "Gravel",
		Slate = "Gravel",
		WoodPlanks = "Wood",
		LeafyGrass = "Grass",
		Ice = "Marble",
		Salt = "Marble",
		Marble = "Marble",
		Pavement = "Marble",
		Limestone = "Marble",
		Foil = "Metal",
		DiamondPlate = "Metal",
		CorrodedMetal = "Metal"
	},
	RotationFactors = {
		Head = {
			Pitch = 0.8,
			Yaw = 0.75
		},
		UpperTorso = {
			Pitch = 0.5,
			Yaw = 0.5
		},
		LeftUpperArm = {
			Pitch = 0,
			Yaw = -0.5
		},
		RightUpperArm = {
			Pitch = 0,
			Yaw = -0.5
		},
		Torso = {
			Pitch = 0.4,
			Yaw = 0.2
		},
		["Left Arm"] = {
			Pitch = 0,
			Yaw = -0.5
		},
		["Right Arm"] = {
			Pitch = 0,
			Yaw = -0.5
		},
		["Left Leg"] = {
			Pitch = 0,
			Yaw = -0.2
		},
		["Right Leg"] = {
			Pitch = 0,
			Yaw = -0.2
		}
	}
};


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

Response:
	,VRecoil = {14,18}				--- Vertical Recoil
	,HRecoil = {6,9}				--- Horizontal Recoil
	,AimRecover = 1					---- Between 0 & 1

	,RecoilPunch = .35
	,VPunchBase = 6					--- Vertical Punch
	,HPunchBase = 2					--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless

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

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

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


Prompt: -- Gyroscopic controller for mobile device (if enabled)

Response: if UseGyroSteering.Value == true and UserInputService.TouchEnabled == true and UserInputService.GyroscopeEnabled == true then


Prompt: -- functions

Response:
function stopAllAnimations()
	local oldAnim = currentAnim

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

	if currentlyPlayingEmote then
		oldAnim = "idle"
		currentlyPlayingEmote = false
	end

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

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

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

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

	return oldAnim
end

function getHeightScale()
	if Humanoid then
		if not Humanoid.AutomaticScalingEnabled then
			return 1
		end

		local scale = Humanoid.HipHeight / HumanoidHipHeight
		if AnimationSpeedDampeningObject == nil then
			AnimationSpeedDampeningObject = script:FindFirstChild("ScaleDampeningPercent")
		end
		if AnimationSpeedDampeningObject ~= nil then
			scale = 1 + (Humanoid.HipHeight - HumanoidHipHeight) * AnimationSpeedDampeningObject.Value / HumanoidHipHeight
		end
		return scale
	end
	return 1
end

function setRunSpeed(SPEED)
	local HeightScale = SPEED * 1.25 / getHeightScale()

	if HeightScale ~= currentAnimSpeed then
		if HeightScale < 0.33 then
			currentAnimTrack:AdjustWeight(1)
			runAnimTrack:AdjustWeight(0.0001)
		elseif HeightScale < 0.66 then
			local v83 = (HeightScale - 0.33) / 0.33
			currentAnimTrack:AdjustWeight(1 - v83 + 0.0001)
			runAnimTrack:AdjustWeight(v83 + 0.0001)
		else
			currentAnimTrack:AdjustWeight(0.0001)
			runAnimTrack:AdjustWeight(1)
		end
		currentAnimSpeed = HeightScale
		runAnimTrack:AdjustSpeed(HeightScale)
		currentAnimTrack:AdjustSpeed(HeightScale)
	end
end

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

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

			if currentlyPlayingEmote then
				if currentAnimTrack.Looped then
					-- Allow the emote to loop
					return
				end

				repeatAnim = "idle"
				currentlyPlayingEmote = false
			end

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

function rollAnimation(animName)
	local roll = math.random(1, animTable[animName].totalWeight)
	local origRoll = roll
	local idx = 1
	while (roll > animTable[animName][idx].weight) do
		roll = roll - animTable[animName][idx].weight
		idx = idx + 1
	end
	return idx
end

local function switchToAnim(anim, animName, transitionTime, humanoid)
	-- switch animation
	if (anim ~= currentAnimInstance) then

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

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

		currentAnimSpeed = 1.0

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

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

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

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

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

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

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

	switchToAnim(anim, animName, transitionTime, humanoid)
	currentlyPlayingEmote = false
end

function playEmote(emoteAnim, transitionTime, humanoid)
	switchToAnim(emoteAnim, emoteAnim.Name, transitionTime, humanoid)
	currentlyPlayingEmote = true
end


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)
	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)
					speaker:SendSystemMessage(
						string.gsub(
							ChatLocalization:Get(
								"GameChat_SwitchChannel_NowInChannel",
								string.format("You are now chatting in channel: '%s'", channel.Name)
							),
						"{RBX_NAME}",channel.Name),
						channel.Name
					)
				end
			else
				speaker:SendSystemMessage(
					string.gsub(
						ChatLocalization:Get(
							"GameChat_ChatServiceRunner_YouCannotJoinChannel",
							("You cannot join channel '" .. channelName .. "'.")
						),
					"{RBX_NAME}",channelName),
					fromChannelName
				)
			end
		else
			speaker:SendSystemMessage(
				string.gsub(
					ChatLocalization:Get(
						"GameChat_ChatServiceRunner_ChannelDoesNotExist",
						("Channel '" .. channelName .. "' does not exist.")
					),
				"{RBX_NAME}",channelName),
				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)
				speaker:SendSystemMessage(
					string.gsub(
						ChatLocalization:Get(
							"GameChat_ChatService_YouHaveLeftChannel",
							string.format("You have left channel '%s'", channelName)
						),
					"{RBX_NAME}",channel.Name),
					"System"
				)
			else
				speaker:SendSystemMessage(
					string.gsub(
						ChatLocalization:Get(
							"GameChat_ChatServiceRunner_YouCannotLeaveChannel",
							("You cannot leave channel '" .. channelName .. "'.")
						),
					"{RBX_NAME}",channelName),
					fromChannelName
				)
			end
		else
			speaker:SendSystemMessage(
				string.gsub(
					ChatLocalization:Get(
						"GameChat_ChatServiceRunner_YouAreNotInChannel",
						("You are not in channel '" .. channelName .. "'.")
					),
				"{RBX_NAME}",channelName),
				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

	elseif (string.sub(message, 1, 3) == "/e " or string.sub(message, 1, 7) == "/emote ") then
		-- Just don't show these in the chatlog. The animation script listens on these.
		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:Get(
	"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: --		print("Wha " .. pose)

Response:
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

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

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

	-- Tool Animation handling
	local tool = getTool()
	if tool then

		animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end

		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimTime = 0
	end
end


Prompt:
--[[
	Function called when the client is notified of a player state update.
]]

Response:
function UIController.onClientStateUpdated(currentState)
	if currentState == "pregame" then
		UIController.setView("pregame")
	elseif currentState == "warmup" then
		UIController.setView("warmup")
	elseif currentState == "game" then
		UIController.setView("game")
	elseif currentState == "spectating" then
		UIController.setView("spectating")
	elseif currentState == "finished" then
		UIController.setView("finished")
	elseif currentState == "dead" then
		UIController.setView("dead")
	elseif currentState == "postgame" then
		UIController.setView("postGame")
	end
end


Prompt: --set color

Response:
function Color:SetColor(color : Color3)
	local hue,saturation,value = color:ToHSV()
	self.Color = color

	local wheelSize = self.Instance.Wheel.Image.AbsoluteSize
	local wheelMidPos = (wheelSize / 2)
	local maxDist = (wheelSize.X / 2)

	local vector = Vector2.new(0.5,0.5)

	local hueVector = Vector2.new(-1,0)
	hueVector = rotateVector(hueVector,hue * -360)
	hueVector = rotateVector(hueVector,180)

	vector -= hueVector * saturation * 0.5
	self.Instance.Wheel.Image.Select.Position = UDim2.fromScale(vector.X,vector.Y)
	self.Instance.Right.Value.Select.Position = UDim2.new(0,0,1 - value,0)

	self:UpdateColor()
	self:SetValueGradient(hue,saturation)
end

return Color


Response:
	,Distance = 10000
	,BDrop = .25
	,BSpeed = 2200

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200

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

	,Tracer = true
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 5
	,TracerChance = 100

	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0


Prompt:
--[[
	A manager for a single host virtual node's connected events.
]]

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

local CHANGE_PREFIX = "Change."

local EventStatus = {
	-- No events are processed at all; they're silently discarded
	Disabled = "Disabled",

	-- Events are stored in a queue; listeners are invoked when the manager is resumed
	Suspended = "Suspended",

	-- Event listeners are invoked as the events fire
	Enabled = "Enabled",
}

local SingleEventManager = {}
SingleEventManager.__index = SingleEventManager

function SingleEventManager.new(instance)
	local self = setmetatable({
		-- The queue of suspended events
		_suspendedEventQueue = {},

		-- All the event connections being managed
		-- Events are indexed by a string key
		_connections = {},

		-- All the listeners being managed
		-- These are stored distinctly from the connections
		-- Connections can have their listeners replaced at runtime
		_listeners = {},

		-- The suspension status of the manager
		-- Managers start disabled and are "resumed" after the initial render
		_status = EventStatus.Disabled,

		-- If true, the manager is processing queued events right now.
		_isResuming = false,

		-- The Roblox instance the manager is managing
		_instance = instance,
	}, SingleEventManager)

	return self
end

function SingleEventManager:connectEvent(key, listener)
	self:_connect(key, self._instance[key], listener)
end

function SingleEventManager:connectPropertyChange(key, listener)
	local success, event = pcall(function()
		return self._instance:GetPropertyChangedSignal(key)
	end)

	if not success then
		error(("Cannot get changed signal on property %q: %s"):format(
			tostring(key),
			event
		), 0)
	end

	self:_connect(CHANGE_PREFIX .. key, event, listener)
end

function SingleEventManager:_connect(eventKey, event, listener)
	-- If the listener doesn't exist we can just disconnect the existing connection
	if listener == nil then
		if self._connections[eventKey] ~= nil then
			self._connections[eventKey]:Disconnect()
			self._connections[eventKey] = nil
		end

		self._listeners[eventKey] = nil
	else
		if self._connections[eventKey] == nil then
			self._connections[eventKey] = event:Connect(function(...)
				if self._status == EventStatus.Enabled then
					self._listeners[eventKey](self._instance, ...)
				elseif self._status == EventStatus.Suspended then
					-- Store this event invocation to be fired when resume is
					-- called.

					local argumentCount = select("#", ...)
					table.insert(self._suspendedEventQueue, { eventKey, argumentCount, ... })
				end
			end)
		end

		self._listeners[eventKey] = listener
	end
end

function SingleEventManager:suspend()
	self._status = EventStatus.Suspended
end

function SingleEventManager:resume()
	-- If we're already resuming events for this instance, trying to resume
	-- again would cause a disaster.
	if self._isResuming then
		return
	end

	self._isResuming = true

	local index = 1

	-- More events might be added to the queue when evaluating events, so we
	-- need to be careful in order to preserve correct evaluation order.
	while index <= #self._suspendedEventQueue do
		local eventInvocation = self._suspendedEventQueue[index]
		local listener = self._listeners[eventInvocation[1]]
		local argumentCount = eventInvocation[2]

		-- The event might have been disconnected since suspension started; in
		-- this case, we drop the event.
		if listener ~= nil then
			-- Wrap the listener in a coroutine to catch errors and handle
			-- yielding correctly.
			local listenerCo = coroutine.create(listener)
			local success, result = coroutine.resume(
				listenerCo,
				self._instance,
				unpack(eventInvocation, 3, 2 + argumentCount))

			-- If the listener threw an error, we log it as a warning, since
			-- there's no way to write error text in Roblox Lua without killing
			-- our thread!
			if not success then
				Logging.warn("%s", result)
			end
		end

		index = index + 1
	end

	self._isResuming = false
	self._status = EventStatus.Enabled
	self._suspendedEventQueue = {}
end

return SingleEventManager


Prompt: -- Objects

Response:
local plr = playerService.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local settingsDir = script.Settings

function getSetting (name)
	return settingsDir and settingsDir:FindFirstChild(name) and settingsDir[name].Value
end

local normalSpeed = getSetting("Walking speed") or 18 -- The player's walking speed (Roblox default is 16)
local sprintSpeed = getSetting("Running speed") or 26 -- The player's speed while sprinting
local sprinting = false

inputService.InputBegan:Connect(function (key)
	if char.Humanoid.WalkSpeed == 0 then return end
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
		running = true
		if char:FindFirstChild("Humanoid") then
			char.Humanoid.WalkSpeed = sprintSpeed
		end
	end
end)

inputService.InputEnded:Connect(function (key)
	if char.Humanoid.WalkSpeed == 0 then return end
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
		running = false
		if char:FindFirstChild("Humanoid") then
			char.Humanoid.WalkSpeed = normalSpeed
		end
	end
end)


Prompt: --[[Susupension]]

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

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

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

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

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

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

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

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


Prompt: --// Damage Settings

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


Prompt: --[[ Constants ]]

Response:
--
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local USE_STACKING_TRANSPARENCY = true	-- Multiple items between the subject and camera get transparency values that add up to TARGET_TRANSPARENCY
local TARGET_TRANSPARENCY = 0.75 -- Classic Invisicam's Value, also used by new invisicam for parts hit by head and torso rays
local TARGET_TRANSPARENCY_PERIPHERAL = 0.5 -- Used by new SMART_CIRCLE mode for items not hit by head and torso rays

local MODE = {
	--CUSTOM = 1, 		-- Retired, unused
	LIMBS = 2, 			-- Track limbs
	MOVEMENT = 3, 		-- Track movement
	CORNERS = 4, 		-- Char model corners
	CIRCLE1 = 5, 		-- Circle of casts around character
	CIRCLE2 = 6, 		-- Circle of casts around character, camera relative
	LIMBMOVE = 7, 		-- LIMBS mode + MOVEMENT mode
	SMART_CIRCLE = 8, 	-- More sample points on and around character
	CHAR_OUTLINE = 9,	-- Dynamic outline around the character
}

local LIMB_TRACKING_SET = {
	-- Body parts common to R15 and R6
	['Head'] = true,

	-- Body parts unique to R6
	['Left Arm'] = true,
	['Right Arm'] = true,
	['Left Leg'] = true,
	['Right Leg'] = true,

	-- Body parts unique to R15
	['LeftLowerArm'] = true,
	['RightLowerArm'] = true,
	['LeftUpperLeg'] = true,
	['RightUpperLeg'] = true
}

local CORNER_FACTORS = {
	Vector3.new(1,1,-1),
	Vector3.new(1,-1,-1),
	Vector3.new(-1,-1,-1),
	Vector3.new(-1,1,-1)
}

local CIRCLE_CASTS = 10
local MOVE_CASTS = 3
local SMART_CIRCLE_CASTS = 24
local SMART_CIRCLE_INCREMENT = 2.0 * math.pi / SMART_CIRCLE_CASTS
local CHAR_OUTLINE_CASTS = 24


Prompt: --// Firemode Functions

Response:
function CreateBullet(L_200_arg1)
	local L_201_ = L_59_.Position
	local L_202_ = (L_4_.Hit.p - L_201_).unit
	local L_203_ = CFrame.Angles(math.rad(math.random(-L_200_arg1, L_200_arg1)), math.rad(math.random(-L_200_arg1, L_200_arg1)), math.rad(math.random(-L_200_arg1, L_200_arg1)))
	L_202_ = L_203_ * L_202_
	local L_204_ = CFrame.new(L_201_, L_201_ + L_202_)

	local L_205_ = Instance.new("Part", L_101_)
	game.Debris:AddItem(L_205_, 10)
	L_205_.Shape = Enum.PartType.Ball
	L_205_.Size = Vector3.new(1, 1, 12)
	L_205_.Name = "Bullet"
	L_205_.TopSurface = "Smooth"
	L_205_.BottomSurface = "Smooth"
	L_205_.BrickColor = BrickColor.new("Bright green")
	L_205_.Material = "Neon"
	L_205_.CanCollide = false
		--Bullet.CFrame = FirePart.CFrame + (Grip.CFrame.p - Grip.CFrame.p)
	L_205_.CFrame = L_204_

	local L_206_ = Instance.new("Sound")
	L_206_.SoundId = "rbxassetid://341519743"
	L_206_.Looped = true
	L_206_:Play()
	L_206_.Parent = L_205_
	L_206_.Volume = 0.4
	L_206_.MaxDistance = 30

	L_205_.Transparency = 1
	local L_207_ = L_205_:GetMass()
	local L_208_ = Instance.new('BodyForce', L_205_)

	if not L_83_ then
		L_208_.Force = L_24_.BulletPhysics
		L_205_.Velocity = L_202_ * L_24_.BulletSpeed
	else
		L_208_.Force = L_24_.ExploPhysics
		L_205_.Velocity = L_202_ * L_24_.ExploSpeed
	end

	local L_209_ = Instance.new('Attachment', L_205_)
	L_209_.Position = Vector3.new(0.1, 0, 0)
	local L_210_ = Instance.new('Attachment', L_205_)
	L_210_.Position = Vector3.new(-0.1, 0, 0)

	local L_211_ = TracerCalculation()

	if L_24_.TracerEnabled == true and L_211_ then
		local L_212_ = Instance.new('Trail', L_205_)
		L_212_.Attachment0 = L_209_
		L_212_.Attachment1 = L_210_
		L_212_.Transparency = NumberSequence.new(L_24_.TracerTransparency)
		L_212_.LightEmission = L_24_.TracerLightEmission
		L_212_.TextureLength = L_24_.TracerTextureLength
		L_212_.Lifetime = L_24_.TracerLifetime
		L_212_.FaceCamera = L_24_.TracerFaceCamera
		L_212_.Color = ColorSequence.new(L_24_.TracerColor.Color)
	end

	if L_1_:FindFirstChild('Shell') and not L_83_ then
		CreateShell()
	end

	delay(0.2, function()
		L_205_.Transparency = 0
	end)

	return L_205_
end

function CheckForHumanoid(L_213_arg1)
	local L_214_ = false
	local L_215_ = nil
	if L_213_arg1 then
		if (L_213_arg1.Parent:FindFirstChild("Humanoid") or L_213_arg1.Parent.Parent:FindFirstChild("Humanoid")) then
			L_214_ = true
			if L_213_arg1.Parent:FindFirstChild('Humanoid') then
				L_215_ = L_213_arg1.Parent.Humanoid
			elseif L_213_arg1.Parent.Parent:FindFirstChild('Humanoid') then
				L_215_ = L_213_arg1.Parent.Parent.Humanoid
			end
		else
			L_214_ = false
		end
	end
	return L_214_, L_215_
end

function CastRay(L_216_arg1)
	local L_217_, L_218_, L_219_
	local L_220_ = L_56_.Position;
	local L_221_ = L_216_arg1.Position;
	local L_222_ = 0

	local L_223_ = L_83_

	while true do
		L_106_:wait()
		L_221_ = L_216_arg1.Position;
		L_222_ = L_222_ + (L_221_ - L_220_).magnitude
		L_217_, L_218_, L_219_ = workspace:FindPartOnRayWithIgnoreList(Ray.new(L_220_, (L_221_ - L_220_)), IgnoreList);
		local L_224_ = Vector3.new(0, 1, 0):Cross(L_219_)
		local L_225_ = math.asin(L_224_.magnitude) -- division by 1 is redundant
		if L_222_ > L_24_.BulletDecay then
			L_216_arg1:Destroy()
			break
		end
		if L_217_ and (L_217_ and L_217_.Transparency >= 1 or L_217_.CanCollide == false) and L_217_.Name ~= 'Right Arm' and L_217_.Name ~= 'Left Arm' and L_217_.Name ~= 'Right Leg' and L_217_.Name ~= 'Left Leg' and L_217_.Name ~= 'Armor' then
			table.insert(IgnoreList, L_217_)
		end

		if L_217_ then
			L_224_ = Vector3.new(0, 1, 0):Cross(L_219_)
			L_225_ = math.asin(L_224_.magnitude) -- division by 1 is redundant

			L_118_:FireServer(L_218_)

			local L_226_ = CheckForHumanoid(L_217_)
			if L_226_ == false then
				L_216_arg1:Destroy()
				local L_227_ = L_113_:InvokeServer(L_218_, L_224_, L_225_, L_219_, "Part", L_217_)
			elseif L_226_ == true then
				L_216_arg1:Destroy()
				local L_228_ = L_113_:InvokeServer(L_218_, L_224_, L_225_, L_219_, "Human", L_217_)
			end
		end

		if L_217_ and L_223_ then
			L_116_:FireServer(L_218_)
		end

		if L_217_ then
			local L_229_, L_230_ = CheckForHumanoid(L_217_)
			if L_229_ then
				L_111_:FireServer(L_230_)
				if L_24_.AntiTK then
					if game.Players:FindFirstChild(L_230_.Parent.Name) and game.Players:FindFirstChild(L_230_.Parent.Name).TeamColor ~= L_2_.TeamColor or L_230_.Parent:FindFirstChild('Vars') and game.Players:FindFirstChild(L_230_.Parent:WaitForChild('Vars'):WaitForChild('BotID').Value) and L_2_.TeamColor ~= L_230_.Parent:WaitForChild('Vars'):WaitForChild('teamColor').Value then
						if L_217_.Name == 'Head' then
							L_110_:FireServer(L_230_, L_24_.HeadDamage)
							local L_231_ = L_19_:WaitForChild('BodyHit'):clone()
							L_231_.Parent = L_2_.PlayerGui
							L_231_:Play()
							game:GetService("Debris"):addItem(L_231_, L_231_.TimeLength)
						end
						if L_217_.Name ~= 'Head' and not (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
							if L_217_.Name ~= 'Torso' and L_217_.Name ~= 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then
								L_110_:FireServer(L_230_, L_24_.LimbDamage)
							elseif L_217_.Name == 'Torso' or L_217_.Name == 'HumanoidRootPart' and L_217_.Name ~= 'Armor'  then
								L_110_:FireServer(L_230_, L_24_.BaseDamage)
							elseif L_217_.Name == 'Armor' then
								L_110_:FireServer(L_230_, L_24_.ArmorDamage)
							end
							local L_232_ = L_19_:WaitForChild('BodyHit'):clone()
							L_232_.Parent = L_2_.PlayerGui
							L_232_:Play()
							game:GetService("Debris"):addItem(L_232_, L_232_.TimeLength)
						end
						if (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
							L_110_:FireServer(L_230_, L_24_.HeadDamage)
							local L_233_ = L_19_:WaitForChild('BodyHit'):clone()
							L_233_.Parent = L_2_.PlayerGui
							L_233_:Play()
							game:GetService("Debris"):addItem(L_233_, L_233_.TimeLength)
						end
					end
				else
					if L_217_.Name == 'Head' then
						L_110_:FireServer(L_230_, L_24_.HeadDamage)
						local L_234_ = L_19_:WaitForChild('BodyHit'):clone()
						L_234_.Parent = L_2_.PlayerGui
						L_234_:Play()
						game:GetService("Debris"):addItem(L_234_, L_234_.TimeLength)
					end
					if L_217_.Name ~= 'Head' and not (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
						if L_217_.Name ~= 'Torso' and L_217_.Name ~= 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then
							L_110_:FireServer(L_230_, L_24_.LimbDamage)
						elseif L_217_.Name == 'Torso' or L_217_.Name == 'HumanoidRootPart' and L_217_.Name ~= 'Armor' then
							L_110_:FireServer(L_230_, L_24_.BaseDamage)
						elseif L_217_.Name == 'Armor' then
							L_110_:FireServer(L_230_, L_24_.ArmorDamage)
						end
						local L_235_ = L_19_:WaitForChild('BodyHit'):clone()
						L_235_.Parent = L_2_.PlayerGui
						L_235_:Play()
						game:GetService("Debris"):addItem(L_235_, L_235_.TimeLength)
					end
					if (L_217_.Parent:IsA('Accessory') or L_217_.Parent:IsA('Hat')) then
						L_110_:FireServer(L_230_, L_24_.HeadDamage)
						local L_236_ = L_19_:WaitForChild('BodyHit'):clone()
						L_236_.Parent = L_2_.PlayerGui
						L_236_:Play()
						game:GetService("Debris"):addItem(L_236_, L_236_.TimeLength)
					end
				end
			end
		end

		if L_217_ and L_217_.Parent:FindFirstChild("Humanoid") then
			return L_217_, L_218_;
		end
		L_220_ = L_221_;
	end
end

function fireSemi()
	if L_15_ then
		L_69_ = false
		Recoiling = true
		Shooting = true

		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_102_ = CreateBullet(L_24_.BulletSpread)
		L_103_ = L_103_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_237_, L_238_ = spawn(function()
			CastRay(L_102_)
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)

		wait(L_24_.Firerate)

		local L_239_ = JamCalculation()
		if L_239_ then
			L_69_ = false
		else
			L_69_ = true
		end
		Shooting = false
	end
end

function fireExplo()
	if L_15_ then
		L_69_ = false
		Recoiling = true
		Shooting = true
		if L_54_ then
			L_54_:FireServer(L_60_:WaitForChild('Fire').SoundId, L_60_)
		else
			L_60_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_102_ = CreateBullet(L_24_.BulletSpread)
		L_105_ = L_105_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_240_, L_241_ = spawn(function()
			CastRay(L_102_)
		end)

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)

		L_69_ = false
		Shooting = false
	end
end

function fireShot()
	while not Shooting and L_103_ > 0 and L_68_ and L_69_ and L_15_ do
		if L_15_ then
			L_69_ = false
			Recoiling = true
			Shooting = true
			RecoilFront = true
			--CheckReverb()
			if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
			else
				L_59_:WaitForChild('Fire'):Play()
			end
			L_109_:FireServer()
			for L_243_forvar1 = 1, L_24_.ShotNum do
				spawn(function()
					L_102_ = CreateBullet(L_24_.BulletSpread)
				end)
				local L_244_, L_245_ = spawn(function()
					CastRay(L_102_)
				end)
			end
		end

		for L_246_forvar1, L_247_forvar2 in pairs(L_59_:GetChildren()) do
			if L_247_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_247_forvar2.Enabled = true
			end
		end

		delay(1 / 30, function()
			for L_248_forvar1, L_249_forvar2 in pairs(L_59_:GetChildren()) do
				if L_249_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_249_forvar2.Enabled = false
				end
			end
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		L_103_ = L_103_ - 1
		UpdateAmmo()
		wait(L_24_.Firerate)

		L_76_ = true
		L_76_ = false

		local L_242_ = JamCalculation()
		if L_242_ then
			L_69_ = false
		else
			L_69_ = true
		end

		Shooting = false
	end
end

function fireBoltAction()
	if L_15_ then
		L_69_ = false
		Recoiling = true
		Shooting = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_102_ = CreateBullet(L_24_.BulletSpread)
		L_103_ = L_103_ - 1
		UpdateAmmo()
		RecoilFront = true
		local L_250_, L_251_ = spawn(function()
			CastRay(L_102_)
		end)

		for L_253_forvar1, L_254_forvar2 in pairs(L_59_:GetChildren()) do
			if L_254_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_254_forvar2.Enabled = true
			end
		end

		delay(1 / 30, function()
			for L_255_forvar1, L_256_forvar2 in pairs(L_59_:GetChildren()) do
				if L_256_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_256_forvar2.Enabled = false
				end
			end
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_24_.Firerate)

		L_76_ = true
		BoltBackAnim()
		BoltForwardAnim()
		IdleAnim()
		L_76_ = false

		local L_252_ = JamCalculation()
		if L_252_ then
			L_69_ = false
		else
			L_69_ = true
		end

		Shooting = false
	end
end

function fireAuto()
	while not Shooting and L_103_ > 0 and L_68_ and L_69_ and L_15_ do
		L_69_ = false
		Recoiling = true
		--CheckReverb()
		if L_54_ then
			L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
		else
			L_59_:WaitForChild('Fire'):Play()
		end
		L_109_:FireServer()
		L_103_ = L_103_ - 1
		UpdateAmmo()
		Shooting = true
		RecoilFront = true
		L_102_ = CreateBullet(L_24_.BulletSpread)
		local L_257_, L_258_ = spawn(function()
			CastRay(L_102_)
		end)

		for L_260_forvar1, L_261_forvar2 in pairs(L_59_:GetChildren()) do
			if L_261_forvar2.Name:sub(1, 7) == "FlashFX" then
				L_261_forvar2.Enabled = true
			end
		end

		delay(1 / 30, function()
			for L_262_forvar1, L_263_forvar2 in pairs(L_59_:GetChildren()) do
				if L_263_forvar2.Name:sub(1, 7) == "FlashFX" then
					L_263_forvar2.Enabled = false
				end
			end
		end)

		if L_24_.CanBolt == true then
			BoltingBackAnim()
			delay(L_24_.Firerate / 2, function()
				if L_24_.CanSlideLock == false then
					BoltingForwardAnim()
				elseif L_24_.CanSlideLock == true then
					if L_103_ > 0 then
						BoltingForwardAnim()
					end
				end
			end)
		end

		delay(L_24_.Firerate / 2, function()
			Recoiling = false
			RecoilFront = false
		end)
		wait(L_24_.Firerate)

		local L_259_ = JamCalculation()
		if L_259_ then
			L_69_ = false
		else
			L_69_ = true
		end

		Shooting = false
	end
end

function fireBurst()
	if not Shooting and L_103_ > 0 and L_68_ and L_15_ then
		for L_264_forvar1 = 1, L_24_.BurstNum do
			if L_103_ > 0 and L_68_ then
				L_69_ = false
				Recoiling = true
			--CheckReverb()
				if L_54_ then
					L_54_:FireServer(L_59_:WaitForChild('Fire').SoundId, L_59_)
				else
					L_59_:WaitForChild('Fire'):Play()
				end
				L_109_:FireServer()
				L_102_ = CreateBullet(L_24_.BulletSpread)
				local L_265_, L_266_ = spawn(function()
					CastRay(L_102_)
				end)

				for L_268_forvar1, L_269_forvar2 in pairs(L_59_:GetChildren()) do
					if L_269_forvar2.Name:sub(1, 7) == "FlashFX" then
						L_269_forvar2.Enabled = true
					end
				end

				delay(1 / 30, function()
					for L_270_forvar1, L_271_forvar2 in pairs(L_59_:GetChildren()) do
						if L_271_forvar2.Name:sub(1, 7) == "FlashFX" then
							L_271_forvar2.Enabled = false
						end
					end
				end)

				if L_24_.CanBolt == true then
					BoltingBackAnim()
					delay(L_24_.Firerate / 2, function()
						if L_24_.CanSlideLock == false then
							BoltingForwardAnim()
						elseif L_24_.CanSlideLock == true then
							if L_103_ > 0 then
								BoltingForwardAnim()
							end
						end
					end)
				end

				L_103_ = L_103_ - 1
				UpdateAmmo()
				RecoilFront = true
				delay(L_24_.Firerate / 2, function()
					Recoiling = false
					RecoilFront = false
				end)
				wait(L_24_.Firerate)

				local L_267_ = JamCalculation()
				if L_267_ then
					L_69_ = false
				else
					L_69_ = true
				end

			end
			Shooting = true
		end
		Shooting = false
	end
end

function Shoot()
	if L_15_ and L_69_ then
		if L_92_ == 1 then
			fireSemi()
		elseif L_92_ == 2 then
			fireAuto()
		elseif L_92_ == 3 then
			fireBurst()
		elseif L_92_ == 4 then
			fireBoltAction()
		elseif L_92_ == 5 then
			fireShot()
		elseif L_92_ == 6 then
			fireExplo()
		end
	end
end


Prompt: --// Events

Response:
local L_105_ = L_20_:WaitForChild('Equipped')
local L_106_ = L_20_:WaitForChild('ShootEvent')
local L_107_ = L_20_:WaitForChild('DamageEvent')
local L_108_ = L_20_:WaitForChild('CreateOwner')
local L_109_ = L_20_:WaitForChild('Stance')
local L_110_ = L_20_:WaitForChild('HitEvent')
local L_111_ = L_20_:WaitForChild('KillEvent')
local L_112_ = L_20_:WaitForChild('AimEvent')
local L_113_ = L_20_:WaitForChild('ExploEvent')
local L_114_ = L_20_:WaitForChild('AttachEvent')
local L_115_ = L_20_:WaitForChild('ServerFXEvent')
local L_116_ = L_20_:WaitForChild('ChangeIDEvent')


Prompt: --- FUNCTIONS ---

Response:
frame:WaitForChild("Paper").MouseEnter:Connect(function()
	connection = frame.Paper.MouseLeave:Connect(function()
		connection:Disconnect()
		tween:Create(frame.Paper, TweenInfo.new(1), {Position = UDim2.new(0.5,0,2,0)}):Play()
		tween:Create(frame.Paper, TweenInfo.new(1), {BackgroundTransparency = 1}):Play()
		tween:Create(frame.Paper, TweenInfo.new(1), {ImageTransparency = 1}):Play()

		task.wait(1)
		frame.Paper:ClearAllChildren()
	end)
end)


Response:
Collapse.OnServerEvent:Connect(function(player)

	local Human = player.Character.Humanoid
	local Dor = Human.Parent.Saude.Variaveis.Dor
	local Sangue = Human.Parent.Saude.Variaveis.Sangue
	local IsWounded = Human.Parent.Saude.Stances.Caido

	if (Sangue.Value <= 3500) or (Dor.Value >= 200)  or (IsWounded.Value == true) then -- Man this Guy's Really wounded,
		IsWounded.Value = true
		Human.PlatformStand = true
		Human.AutoRotate = false
	elseif (Sangue.Value > 3500) and (Dor.Value < 200) and (IsWounded.Value == false) then -- YAY A MEDIC ARRIVED! =D
		Human.PlatformStand = false
		IsWounded.Value = false
		Human.AutoRotate = true

	end
end)

Reset.OnServerEvent:Connect(function(player)

local Human = player.Character.Humanoid
local target = Human.Parent.Saude.Variaveis.PlayerSelecionado

target.Value = "N/A"
end)


Prompt: --run this first so if there is a 'white' team it is switched over

Response:
if not Settings['AutoAssignTeams'] then
	local teamHire = Instance.new('Team', Teams)
	teamHire.TeamColor = BC.new('White')
	teamHire.Name = "For Hire"
end

for i,v in pairs(script.Parent:WaitForChild('Tycoons'):GetChildren()) do
	Tycoons[v.Name] = v:Clone() -- Store the tycoons then make teams depending on the tycoon names
	if returnColorTaken(v.TeamColor) then
		--//Handle duplicate team colors
		local newColor;
		repeat
			wait()
			newColor = BC.Random()
		until returnColorTaken(newColor) == false
		v.TeamColor.Value = newColor
	end
	--Now that there are for sure no duplicates, make your teams
	local NewTeam = Instance.new('Team',Teams)
	NewTeam.Name = v.Name
	NewTeam.TeamColor = v.TeamColor.Value
	if not Settings['AutoAssignTeams'] then
		NewTeam.AutoAssignable = false
	end
	v.PurchaseHandler.Disabled = false
end

function getPlrTycoon(player)
	for i,v in pairs(script.Parent.Tycoons:GetChildren()) do
		if v:IsA("Model") then
			if v.Owner.Value == player then
				return v
			end
		end
	end
	return nil
end

game.Players.PlayerRemoving:connect(function(player)
	local plrStats = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
	if plrStats ~= nil then
		plrStats:Destroy()
	end
	local tycoon = getPlrTycoon(player)
	if tycoon then
		local backup = Tycoons[tycoon.Name]:Clone()
		tycoon:Destroy()
		wait()
		backup.Parent=script.Parent.Tycoons
	end
end)


Prompt: --- Defense

Response:
   Defense.Value = Defense1:GetAsync(Plr.UserId) or Defense.Value
	   Defense1:SetAsync(Plr.UserId, Defense.Value)
      Defense.Changed:connect(function()
	   Defense1:SetAsync(Plr.UserId, Defense.Value)
   end)


Prompt:
-- These controllers handle only walk/run movement, jumping is handled by the
-- TouchJump controller if any of these are active

Response:
local ClickToMove = require(script:WaitForChild("ClickToMoveController"))
local TouchJump = require(script:WaitForChild("TouchJump"))

local VehicleController = require(script:WaitForChild("VehicleController"))

local CONTROL_ACTION_PRIORITY = Enum.ContextActionPriority.Default.Value


Prompt: --// Weapon Parts

Response:
local L_56_ = L_1_:WaitForChild('AimPart')
local L_57_
local L_58_ = L_1_:WaitForChild('Grip')
local L_59_ = L_1_:WaitForChild('FirePart')
local L_60_
local L_61_ = L_1_:WaitForChild('Mag')
local L_62_ = L_1_:WaitForChild('Bolt')


Prompt:
--TheNexusAvenger
--Manages getting custom and centralized modules.

Response: local Resources = {}


Prompt: -- Variables

Response:
local player = Players.LocalPlayer
local character = script.Parent
local npcModel = workspace.GuideNPC
local animationController = npcModel.AnimationController
local animation = Instance.new("Animation")
local lastWavedAt = 0
local characterIsNear = false
local waveAnimationTrack


Prompt:
--	local minPosition = offsetPosition - object.Base.Size/2
--	local maxPosition = offsetPosition + object.Base.Size/2

Response:
	local minPosition = offsetPosition - worldBaseSize/2
	local maxPosition = offsetPosition + worldBaseSize/2

	local stepsX = self.BuildZone.Plot.Size.X / tileSize.X
	local stepsZ = self.BuildZone.Plot.Size.Z / tileSize.Z

	local minX = math.floor(stepsX * minPosition.X / plot.Size.X + 0.5)
	local minZ = math.floor(stepsZ * minPosition.Z / plot.Size.Z + 0.5)

	local maxX = math.floor(stepsX * maxPosition.X / plot.Size.X + 0.5)
	local maxZ = math.floor(stepsZ * maxPosition.Z / plot.Size.Z + 0.5)

	local x, z
	for x = minX, maxX-1 do
		for z = minZ, maxZ-1 do
			self.PlotGrid[x+1][z+1] = true


Prompt: -- Vars --

Response:
local Speed = 10 -- That's How Fast Your Image Spin
local Image = script.Parent -- Gets The Image


Prompt: -- Modules

Response:
local ActionManager = {}
local Actions = {}


Prompt:
--[[ INSTRUCTIONS
- Place in the model
- Make sure model is anchored
- That's it. It will weld the model and all children.

THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.

This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
]]


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

Response:
local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
local v2 = v1.PlayerModule.Get("playergui");
if v1.Settings.ForcedPortrait then
	v2.ScreenOrientation = Enum.ScreenOrientation.Portrait;
elseif v1.Settings.SupportsPortrait then
	v2.ScreenOrientation = Enum.ScreenOrientation.Sensor;
end;
local u1 = Enum.ScreenOrientation.Portrait;
local u2 = nil;
function Check()
	local l__CurrentScreenOrientation__3 = v2.CurrentScreenOrientation;
	v1.Variables.Orientation = l__CurrentScreenOrientation__3;
	v1.Variables.Portrait = l__CurrentScreenOrientation__3 == u1;
	v1.Variables.Landscape = l__CurrentScreenOrientation__3 ~= u1;
	if u2 then
		if u2 ~= l__CurrentScreenOrientation__3 then
			v1.Signal.Fire("Orientation Changed", l__CurrentScreenOrientation__3, u2);
		end;
	else
		v1.Signal.Fire("Orientation Changed", l__CurrentScreenOrientation__3, u2);
	end;
	u2 = l__CurrentScreenOrientation__3;
end;
task.defer(function()
	while true do
		Check();
		v1.Heartbeat(2);
	end;
end);


Prompt:
-- Note: DotProduct check in CoordinateFrame::lookAt() prevents using values within about
-- 8.11 degrees of the +/- Y axis, that's why these limits are currently 80 degrees

Response:
local MIN_Y = math.rad(-80)
local MAX_Y = math.rad(80)

local TOUCH_ADJUST_AREA_UP = math.rad(30)
local TOUCH_ADJUST_AREA_DOWN = math.rad(-15)

local TOUCH_SENSITIVTY_ADJUST_MAX_Y = 2.1
local TOUCH_SENSITIVTY_ADJUST_MIN_Y = 0.5

local VR_ANGLE = math.rad(15)
local VR_LOW_INTENSITY_ROTATION = Vector2.new(math.rad(15), 0)
local VR_HIGH_INTENSITY_ROTATION = Vector2.new(math.rad(45), 0)
local VR_LOW_INTENSITY_REPEAT = 0.1
local VR_HIGH_INTENSITY_REPEAT = 0.4

local ZERO_VECTOR2 = Vector2.new(0,0)
local ZERO_VECTOR3 = Vector3.new(0,0,0)

local touchSensitivityFlagExists, touchSensitivityFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserTouchSensitivityAdjust")
end)
local FFlagUserTouchSensitivityAdjust = touchSensitivityFlagExists and touchSensitivityFlagEnabled

local TOUCH_SENSITIVTY = Vector2.new(0.0045 * math.pi, 0.003375 * math.pi)
if FFlagUserTouchSensitivityAdjust then
	TOUCH_SENSITIVTY = Vector2.new(0.00945 * math.pi, 0.003375 * math.pi)
end
local MOUSE_SENSITIVITY = Vector2.new( 0.002 * math.pi, 0.0015 * math.pi )

local SEAT_OFFSET = Vector3.new(0,5,0)
local VR_SEAT_OFFSET = Vector3.new(0,4,0)
local HEAD_OFFSET = Vector3.new(0,1.5,0)
local R15_HEAD_OFFSET = Vector3.new(0, 1.5, 0)
local R15_HEAD_OFFSET_NO_SCALING = Vector3.new(0, 2, 0)
local HUMANOID_ROOT_PART_SIZE = Vector3.new(2, 2, 1)

local GAMEPAD_ZOOM_STEP_1 = 0
local GAMEPAD_ZOOM_STEP_2 = 10
local GAMEPAD_ZOOM_STEP_3 = 20

local PAN_SENSITIVITY = 20
local ZOOM_SENSITIVITY_CURVATURE = 0.5

local abs = math.abs
local sign = math.sign

local thirdGamepadZoomStepFlagExists, thirdGamepadZoomStepFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserThirdGamepadZoomStep")
end)
local FFlagUserThirdGamepadZoomStep = thirdGamepadZoomStepFlagExists and thirdGamepadZoomStepFlagEnabled

local FFlagUserPointerActionsInPlayerScripts do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserPointerActionsInPlayerScripts")
	end)
	FFlagUserPointerActionsInPlayerScripts = success and result
end

local FFlagUserNoMoreKeyboardPan do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserNoMoreKeyboardPan")
	end)
	FFlagUserNoMoreKeyboardPan = success and result
end

local fixZoomIssuesFlagExists, fixZoomIssuesFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserFixZoomClampingIssues")
end)
local FFlagUserFixZoomClampingIssues = fixZoomIssuesFlagExists and fixZoomIssuesFlagEnabled

local Util = require(script.Parent:WaitForChild("CameraUtils"))
local ZoomController = require(script.Parent:WaitForChild("ZoomController"))


Prompt: -- New ProfileStore:

Response:
function ProfileService.GetProfileStore(profile_store_index, profile_template) --> [ProfileStore]

	local profile_store_name
	local profile_store_scope = nil

	-- Parsing profile_store_index:
	if type(profile_store_index) == "string" then
		-- profile_store_index as string:
		profile_store_name = profile_store_index
	elseif type(profile_store_index) == "table" then
		-- profile_store_index as table:
		profile_store_name = profile_store_index.Name
		profile_store_scope = profile_store_index.Scope
	else
		error("[ProfileService]: Invalid or missing profile_store_index")
	end

	-- Type checking:
	if profile_store_name == nil or type(profile_store_name) ~= "string" then
		error("[ProfileService]: Missing or invalid \"Name\" parameter")
	elseif string.len(profile_store_name) == 0 then
		error("[ProfileService]: ProfileStore name cannot be an empty string")
	end

	if profile_store_scope ~= nil and (type(profile_store_scope) ~= "string" or string.len(profile_store_scope) == 0) then
		error("[ProfileService]: Invalid \"Scope\" parameter")
	end

	if type(profile_template) ~= "table" then
		error("[ProfileService]: Invalid profile_template")
	end

	local profile_store
	profile_store = {
		Mock = {
			LoadProfileAsync = function(_, profile_key, not_released_handler)
				return profile_store:LoadProfileAsync(profile_key, not_released_handler, UseMockTag)
			end,
			GlobalUpdateProfileAsync = function(_, profile_key, update_handler)
				return profile_store:GlobalUpdateProfileAsync(profile_key, update_handler, UseMockTag)
			end,
			ViewProfileAsync = function(_, profile_key)
				return profile_store:ViewProfileAsync(profile_key, UseMockTag)
			end,
			WipeProfileAsync = function(_, profile_key)
				return profile_store:WipeProfileAsync(profile_key, UseMockTag)
			end
		},

		_profile_store_name = profile_store_name,
		_profile_store_scope = profile_store_scope,
		_profile_store_lookup = profile_store_name .. "\0" .. (profile_store_scope or ""),

		_profile_template = profile_template,
		_global_data_store = nil,
		_loaded_profiles = {},
		_profile_load_jobs = {},
		_mock_loaded_profiles = {},
		_mock_profile_load_jobs = {},
		_is_pending = false,
	}
	setmetatable(profile_store, ProfileStore)

	if IsLiveCheckActive == true then
		profile_store._is_pending = true
		coroutine.wrap(function()
			WaitForLiveAccessCheck()
			if UseMockDataStore == false then
				profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope)
			end
			profile_store._is_pending = false
		end)()
	else
		if UseMockDataStore == false then
			profile_store._global_data_store = DataStoreService:GetDataStore(profile_store_name, profile_store_scope)
		end
	end

	return profile_store
end


Prompt: -- functions

Response:
REMOTES.GetDebugInfo.OnServerInvoke = function()
	if not serverRegion then
		local json	= HttpService:GetAsync("http://ip-api.com/json")
		local data	= HttpService:JSONDecode(json)

		serverRegion	= data.regionName
	end

	local info	= {
		ServerRegion	= serverRegion;
	}

	return info
end


Prompt: --Rescripted by Luckymaxer

Response:
Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

Animations = {}
Sounds = {}

ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")

ClientControl.OnClientInvoke = (function(Mode, Value)
	if Mode == "PlayAnimation" then
		for i, v in pairs(Animations) do
			if v.Animation == Value then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
		local AnimationTrack = Humanoid:LoadAnimation(Value.Animation)
		table.insert(Animations, {Animation = Value.Animation, AnimationTrack = AnimationTrack})
		AnimationTrack:Play(nil, nil, Value.Speed)
	elseif Mode == "PlaySound" then
		for i, v in pairs(Sounds) do
			if v == Value then
				table.remove(Sounds, i)
			end
		end
		table.insert(Sounds, Value)
		Value:Play()
	end
end)

function InvokeServer(Mode, Value)
	pcall(function()
		ServerControl:InvokeServer(Mode, Value)
	end)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == 0 then
		return
	end
	Mouse.Button1Down:connect(function()
		InvokeServer("MouseClick", true)
	end)
end

function Unequipped()
	for i, v in pairs(Animations) do
		if v and v.AnimationTrack then
			v.AnimationTrack:Stop()
		end
	end
	for i, v in pairs(Sounds) do
		if v then
			v:Stop()
		end
	end
	Animations = {}
	Sounds = {}
end

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


Response:
	,EnableHolster = false
	,HolsterTo = 'Torso'				 -- Put the name of the body part you wanna holster to
	,HolsterPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))

	,RightArmPos = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Server
	,LeftArmPos = CFrame.new(1.2,-0.05,-1.65) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-25))	--server

	,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
	,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))

	,RightPos = CFrame.new(-.875, -0.2, -1.25) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Client
	,LeftPos = CFrame.new(0.85, 0.5,-2.2) * CFrame.Angles(math.rad(-120),math.rad(20),math.rad(-25))	--Client
}

return Config


Prompt: --// Functions

Response:
function Weld(L_53_arg1, L_54_arg2, L_55_arg3)
	local L_56_ = Instance.new("Motor6D", L_53_arg1)
	L_56_.Part0 = L_53_arg1
	L_56_.Part1 = L_54_arg2
	L_56_.Name = L_53_arg1.Name
	L_56_.C0 = L_55_arg3 or L_53_arg1.CFrame:inverse() * L_54_arg2.CFrame
	return L_56_
end