Prompt: -- Ambient settings

Response:
	-- Morning
	morning_Brightness = 1.2
	morning_Ambient = Color3.new(75/255, 83/255, 78/255)
	morning_OutdoorAmbient = Color3.new(113/255, 128/255, 119/255)
	morning_FogColor = Color3.new(207/255, 226/255, 201/255)
	morning_FogEnd = 2500

	-- Sunset
	sunset_Brightness = 0.8
	sunset_Ambient = Color3.new(59/255,26/255,59/255)
	sunset_OutdoorAmbient = Color3.new(143/255,97/255,38/255)
	sunset_FogColor = Color3.new(191/255,126/255,15/255)
	sunset_FogEnd = 2500

	-- Night
	night_Brightness = 0
	night_Ambient = Color3.new(18/255,18/255,18/255)
	night_OutdoorAmbient = Color3.new(50/255, 55/255, 61/255)
	night_FogColor = Color3.new(5/255, 0, 13/255)
	night_FogEnd = 1500

	-- Day
	day_Brightness = 1
	day_Ambient = Color3.new(162/255, 162/255, 162/255)
	day_OutdoorAmbient = Color3.new(162/255, 162/255, 162/255)
	day_FogColor = Color3.new(122/255, 234/255, 244/255)
	day_FogEnd = 4000

local l = game:service("Lighting")
lights = game.Workspace:FindFirstChild("Lights")

function turnLights(lightswitch)
	local lamps = lights:GetChildren()
	for i = 1, #lamps do
		if lamps[i]:FindFirstChild("Case") then
			if lamps[i]:FindFirstChild("Case"):FindFirstChild("Light") then
				lamps[i]:FindFirstChild("Case"):FindFirstChild("Light").Enabled = lightswitch
			end
		end
	end
end

function fadeAmbient(startval, endval, duration)
	for i = 1, duration do
		local setR = startval.r + ((endval.r-startval.r)/duration)*i
		local setG = startval.g + ((endval.g-startval.g)/duration)*i
		local setB = startval.b + ((endval.b-startval.b)/duration)*i
		l.Ambient = Color3.new(setR, setG, setB)
		wait(0.05)
	end
end
function fadeOutdoorAmbient(startval, endval, duration)
	for i = 1, duration do
		local setR = startval.r + ((endval.r-startval.r)/duration)*i
		local setG = startval.g + ((endval.g-startval.g)/duration)*i
		local setB = startval.b + ((endval.b-startval.b)/duration)*i
		l.OutdoorAmbient = Color3.new(setR, setG, setB)
		wait(0.05)
	end
end
function fadeFogColor(startval, endval, duration, fogstart, fogreach)
	for i = 1, duration do
		local setR = startval.r + ((endval.r-startval.r)/duration)*i
		local setG = startval.g + ((endval.g-startval.g)/duration)*i
		local setB = startval.b + ((endval.b-startval.b)/duration)*i
		l.FogColor = Color3.new(setR, setG, setB)
		l.FogEnd = fogstart + ((fogreach-fogstart)/duration)*i
		wait(0.06)
	end
	l.FogEnd = fogreach
end

timeOfDay = "Day"
timeEffectsSettled = "Setup"
while true do

	if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
		l:setMinutesAfterMidnight(l:getMinutesAfterMidnight()+dayspeed)
		wait(0.1)
	elseif (l:GetMinutesAfterMidnight() <= ot) or (l:GetMinutesAfterMidnight() >= ct) then
		l:setMinutesAfterMidnight(l:getMinutesAfterMidnight()+nightspeed)
		wait(0.1)
	end
	tod = string.sub(l.TimeOfDay, 1, 2)
	if tod == "17" then
		timeOfDay = "sunset"
	end
	if (l:GetMinutesAfterMidnight() >= morning_time2) and (l:GetMinutesAfterMidnight() <= sunset_time1) then
		timeOfDay = "Day"
	elseif (l:GetMinutesAfterMidnight() >= night_time1) and (l:GetMinutesAfterMidnight() <= 1440) or
		 (l:GetMinutesAfterMidnight() >= 0) and (l:GetMinutesAfterMidnight() <= night_time2) then
		timeOfDay = "Night"
	elseif (l:GetMinutesAfterMidnight() >= morning_time1) and (l:GetMinutesAfterMidnight() <= morning_time2) then
		timeOfDay = "Morning"
	elseif (l:GetMinutesAfterMidnight() >= sunset_time1) and (l:GetMinutesAfterMidnight() <= sunset_time2) then
		timeOfDay = "Sunset"
	end

	coroutine.resume(coroutine.create(function()  end))

	if timeEffectsSettled ~= timeOfDay then
		if timeOfDay == "Day" then
			turnLights(false)
			l.FogStart = 1000
			local duration = 200
			coroutine.resume(coroutine.create(function() fadeAmbient(l.Ambient, day_Ambient, duration) end))
			coroutine.resume(coroutine.create(function() fadeOutdoorAmbient(l.OutdoorAmbient, day_OutdoorAmbient, duration) end))
			coroutine.resume(coroutine.create(function() fadeFogColor(l.FogColor, day_FogColor, duration, l.FogEnd, day_FogEnd) end))

		elseif timeOfDay == "Night" then
			turnLights(true)
			l.FogStart = 0
			local duration = 200
			coroutine.resume(coroutine.create(function() fadeAmbient(l.Ambient, night_Ambient, duration) end))
			coroutine.resume(coroutine.create(function() fadeOutdoorAmbient(l.OutdoorAmbient, night_OutdoorAmbient, duration) end))
			coroutine.resume(coroutine.create(function() fadeFogColor(l.FogColor, night_FogColor, duration, l.FogEnd, night_FogEnd) end))

		elseif timeOfDay == "Morning" then
			turnLights(false)
			l.FogStart = 600
			duration = 150
			coroutine.resume(coroutine.create(function() fadeAmbient(l.Ambient, morning_Ambient, duration) end))
			coroutine.resume(coroutine.create(function() fadeOutdoorAmbient(l.OutdoorAmbient, morning_OutdoorAmbient, duration) end))
			coroutine.resume(coroutine.create(function() fadeFogColor(l.FogColor, morning_FogColor, duration, l.FogEnd, morning_FogEnd) end))

		elseif timeOfDay == "Sunset" then
			turnLights(true)
			l.FogStart = 200
			duration = 240
			coroutine.resume(coroutine.create(function() fadeAmbient(l.Ambient, sunset_Ambient, duration) end))
			coroutine.resume(coroutine.create(function() fadeOutdoorAmbient(l.OutdoorAmbient, sunset_OutdoorAmbient, duration) end))
			coroutine.resume(coroutine.create(function() fadeFogColor(l.FogColor, sunset_FogColor, duration, l.FogEnd, sunset_FogEnd) end))
		end
		timeEffectsSettled = timeOfDay
	end
end


Prompt:
--[[
	Updates the value stored in this State object.

	If `force` is enabled, this will skip equality checks and always update the
	state object and any dependents - use this with care as this can lead to
	unnecessary updates.
]]

Response:
function class:set(newValue: any, force: boolean?)
	-- if the value hasn't changed, no need to perform extra work here
	if self._value == newValue and not force then
		return
	end

	self._value = newValue

	-- update any derived state objects if necessary
	updateAll(self)
end

local function State(initialValue: any)
	local self = setmetatable({
		type = "State",
		kind = "State",
		-- if we held strong references to the dependents, then they wouldn't be
		-- able to get garbage collected when they fall out of scope
		dependentSet = setmetatable({}, WEAK_KEYS_METATABLE),
		_value = initialValue
	}, CLASS_METATABLE)

	initDependency(self)

	return self
end

return State


Prompt: -- ok?  probably not if running on a 32-bit int Lua number type platform

Response:
function M.tobit(x)
  return x % 2^32
end

M.cast = M.tobit

M.bxor = make_bitop {[0]={[0]=0,[1]=1},[1]={[0]=1,[1]=0}, n=4}
local bxor = M.bxor

function M.bnot(a)   return MODM - a end
local bnot = M.bnot

function M.band(a,b) return ((a+b) - bxor(a,b))/2 end
local band = M.band

function M.bor(a,b)  return MODM - band(MODM - a, MODM - b) end
local bor = M.bor

local lshift, rshift -- forward declare

function M.rshift(a,disp) -- Lua5.2 insipred
  if disp < 0 then return lshift(a,-disp) end
  return floor(a % 2^32 / 2^disp)
end
rshift = M.rshift

function M.lshift(a,disp) -- Lua5.2 inspired
  if disp < 0 then return rshift(a,-disp) end
  return (a * 2^disp) % 2^32
end
lshift = M.lshift

function M.tohex(x, n) -- BitOp style
  n = n or 8
  local up
  if n <= 0 then
    if n == 0 then return '' end
    up = true
    n = - n
  end
  x = band(x, 16^n-1)
  return ('%0'..n..(up and 'X' or 'x')):format(x)
end
local tohex = M.tohex

function M.extract(n, field, width) -- Lua5.2 inspired
  width = width or 1
  return band(rshift(n, field), 2^width-1)
end
local extract = M.extract

function M.replace(n, v, field, width) -- Lua5.2 inspired
  width = width or 1
  local mask1 = 2^width-1
  v = band(v, mask1) -- required by spec?
  local mask = bnot(lshift(mask1, field))
  return band(n, mask) + lshift(v, field)
end
local replace = M.replace

function M.bswap(x)  -- BitOp style
  local a = band(x, 0xff); x = rshift(x, 8)
  local b = band(x, 0xff); x = rshift(x, 8)
  local c = band(x, 0xff); x = rshift(x, 8)
  local d = band(x, 0xff)
  return lshift(lshift(lshift(a, 8) + b, 8) + c, 8) + d
end
local bswap = M.bswap

function M.rrotate(x, disp)  -- Lua5.2 inspired
  disp = disp % 32
  local low = band(x, 2^disp-1)
  return rshift(x, disp) + lshift(low, 32-disp)
end
local rrotate = M.rrotate

function M.lrotate(x, disp)  -- Lua5.2 inspired
  return rrotate(x, -disp)
end
local lrotate = M.lrotate

M.rol = M.lrotate  -- LuaOp inspired
M.ror = M.rrotate  -- LuaOp insipred

function M.arshift(x, disp) -- Lua5.2 inspired
  local z = rshift(x, disp)
  if x >= 0x80000000 then z = z + lshift(2^disp-1, 32-disp) end
  return z
end
local arshift = M.arshift

function M.btest(x, y) -- Lua5.2 inspired
  return band(x, y) ~= 0
end


Prompt: -- ROBLOX deviation: expected does not have string | RegExp type annotation

Response:
function formatReceived(
	label: string,
	thrown: Thrown, -- ROBLOX FIXME: narrowing | nil,
	key: string,
	expected: any -- ROBLOX FIXME: narrowing string | RegExp
)
	if thrown == nil then
		return ""
	end

	if key == "message" then
		local message = thrown.message

		if typeof(expected) == "string" then
			local index = message:find(expected)

			if index then
				return label .. printReceivedStringContainExpectedSubstring(message, index, #expected) .. "\n"
			end
		elseif getType(expected) == "regexp" then
			-- ROBLOX deviation: we don't check for expected.exec being a function
			-- since all RegExp polyfill instances have this function defined
			return label .. printReceivedStringContainExpectedResult(message, expected:exec(message)) .. "\n"
		end

		return label .. printReceived(message) .. "\n"
	end

	if key == "name" then
		if thrown.isError then
			return label .. printReceived(thrown.value.name) .. "\n"
		else
			return ""
		end
	end

	if key == "value" then
		if thrown.isError then
			return ""
		else
			return label .. printReceived(thrown.value) .. "\n"
		end
	end

	return ""
end

function formatStack(thrown: Thrown) -- ROBLOX FIXME: narrowing | nil)
	if thrown == nil or not thrown.isError then
		return ""
	else
		return formatStackTrace(thrown.value.stack)
	end
end

return {
	createMatcher = createMatcher,
	matchers = matchers,
}


Prompt:
--[[*
 * Expose "picomatch"
 ]]

Response: return picomatch


Prompt: --Green Liquid--

Response:
local function GEAR_EFFECT_SERVER(gear_server_functions, effect_data)
	local GSF = gear_server_functions
	local ED = effect_data

	--Effect variables
	local EV = {}

	--Server effect functions

	--Server effect object functions
	local function Start()
		EV["StartTime"] = tick()

	end

	local function Update() --"return false" to destroy gear effect object

		return true
	end

	local function Stop()
		EV = nil
	end

	return {Start, Update, Stop}
end

return GEAR_EFFECT_SERVER


Prompt: --Also, we need a way to force a debounce on the destination teleporter

Response:
script.Parent.ForceSetBusy.Event:connect(function()
	if (isBusy) then return end
	glowPart.Transparency = 1
	indicator.BrickColor = BrickColor.new("Really red")
	isBusy = true
	wait(7.5)
	glowPart.Transparency = 0
	indicator.BrickColor = BrickColor.new("Lime green")
	isBusy = false
end)


Prompt:
--[=[
	Destroys the ClientComm object.
]=]

Response:
function ClientComm:Destroy() end

return ClientComm


Prompt: --[[Run]]

Response:
	--Print Version
	local ver=require(car["A-Chassis Tune"].README)
	print("//INSPARE: AC6 Loaded - Build "..ver)

	--Runtime Loops

	-- ~60 c/s
	game["Run Service"].Stepped:connect(function()
		--Steering
		Steering()

		--RPM
		RPM()

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

	-- ~15 c/s
	while wait(.0667) do
		--Power
		Engine()

		--Flip
		if _Tune.AutoFlip then Flip() end
	end


Prompt:
--[=[
	Constructs a new Signal that wraps around an RBXScriptSignal.

	@param rbxScriptSignal RBXScriptSignal -- Existing RBXScriptSignal to wrap
	@return Signal

	For example:
	```lua
	local signal = Signal.Wrap(workspace.ChildAdded)
	signal:Connect(function(part) print(part.Name .. " added") end)
	Instance.new("Part").Parent = workspace
	```
]=]

Response:
function Signal.Wrap(rbxScriptSignal)
	assert(
		typeof(rbxScriptSignal) == "RBXScriptSignal",
		"Argument #1 to Signal.Wrap must be a RBXScriptSignal; got " .. typeof(rbxScriptSignal)
	)
	local signal = Signal.new()
	signal._proxyHandler = rbxScriptSignal:Connect(function(...)
		signal:Fire(...)
	end)
	return signal
end


Prompt:
-- Deprecated in favour of GetMessageModeTextButton
-- Retained for compatibility reasons.

Response:
function methods:GetMessageModeTextLabel()
	return self:GetMessageModeTextButton()
end

function methods:IsFocused()
	-- Temporary hack while reparenting is necessary.
	if not self.GuiObject:IsDescendantOf(game) then
		if self.LastFocusedState then
			return self.LastFocusedState.Focused
		end
	end
	return self:GetTextBox():IsFocused()
end

function methods:GetVisible()
	return self.GuiObject.Visible
end

function methods:CaptureFocus()
	self:GetTextBox():CaptureFocus()
end

function methods:ReleaseFocus(didRelease)
	self:GetTextBox():ReleaseFocus(didRelease)
end

function methods:ResetText()
	self:GetTextBox().Text = ""
end

function methods:SetText(text)
	self:GetTextBox().Text = text
end

function methods:GetEnabled()
	return self.GuiObject.Visible
end

function methods:SetEnabled(enabled)
	self.GuiObject.Visible = enabled
end

function methods:SetTextLabelText(text)
	self.TextLabel.Text = text
end

function methods:SetTextBoxText(text)
	self.TextBox.Text = text
end

function methods:GetTextBoxText()
	return self.TextBox.Text
end

function methods:ResetSize()
	self.TargetYSize = 0
	self:TweenToTargetYSize()
end

function methods:CalculateSize()
	local lastPos = self.GuiObject.Size
	self.GuiObject.Size = UDim2.new(1, 0, 0, 1000)

	local textSize = self.TextBox.TextSize
	local bounds = self.TextBox.TextBounds.Y

	self.GuiObject.Size = lastPos

	local newTargetYSize = bounds - textSize
	if (self.TargetYSize ~= newTargetYSize) then
		self.TargetYSize = newTargetYSize
		self:TweenToTargetYSize()
	end

end

function methods:TweenToTargetYSize()
	local endSize = UDim2.new(1, 0, 1, self.TargetYSize)
	local curSize = self.GuiObject.Size

	local curAbsoluteSizeY = self.GuiObject.AbsoluteSize.Y
	self.GuiObject.Size = endSize
	local endAbsoluteSizeY = self.GuiObject.AbsoluteSize.Y
	self.GuiObject.Size = curSize

	local pixelDistance = math.abs(endAbsoluteSizeY - curAbsoluteSizeY)
	local tweeningTime = math.min(1, (pixelDistance * (1 / self.TweenPixelsPerSecond))) -- pixelDistance * (seconds per pixels)

	local success = pcall(function() self.GuiObject:TweenSize(endSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, tweeningTime, true) end)
	if (not success) then
		self.GuiObject.Size = endSize
	end
end

function methods:SetTextSize(textSize)
	if not self:IsInCustomState() then
		if self.TextBox then
			self.TextBox.TextSize = textSize
		end
		if self.TextLabel then
			self.TextLabel.TextSize = textSize
		end
	end
end

function methods:GetDefaultChannelNameColor()
	if ChatSettings.DefaultChannelNameColor then
		return ChatSettings.DefaultChannelNameColor
	end
	return Color3.fromRGB(35, 76, 142)
end

function methods:SetChannelTarget(targetChannel)
	local messageModeTextButton = self.GuiObjects.MessageModeTextButton
	local textBox = self.TextBox
	local textLabel = self.TextLabel

	self.TargetChannel = targetChannel

	if not self:IsInCustomState() then
		if targetChannel ~= ChatSettings.GeneralChannelName then
			messageModeTextButton.Size = UDim2.new(0, 1000, 1, 0)
			messageModeTextButton.Text = string.format("[%s] ", targetChannel)

			local channelNameColor = self:GetChannelNameColor(targetChannel)
			if channelNameColor then
				messageModeTextButton.TextColor3 = channelNameColor
			else
				messageModeTextButton.TextColor3 = self:GetDefaultChannelNameColor()
			end

			local xSize = messageModeTextButton.TextBounds.X
			messageModeTextButton.Size = UDim2.new(0, xSize, 1, 0)
			textBox.Size = UDim2.new(1, -xSize, 1, 0)
			textBox.Position = UDim2.new(0, xSize, 0, 0)
			textLabel.Size = UDim2.new(1, -xSize, 1, 0)
			textLabel.Position = UDim2.new(0, xSize, 0, 0)
		else
			messageModeTextButton.Text = ""
			messageModeTextButton.Size = UDim2.new(0, 0, 0, 0)
			textBox.Size = UDim2.new(1, 0, 1, 0)
			textBox.Position = UDim2.new(0, 0, 0, 0)
			textLabel.Size = UDim2.new(1, 0, 1, 0)
			textLabel.Position = UDim2.new(0, 0, 0, 0)
		end
	end
end

function methods:IsInCustomState()
	return self.InCustomState
end

function methods:ResetCustomState()
	if self.InCustomState then
		self.CustomState:Destroy()
		self.CustomState = nil
		self.InCustomState = false

		self.ChatBarParentFrame:ClearAllChildren()
		self:CreateGuiObjects(self.ChatBarParentFrame)
		self:SetTextLabelText('To chat click here or press "/" key')
	end
end

function methods:GetCustomMessage()
	if self.InCustomState then
		return self.CustomState:GetMessage()
	end
	return nil
end

function methods:CustomStateProcessCompletedMessage(message)
	if self.InCustomState then
		return self.CustomState:ProcessCompletedMessage()
	end
	return false
end


Response:
local tool = script.Parent
local player = game.Players.LocalPlayer
while player.Character == nil do wait() end
local char = player.Character
while char:FindFirstChild("Humanoid") == nil do wait() end
local hum = char:FindFirstChild("Humanoid")
local rs = char:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")
local ls = char:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")

local enabled = true
local equipped = false
local ischarging = false
tool.Equipped:connect(function(mouse)
	equipped = true
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		if not enabled then return end
		if hum == nil then return end
		if hum.Health <= 0 then return end
		if mouse == nil then return end
		if not ischarging then
			if mouse.Hit ~= nil then
				ischarging = true
				script.Parent.ChargeProjectile:FireServer()
			end
		elseif ischarging then
			ischarging = false
			enabled = false
			script.Parent.ReleaseProjectile:FireServer(mouse.Hit.p)
			mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
			wait(RELOAD_TIME)
			mouse.Icon = "rbxasset://textures\\GunCursor.png"
			enabled = true
		end
	end)
end)

tool.Unequipped:connect(function(mouse)
	equipped = false
	ischarging = false
end)


Prompt: --Sets the current frame.

Response:
function ControllerGroups:SetSelectedFrame(NewFrame)
	if LastActiveGroup and ControllerConnected() and LastActiveGroup:FrameInGroup(NewFrame) then
		LastFrame = NewFrame
		GuiService.SelectedObject = NewFrame
		UpdateActiveButton()
	end
end


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

Response:
return {
	Name = "var",
	Aliases = {},
	Description = "Gets a stored variable.",
	Group = "DefaultUtil",
	AutoExec = { "alias \"init-edit|Edit your initialization script\" edit ${var init} \\\\\n && var= init ||", "alias \"init-edit-global|Edit the initialization script for all users\" edit ${var $init} \\\\\n && var= $init ||", "alias \"init-run|Re-runs the initialization script manually.\" run-lines ${var init} && run-lines ${var $init}", "init-run" },
	Args = { {
			Type = "storedKey",
			Name = "Key",
			Description = "The key to get, retrieved from your user data store. Keys prefixed with . are not saved. Keys prefixed with $ are game-wide. Keys prefixed with $. are game-wide and non-saved."
		} },
	ClientRun = function(p1, p2)
		p1:GetStore("vars_used")[p2] = true;
	end
};


Prompt: -- Libraries

Response:
local ListenForManualWindowTrigger = require(Tool.Core:WaitForChild('ListenForManualWindowTrigger'))
local Roact = require(Vendor:WaitForChild('Roact'))
local ColorPicker = require(UI:WaitForChild('ColorPicker'))


Prompt: --Sam

Response:
local rap = script.Parent.RightArmParts:GetChildren()
local lap = script.Parent.LeftArmParts:GetChildren()
local rlp = script.Parent.RightLegParts:GetChildren()
local llp = script.Parent.LeftLegParts:GetChildren()
local hp = script.Parent.HeadParts:GetChildren()
local tp = script.Parent.TorsoParts:GetChildren()

function WELDY(table, weldTo)
	local w2 = Instance.new("Weld")
	w2.Parent = script.Parent.Torso
	w2.Part0 = w2.Parent
	w2.C0 = CFrame.new()
	w2.Part1 = script.Parent.Head
	w2.C1 = CFrame.new(0, -1.5, 0)
	for i = 1, #table do
		if table[i]:IsA("BasePart") then
			local w = Instance.new("Weld")
			w.Parent = weldTo
			w.Part0 = w.Parent
			w.C0 = weldTo.CFrame:inverse()
			w.Part1 = table[i]
			w.C1 = table[i].CFrame:inverse()
			w.Part1.Anchored = false
		end
	end
	weldTo.Anchored = false
	for i = 1, #table do
		if table[i]:IsA("BasePart") then
			table[i].Anchored = false
		end
	end
	weldTo.Anchored = false
end

function CFRAMEIT(table, weldTo)
	for i = 1, #table do
		if table[i]:IsA("BasePart") then
			local cf = table[i].CFrame
			local v = Instance.new("CFrameValue")
			v.Name = "CF"
			v.Value = cf
			v.Parent = table[i]
		end
	end
	local v = Instance.new("CFrameValue")
	v.Name = "CF"
	v.Value = weldTo.CFrame
	v.Parent = weldTo
end

function WELDIT(table, weldTo)
	if not weldTo:findFirstChild("CF") then
		WELDY(table, weldTo)
	elseif weldTo:findFirstChild("CF") then
		for i = 1, #table do
			if table[i]:IsA("BasePart") then
				local w = Instance.new("Weld")
				w.Parent = weldTo
				w.Part0 = w.Parent
				w.C0 = weldTo.CF.Value:inverse()
				w.Part1 = table[i]
				w.C1 = table[i].CF.Value:inverse()
				table[i].Anchored = false
			end
		end
		weldTo.Anchored = false
	end
end

function weld(t, weldTo)
WELDIT(t, weldTo)
end

weld(rap, script.Parent["Right Arm"])
weld(lap, script.Parent["Left Arm"])
weld(rlp, script.Parent["Right Leg"])
weld(llp, script.Parent["Left Leg"])
weld(tp, script.Parent["Torso"])
weld(hp, script.Parent["Head"])


Prompt: -- ROBLOX deviation: omitted external type NewPlugin

Response:
local PrettyFormat = require(Packages.PrettyFormat)
type Config = PrettyFormat.Config
type Printer = PrettyFormat.Printer
type Refs = PrettyFormat.Refs

local function serialize(
	val: any,
	config: Config,
	indentation: string,
	depth: number,
	refs: Refs,
	printer: Printer
): string
	-- Serialize a non-default name, even if config.printFunctionName is false.
	local name = val.getMockName()
	local nameString = ""
	if name == "jest.fn()" then
		nameString = ""
	else
		nameString = " " .. name
	end

	local callsString = ""
	if #val.mock.calls ~= 0 then
		local indentationNext = indentation .. config.indent
		callsString = " {"
			.. config.spacingOuter
			.. indentationNext
			.. '"calls": '
			.. printer(val.mock.calls, config, indentationNext, depth, refs)

		if config.min then
			callsString = callsString .. ", "
		else
			callsString = callsString .. ","
		end

		callsString = callsString
			.. config.spacingOuter
			.. indentationNext
			.. '"results": '
			.. printer(val.mock.results, config, indentationNext, depth, refs)

		if not config.min then
			callsString = callsString .. ","
		end

		callsString = callsString .. config.spacingOuter .. indentation .. "}"
	end

	return "[MockFunction" .. nameString .. "]" .. callsString
end

local function test(val: any): boolean
	-- ROBLOX deviation: add a table check to prevent access errors on non-tables
	return val and typeof(val) == "table" and val._isMockFunction
end

return {
	serialize = serialize,
	test = test,
}


Prompt:
-- Smooth Interpolation Curve Generator
-- @author Validark
-- @original https://github.com/gre/bezier-easing
-- 		Copyright (c) 2014 Gaëtan Renaudeau, MIT License (see bottom for full license)
-- @testsite http://cubic-bezier.com/
-- @testsite http://greweb.me/bezier-easing-editor/example/


Prompt:
--- Returns a new CommandContext, an object which is created for every command validation.
-- This is also what's passed as the context to the "Run" functions in commands

Response:
function Command.new (options)
	local self = {
		Dispatcher = options.Dispatcher; -- The dispatcher that created this command context
		Cmdr = options.Dispatcher.Cmdr; -- A quick reference to Cmdr for command context
		Name = options.CommandObject.Name; -- The command name (not alias)
		RawText = options.Text; -- The raw text used to trigger this command
		Object = options.CommandObject; -- The command object (definition)
		Group = options.CommandObject.Group; -- The group this command is in
		State = {}; -- A table which will hold any custom command state information
		Aliases = options.CommandObject.Aliases;
		Alias = options.Alias; -- The command name that was used
		Description = options.CommandObject.Description;
		Executor = options.Executor; -- The player who ran the command
		ArgumentDefinitions = options.CommandObject.Args; -- The argument definitions from the command definition
		RawArguments = options.Arguments; -- Array of strings which are the unparsed values for the arguments
		Arguments = {}; -- A table which will hold ArgumentContexts for each argument
		Data = options.Data; -- A special container for any additional data the command needs to collect from the client
		Response = nil; -- Will be set at the very end when the command is run and a string is returned from the Run function.
	}

	setmetatable(self, Command)

	return self
end


Prompt: --Casts the mouse's position to 3D space.

Response:
local function Get3DPosition(X,Y)
	local MouseRay = Camera:ScreenPointToRay(X,Y,1000)
	local EndPos = MouseRay.Origin + MouseRay.Direction
	return CastRay(Camera.CFrame.p,(EndPos - Camera.CFrame.p).unit,1000)
end


Response:
while true do
Puerta1.BodyVelocity.velocity = Vector3.new(0, 0, -0.5)
Puerta2.BodyVelocity.velocity = Vector3.new(0, 0, 0.5)
wait(8)
Puerta1.BodyVelocity.velocity = Vector3.new(0, 0, 0)
Puerta2.BodyVelocity.velocity = Vector3.new(0, 0, 0)
break
end


Prompt:
--[[
Creats a beam between two parts.
--]]

Response:
local function JoinPartsAtOffset(Part1,Part2,Offset1,Offset2,Rotation,Width1,Width2)
	--Create the attachments.
	local Attachment1 = Instance.new("Attachment")
	Attachment1.Position = Offset1
	Attachment1.Orientation = Rotation
	Attachment1.Parent = Part1

	local Attachment2 = Instance.new("Attachment")
	Attachment2.Position = Offset2
	Attachment2.Orientation = Rotation
	Attachment2.Parent = Part2

	--Create the beam.
	local Beam = Instance.new("Beam")
	Beam.Color = ColorSequence.new(Part1.Color,Part2.Color)
	Beam.Transparency = NumberSequence.new(Part1.Transparency,Part2.Transparency)
	Beam.LightInfluence = 1
	Beam.Attachment0 = Attachment1
	Beam.Attachment1 = Attachment2
	Beam.Width0 = Width1
	Beam.Width1 = Width2
	Beam.Parent = Part1
end


Prompt: --functions

Response:
function coverdown()
	shutter.TextLabel.Visible = false
	shutter:TweenPosition(UDim2.new(0, 0,0.525, 0), "Out", "Sine", 1, true)
end

function coverup()
	shutter:TweenPosition(UDim2.new(0, 0,0.145, 0), "Out", "Sine", 1, true)
	shutter.TextLabel.Visible = true
end

function menuoneappear()
	for _,v in pairs(machine.ToppingsOne:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = true
		end
	end
	machine.ToppingsOne.Header.Visible = true
end

function menutwoappear()
	for _,v in pairs(machine.ToppingsTwo:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = true
		end
	end
	machine.ToppingsTwo.Header.Visible = true
end

function menuonedisappear()
	for _,v in pairs(machine.ToppingsOne:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = false
		end
	end
	machine.ToppingsOne.Header.Visible = false
end

function menutwodisappear()
	for _,v in pairs(machine.ToppingsTwo:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = false
		end
	end
	machine.ToppingsTwo.Header.Visible = false
end


Prompt: --[===[ DO NOT edit ANYTHING below! ]===]

Response:
local isOn = false

script.Parent.ClickDetector.MouseClick:connect(function(Player)
	local Character = Player.Character

	Character.Animate.Disabled = true

	wait()

	local root = Character.HumanoidRootPart:findFirstChild("RootJoint") and Character.HumanoidRootPart.RootJoint:Clone()
	local neck = Character.Torso:findFirstChild("Neck") and Character.Torso.Neck:Clone()
	local lshoulder = Character.Torso:findFirstChild("Left Shoulder") and Character.Torso["Left Shoulder"]:Clone()
	local rshoulder = Character.Torso:findFirstChild("Right Shoulder") and Character.Torso["Right Shoulder"]:Clone()
	local lhip = Character.Torso:findFirstChild("Left Hip") and Character.Torso["Left Hip"]:Clone()
	local rhip = Character.Torso:findFirstChild("Right Hip") and Character.Torso["Right Hip"]:Clone()

	Character.Torso.Size = Character.Torso.Size * size
	Character.HumanoidRootPart.Size = Character.HumanoidRootPart.Size * size
	Character.Head.Size = Character.Head.Size * size

	root.Parent = Character.HumanoidRootPart
	root.Part0 = Character.HumanoidRootPart
	root.Part1 = Character.Torso
	root:SetDesiredAngle(0)

	neck.Parent = Character.Torso
	neck.Part0 = Character.Torso
	neck.Part1 = Character.Head
	neck.C0 = CFrame.new(0, 1 * size, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	neck.C1 = CFrame.new(0, -0.5 * size, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	neck:SetDesiredAngle(0)

	--Go through each child of the player character
	for _,child in pairs(Character:GetChildren()) do
		--If it's a hat or accessory, delete it
		if child:IsA("Accessory") or child:IsA("Hat") then
			child:Destroy()
		--If it's a basepart
		elseif child:IsA("BasePart") then
			--Left shoulder
			if child.Name == "Left Arm" then
				child.Size = child.Size *  size
				lshoulder.Parent = Character.Torso
				lshoulder.Part0 = Character.Torso
				lshoulder.Part1 = child
				lshoulder.C0 = CFrame.new(-1 * size, 0.5 * size, 0, -0, 0, -1, 0, 1, 0, 1, 0, -0)
				lshoulder.C1 = CFrame.new(0.5 * size, 0.5 * size, 0, -0, 0, -1, 0, 1, 0, 1, 0, -0)
				lshoulder:SetDesiredAngle(0)
			--Right shoulder
			elseif child.Name == "Right Arm" then
				child.Size = child.Size *  size
				rshoulder.Parent = Character.Torso
				rshoulder.Part0 = Character.Torso
				rshoulder.Part1 = child
				rshoulder.C0 = CFrame.new(1 * size, 0.5 * size, 0, -0, 0, 1, -0, 1, 0, -1, 0, -0)
				rshoulder.C1 = CFrame.new(-0.5 * size, 0.5 * size, 0, -0, 0, 1, 0, 1, 0, -1, 0, -0)
				rshoulder:SetDesiredAngle(0)
			--Left hip
			elseif child.Name == "Left Leg" then
				child.Size = child.Size *  size
				lhip.Parent = Character.Torso
				lhip.Part0 = Character.Torso
				lhip.Part1 = child
				lhip.C0 = CFrame.new(-1 * size, -1 * size, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
				lhip.C1 = CFrame.new(-0.5 * size, 1 * size, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
				lhip:SetDesiredAngle(0)
			--Right shoulder
			elseif child.Name == "Right Leg" then
				child.Size = child.Size *  size
				rhip.Parent = Character.Torso
				rhip.Part0 = Character.Torso
				rhip.Part1 = child
				rhip.C0 = CFrame.new(1 * size, -1 * size, 0, 0, 0, 1, -0, 1, 0, -1, 0, 0)
				rhip.C1 = CFrame.new(0.5 * size, 1 * size, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
				rhip:SetDesiredAngle(0)
			end
		end
	end

	Character.Animate.Disabled = false
end)


Prompt: --[[Running Logic]]

Response:
--
local equipped = false
local rayparts = {}
local ColorChoices = {BrickColor.new('Really red'),BrickColor.new('Lime green'),BrickColor.new('Toothpaste')}
local StartOffset = {Vector3.new(-.45,0,0),Vector3.new(0,0,0),Vector3.new(.45,0,0)}
local oldC0 =nil
local nweld


Prompt: -- 2450^2 voxels @ 4 studs/voxel is the default size

Response:
local _mapSize = Conf.map_size or (2450 * 4)
local _minimapWidth = Conf.minimap_width or 0.3
local _minimapHeight = Conf.minimap_height or 0.3
local _worldmapWidth = Conf.worldmap_width or 0.9
local _worldmapHeight = Conf.worldmap_height or 0.9
local _isCurrentlyMinimap = true

function MinimapGui.updateStormIndicator(pos, radius, targetPos, targetRadius)
	_stormData = {
		pos = pos,
		radius = radius,
		targetPos = targetPos,
		targetRadius = targetRadius,
	}
end

local function _UpdateStormIndicators(pos, radius, targetPos, targetRadius)
	if not _stormIndicator then
		return
	end

	-- Current storm
	local mapSize = _map.Size
	local mapPos = _map.Position
	_stormIndicator.Position = UDim2.new(0, pos.X / _mapSize * mapSize.X.Offset + mapPos.X.Offset,
										 0, pos.Z / _mapSize * mapSize.Y.Offset + mapPos.Y.Offset)

	local uiScale = radius * 2 / _mapSize
	_stormIndicator.Size = UDim2.new(0, uiScale * mapSize.X.Offset,
									 0, uiScale * mapSize.Y.Offset)

	-- Storm fillers (outside current storm)
	if _stormIndicator.Size.X.Offset <= 0 then
		_stormFiller.Size = UDim2.new(0, 1, 0, 1)
	end
	-- Add new outerStormFillers if current largest one doesn't cover the map
	local largestOuterStormFiller = _outerStormFillers[#_outerStormFillers]
	while largestOuterStormFiller.AbsoluteSize.X < _mapFrame.AbsoluteSize.X * 3 or largestOuterStormFiller.AbsoluteSize.Y < _mapFrame.AbsoluteSize.Y * 3 do
		local newOuterStormFiller = largestOuterStormFiller:Clone()
		newOuterStormFiller.Parent = largestOuterStormFiller
		table.insert(_outerStormFillers, newOuterStormFiller)
		largestOuterStormFiller = newOuterStormFiller
	end

	-- Storm destination
	_stormTargetIndicator.Position = UDim2.new(0, targetPos.X / _mapSize * mapSize.X.Offset + mapPos.X.Offset,
											   0, targetPos.Z / _mapSize * mapSize.Y.Offset + mapPos.Y.Offset)
	uiScale = targetRadius * 2 / _mapSize
	_stormTargetIndicator.Size = UDim2.new(0, -uiScale * mapSize.X.Offset,
										   0, -uiScale * mapSize.Y.Offset)

	_stormIndicator.Visible = true
	_stormTargetIndicator.Visible = true
	_stormFiller.Visible = true
	for _, outerStormFiller in ipairs(_outerStormFillers) do
		outerStormFiller.Visible = true
	end
end

local function _updateMapFocus()
	if _isCurrentlyMinimap then
		local character = Util.getClientFocus()

		if not character or not character.PrimaryPart then
			return
		end

		local root = character.PrimaryPart
		local pos = root.Position

		-- Update focus point
		_mapView.focus_x = pos.X
		_mapView.focus_y = pos.Z
	else
		-- Set focus point to middle of map for worldmap view
		_mapView.focus_x = _mapSize / 2
		_mapView.focus_y = _mapSize / 2
	end

	-- Panning/scaling of viewport/map
	-- Note:  We use Offsets here to maintain the correct aspect ratio for the map inside the map frame (which may be arbitrarily sized)
	-- TODO:  Currently this assumes a square map
	_map.Size = UDim2.new(0, _mapFrame.AbsoluteSize.X * _mapView.scale,
						  0, _mapFrame.AbsoluteSize.X * _mapView.scale)

	-- Get the viewport position of the map focus point and adjust the map position accordingly.
	local relativeFocus = Vector2.new(_mapView.focus_x / _mapSize,
									  _mapView.focus_y / _mapSize)

	_map.Position = UDim2.new(0, _mapFrame.AbsoluteSize.X * 0.5 - _map.Size.X.Offset * relativeFocus.X,
							  0, _mapFrame.AbsoluteSize.Y * 0.5 - _map.Size.Y.Offset * relativeFocus.Y)
end

local function _Update(dt)
	_updateMapFocus()

	for tag, icon in pairs(_mapTags) do
		local count = 0

		for i, model in ipairs(CollectionService:GetTagged(tag)) do
			if model.PrimaryPart then
				-- TODO:  May need an actual unique identifier
				local indicator = _mapIndicators[tag][i]

				if not indicator then
					indicator = icon:Clone()

					-- Set color of deliveryVehicle indicator to team color if there are teams
					if string.sub(model.Name, 1, 15) == "DeliveryVehicle" then
						if tonumber(string.sub(model.Name, 16)) == nil then
							indicator.ImageTransparency = 1
						elseif Conf.num_teams > 0 then
							indicator.ImageColor3 = Conf.team_colors[tonumber(string.sub(model.Name, 16))]
						end
					end

					-- Set color of all players on team to team color if there are teams
					if Conf.num_teams > 0 and model:FindFirstChildOfClass("Humanoid") ~= nil then
						indicator.ImageColor3 = Conf.team_colors[PlayerMatchInfo.GetField(Players:GetPlayerFromCharacter(model), "teamNumber")]
					end

					indicator.Parent = _mapFrame
					_mapIndicators[tag][i] = indicator
				end

				indicator.Visible = true

				local root = model.PrimaryPart
				local pos = root.Position
				local partCFrame = root.CFrame

				local mapSize = _map.Size
				local mapPos = _map.Position

				-- NOTE: We determine whether the forward vector for this part should be its look or up vectors by checking LookVector against up
				-- .That vector is then flattened along the x/y plane and normalized
				-- .The angle is calculated, converted into degrees, and used to rotate the indicator

				local forward = Vector3.new(partCFrame.LookVector.X, 0, partCFrame.LookVector.Z).Unit
				local lookDot = partCFrame.LookVector:Dot(_unitUp)

				if math.abs(lookDot) > 0.5 then
					forward = Vector3.new(partCFrame.UpVector.X, 0, partCFrame.UpVector.Z).Unit
				end

				local rotation = math.acos(forward:Dot(_unitForward)) * 57.2958

				if forward:Dot(_unitRight) < 0 then
					rotation = 360 - rotation
				end

				indicator.Position = UDim2.new(0, pos.X / _mapSize * mapSize.X.Offset + mapPos.X.Offset,
											   0, pos.Z / _mapSize * mapSize.Y.Offset + mapPos.Y.Offset)

				-- HACK:  This extra inversion and 180 degree rotation could probably be factored out, but it was taking more time than appropriate to fix.
				indicator.Rotation = 360 - (rotation + 180) % 360

				--
				count = count + 1
			end
		end

		-- Destroy any unused indicators based on count
		local existingIndicatorCount = #_mapIndicators[tag]

		if count < existingIndicatorCount then
			for i = count, existingIndicatorCount do
				local indicator = _mapIndicators[tag][i]

				if indicator then
					indicator:Destroy()
				end

				_mapIndicators[tag][i] = nil
			end
		end
	end

	--
	if _stormData then
		_UpdateStormIndicators(_stormData.pos, _stormData.radius, _stormData.targetPos, _stormData.targetRadius)
	end
end

local function toggleMap()
	if _isCurrentlyMinimap then -- change to worldmap
		_mapFrame.Size = UDim2.new(_worldmapWidth, 0, _worldmapHeight, 0)
		_mapFrame.AnchorPoint = Vector2.new(0.5, 0.5)
		_mapFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
		_mapView.scale = _worldmapZoom
		_isCurrentlyMinimap = false
	else -- change to minimap
		_mapFrame.Size = UDim2.new(_minimapWidth, 0, _minimapHeight, 0)
		_mapFrame.AnchorPoint = Vector2.new(1, 0)
		_mapFrame.Position = UDim2.new(1, 0, 0, 0)
		_mapView.scale = _minimapZoom
		_isCurrentlyMinimap = true
	end

	return _isCurrentlyMinimap
end

local function onInputBegan(input, gameProcessed)
	if not gameProcessed and input.KeyCode == Enum.KeyCode.M or input.KeyCode == Enum.KeyCode.DPadUp then
		toggleMap()
	end
end

function MinimapGui.start(teamDividingAngle)
	while not _setupFinished do
		wait()
	end

	MinimapGui.addMapTag("DeliveryVehicle", "Bus")
	MinimapGui.addMapTag(Util._clientFocusTag, "LocalPlayerLocation")
	MinimapGui.addMapTag("Player")
	MinimapGui.addMapTag("Vehicle", "VehicleLocation")

	ToggleMapEvent.OnInvoke = toggleMap

	UserInputService.InputBegan:Connect(onInputBegan)

	RunService:BindToRenderStep("Minimap", Enum.RenderPriority.Last.Value, _Update)

	_isCurrentlyMinimap = false
	toggleMap() -- ensures minimap size + position + anchor will be the same regardless of values set in studio

	_mapFrame.Visible = true
	if Conf.num_teams == 2 and teamDividingAngle ~= nil then
		local xCoord = math.cos(math.rad(teamDividingAngle)) * dividingLineLength / 2
		local yCoord = math.sin(math.rad(teamDividingAngle)) * dividingLineLength / 2
		for i, dot in ipairs(_teamDividingDots) do
			dot.Position = UDim2.new(0.5 + xCoord - 2 * xCoord * ((i - 1) / (numTeamDividingDots - 1)), 0, 0.5 + yCoord - 2 * yCoord * ((i - 1) / (numTeamDividingDots - 1)), 0)
			dot.Visible = true
		end
	end

	EnableToggleMapButtonEvent:Fire(true, _isCurrentlyMinimap)
end

function MinimapGui.addMapTag(tag, icon)
	local tagIndicatorTemplate

	if not icon then
		tagIndicatorTemplate = _playerIndicator

	elseif type(icon) == "string" then
		tagIndicatorTemplate = _mapFrame:FindFirstChild(icon) or _playerIndicator

	else
		tagIndicatorTemplate = icon
	end

	_mapTags[tag] = tagIndicatorTemplate

	if not _mapIndicators[tag] then
		_mapIndicators[tag] = {}
	else
		-- TODO:  Handle possibly switching to a different icon
	end
end

function MinimapGui.removeMapTag(tag)
	local indicators = _mapIndicators[tag]

	if indicators then
		for _, icon in ipairs(indicators) do
		end
	end
end

local function onCharacterAdded(character)
	if not PlayerMatchInfo.GetField(Players.LocalPlayer, "didJump") then
		local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")

		local container = ReplicatedStorage.Assets.GuiObjects.minimap:Clone()
		container.ResetOnSpawn = false

		_mapFrame = container:WaitForChild("mapframe")
		_mapFrame.Size = UDim2.new(_minimapWidth, 0, _minimapHeight, 0)

		_map = _mapFrame:WaitForChild("map")
		_playerIndicator = _mapFrame:WaitForChild("PlayerLocation")
		_stormIndicator = _mapFrame:WaitForChild("StormIndicator")
		_stormTargetIndicator = _mapFrame:WaitForChild("StormTargetIndicator")
		_stormFiller = _stormIndicator:WaitForChild("StormFiller")
		table.insert(_outerStormFillers, _stormFiller:WaitForChild("OuterStormFiller"))

		table.insert(_teamDividingDots, _map:WaitForChild("TeamDividingDot"))
		for i = 1, (numTeamDividingDots - 1) do
			local newDot = _teamDividingDots[1]:Clone()
			newDot.Parent = _map
			table.insert(_teamDividingDots, newDot)
		end

		-- Hide minimap since match hasn't started yet
		_playerIndicator.Visible = false
		_stormIndicator.Visible = false
		_stormTargetIndicator.Visible = false
		_stormFiller.Visible = false
		for _, outerStormFiller in ipairs(_outerStormFillers) do
			outerStormFiller.Visible = false
		end
		for _, dot in ipairs(_teamDividingDots) do
			dot.Visible = false
		end
		_mapFrame.Visible = false

		container.Enabled = true
		container.Parent = PlayerGui
		_setupFinished = true
	elseif not _isCurrentlyMinimap then
		-- Make sure map is mini when player respawns
		toggleMap()
	end
end

function MinimapGui.isCurrentlyMinimap()
	return _isCurrentlyMinimap
end

function MinimapGui.isEnabled()
	return _mapFrame and _mapFrame.Visible
end

if Players.LocalPlayer.Character then
	onCharacterAdded(Players.LocalPlayer.Character)
end
Players.LocalPlayer.CharacterAdded:Connect(onCharacterAdded)


Prompt:
--			-- Go through each valid target to see if within field of view and if there is
--			-- clear line of sight. Field of view treated as wedge in front of character.
--			for _, character in pairs(characters) do
--				local toTarget = (character.HumanoidRootPart.Position - model.HumanoidRootPart.Position)
--				toTarget = Vector3.new(toTarget.X, 0, toTarget.Z)
--				local angle = math.acos(toTarget:Dot(model.HumanoidRootPart.CFrame.lookVector)/toTarget.magnitude)
--				if math.deg(angle) < configs["FieldOfView"]/2 then
--					ZombieTarget = character
--					-- raycast to see if target is actually visible
--					local toTarget = Ray.new(model.HumanoidRootPart.Position, (ZombieTarget.HumanoidRootPart.Position - model.HumanoidRootPart.Position))
--					local part, position = game.Workspace:FindPartOnRayWithIgnoreList(toTarget, zombies)
--					if part and part.Parent == ZombieTarget then
--						return true
--					end
--					ZombieTarget = nil
--				end
--			end

Response:
		end
		return false
	end
	CanSeeTarget.TransitionState = PursueState

	-- TargetDead: Check if target is dead.
	local TargetDead = StateMachine.NewCondition()
	TargetDead.Name = "TargetDead"
	TargetDead.Evaluate = function()
		if ZombieTarget and ZombieTarget.Humanoid then
			return ZombieTarget.Humanoid.Health <= 0
		end
		return true
	end
	TargetDead.TransitionState = IdleState

	-- GotDamaged: Check if NPC has taken damage
	local lastHealth = model.Humanoid.Health
	local GotDamaged = StateMachine.NewCondition()
	GotDamaged.Name = "GotDamaged"
	GotDamaged.Evaluate = function()
		if model then
			if lastHealth > model.Humanoid.Health then
				return true
			end
		end
		return false
	end
	GotDamaged.TransitionState = SearchState

	-- GotBored: Used to provide random state change.
	local GotBored = StateMachine.NewCondition()
	GotBored.Name = "GotBored"
	GotBored.Evaluate = function()
		local now = os.time()
		if now - lastBored > configs["BoredomDuration"] then
			local roll = math.random()
			if roll < configs["ChanceOfBoredom"] then
				lastBored = now
				if GotBored.TransitionState == SearchState then
					GotBored.TransitionState = IdleState
				else
					GotBored.TransitionState = SearchState
				end
				return true
			end
		end
		return false
	end
	GotBored.TransitionState = IdleState

	-- LostTarget: Checks clear line of sight
	local LostTarget = StateMachine.NewCondition()
	LostTarget.Name = "LostTarget"
	LostTarget.Evaluate = function()
		if true then return false end
		if ZombieTarget then
			if (ZombieTarget.HumanoidRootPart.Position - model.HumanoidRootPart.Position).magnitude > 10 then
				local toTarget = Ray.new(model.HumanoidRootPart.Position, (ZombieTarget.HumanoidRootPart.Position - model.HumanoidRootPart.Position))
				local part, position = game.Workspace:FindPartOnRay(toTarget, model)
				if not part or part.Parent ~= ZombieTarget  then
					--print("Lost target!")
					ZombieTargetLastLocation = ZombieTarget.HumanoidRootPart.Position
					ZombieTarget = nil
					return true
				end
			end
		end
		return false
	end
	LostTarget.TransitionState = HuntState

	local WithinRange = StateMachine.NewCondition()
	WithinRange.Name = "WithinRange"
	WithinRange.Evaluate = function()
		if ZombieTarget then
			local distance = (model.HumanoidRootPart.Position - ZombieTarget.HumanoidRootPart.Position).magnitude
			if distance < configs["AttackRange"] then
				--print("Within attack range!")
				return true
			end
		end
		return false
	end
	WithinRange.TransitionState = AttackState

	local OutsideRange = StateMachine.NewCondition()
	OutsideRange.Name = "OutsideRange"
	OutsideRange.Evaluate = function()
		if ZombieTarget then
			local distance = (model.HumanoidRootPart.Position - ZombieTarget.HumanoidRootPart.Position).magnitude
			if distance > configs["AttackRange"] then
				--print("Outside attack range!")
				return true
			end
		end
		return false
	end
	OutsideRange.TransitionState = PursueState

	table.insert(IdleState.Conditions, CanSeeTarget)
	table.insert(IdleState.Conditions, GotDamaged)
	table.insert(IdleState.Conditions, GotBored)

	table.insert(SearchState.Conditions, GotBored)
	table.insert(SearchState.Conditions, CanSeeTarget)

	table.insert(PursueState.Conditions, LostTarget)
	table.insert(PursueState.Conditions, WithinRange)
	table.insert(PursueState.Conditions, TargetDead)

	table.insert(AttackState.Conditions, OutsideRange)
	table.insert(AttackState.Conditions, TargetDead)

	table.insert(HuntState.Conditions, GotBored)
	table.insert(HuntState.Conditions, CanSeeTarget)

	-- Setup arms damage
	local canHit = true
	local lastHit = os.time()
	local function handleHit(other)
		if canHit then
			if other and other.Parent and other.Parent.Name ~= "Drooling Zombie" and other.Parent:FindFirstChild("Humanoid") then
				local enemy = other.Parent
				if enemy.Humanoid.WalkSpeed > 0 then
					enemy.Humanoid.Health = enemy.Humanoid.Health - configs["Damage"]
					canHit = false
				end
			end
		else
			local now = os.time()
			if now - lastHit > configs["DamageCooldown"] then
				lastHit = now
				canHit = true
			end
		end
	end
	local leftHitConnect, rightHitConnect
	leftHitConnect = model:FindFirstChild("Left Arm").Touched:connect(handleHit)
	rightHitConnect = model:FindFirstChild("Right Arm").Touched:connect(handleHit)

	--ZombieAI.Animate(model)
	--updateDisplay()
	--updateDisplay(model.BillboardGui.TextLabel, StateMachine.CurrentState)
	local thread = coroutine.create(function()
		while true do
			wait()
			-- calculate repulsion force

			local humanoids = HumanoidList:GetCurrent()
			local localZombies = {}
			for _, humanoid in pairs(humanoids) do
				if humanoid and humanoid ~= model.Humanoid and humanoid.Parent and humanoid.Parent:FindFirstChild("HumanoidRootPart") then
					local torso = humanoid.Parent:FindFirstChild("HumanoidRootPart")
					local distance = (model.HumanoidRootPart.Position - torso.Position).magnitude
					if distance <= 2.5 then
						table.insert(localZombies, torso.Position)
					end
				end
			end
			local repulsionDirection = AIUtilities:GetRepulsionVector(model.HumanoidRootPart.Position, localZombies)
			if repulsionDirection.magnitude > 0 then
				--print("replusion direction: " .. tostring(repulsionDirection))
			end
			model.HumanoidRootPart.RepulsionForce.force = repulsionDirection

			if StateMachine.CurrentState and model.Configurations.Debug.Value then
				model.BillboardGui.TextLabel.Visible = true
				model.BillboardGui.TextLabel.Text = StateMachine.CurrentState.Name
			end
			if not model.Configurations.Debug.Value then
				model.BillboardGui.TextLabel.Visible = false
			end
		end
	end)
	coroutine.resume(thread)

	StateMachine.SwitchState(IdleState)

	zombie.Stop = function()
		StateMachine.SwitchState(nil)
	end

	return zombie
end

return ZombieAI


Prompt: -- Copied from Grimgold Periastron Beta

Response:
local Tool = script.Parent
local Sword = Tool.Handle

local vCharacter
local myTorso
local myHumanoid

local equipped = false

local debris = game:GetService("Debris")

function tagHumanoid(humanoid, player)
	if humanoid then
		local creatorTag = Instance.new("ObjectValue")
		creatorTag.Value = player
		creatorTag.Name = "creator"
		creatorTag.Parent = humanoid
		debris:AddItem(creatorTag, 1)
	end
end

function cut(hit)
	local humanoid
	local vPlayer
	if hit and hit.Parent and myHumanoid then
		if hit.Parent.className == "Hat" then
			humanoid = hit.Parent.Parent:FindFirstChild("Humanoid")
		else
			humanoid = hit.Parent:FindFirstChild("Humanoid")
		end
		vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
		if humanoid ~= nil and humanoid ~= myHumanoid then
			tagHumanoid(humanoid, vPlayer)
			humanoid:TakeDamage(7.)
		end
	end
end

function onEquipped()
	vCharacter = Tool.Parent
	myTorso = vCharacter:FindFirstChild("Torso")
	myHumanoid = vCharacter:FindFirstChild("Humanoid")
end

Tool.Equipped:connect(onEquipped)

Sword.Touched:connect(cut)


Prompt: -- ROBLOX deviation: expected does not have Error type annotation

Response:
function toThrowExpectedObject(
	matcherName: string,
	options: JestMatcherUtils.MatcherHintOptions,
	thrown: Thrown | nil,
	expected: Error
): SyncExpectationResult
	local pass = thrown ~= nil and thrown.message == expected.message

	local message
	if pass then
		message = function()
			local retval = matcherHint(matcherName, nil, nil, options)
				.. "\n\n"
				.. formatExpected("Expected message: never ", expected.message)

			if thrown ~= nil and thrown.hasMessage and not thrown.value["$$robloxInternalJestError"] then
				retval = retval .. formatStack(thrown)
			else
				retval = retval .. formatReceived("Received value:         ", thrown, "message") .. formatStack(thrown)
			end

			return retval
		end
	else
		message = function()
			local retval = matcherHint(matcherName, nil, nil, options) .. "\n\n"

			if thrown == nil then
				retval = retval .. formatExpected("Expected message: ", expected.message) .. "\n" .. DID_NOT_THROW
			else
				if thrown.hasMessage and not thrown.value["$$robloxInternalJestError"] then
					retval = retval
						.. printDiffOrStringify(
							expected.message,
							thrown.message,
							"Expected message",
							"Received message",
							true
						)
						.. "\n"
						.. formatStack(thrown)
				else
					retval = retval
						.. formatExpected("Expected message: ", expected.message)
						.. formatReceived("Received value:   ", thrown, "message")
						.. formatStack(thrown)
				end
			end

			return retval
		end
	end

	return { message = message, pass = pass }
end


Prompt: --Leonlai Fog Script. :D

Response:
game.Lighting.FogStart = 10
game.Lighting.FogEnd = 120
game.Lighting.FogColor = Color3.new(0,0,0)
game.Lighting.TimeOfDay = "00:00"


Prompt:
--[=[
	@return ... any
	@yields

	Yields the current thread until the signal is fired, and returns the arguments fired from the signal.
	Yielding the current thread is not always desirable. If the desire is to only capture the next event
	fired, using `Once` might be a better solution.
	```lua
	task.spawn(function()
		local msg, num = signal:Wait()
		print(msg, num) --> "Hello", 32
	end)
	signal:Fire("Hello", 32)
	```
]=]

Response:
function Signal:Wait()
	local waitingCoroutine = coroutine.running()
	local connection
	local done = false
	connection = self:Connect(function(...)
		if done then
			return
		end
		done = true
		connection:Disconnect()
		task.spawn(waitingCoroutine, ...)
	end)
	return coroutine.yield()
end


Prompt: --[[Weight Scaling]]

Response:
	--[Cubic stud : pounds ratio]
	--[STANDARDIZED: Don't touch unless needed]
	Tune.WeightScaling = 1/50	--Default = 1/50 (1 cubic stud = 50 lbs)
	Tune.LegacyScaling = 1/10	--Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF]

return Tune


Prompt: --TimeSensor--

Response:
TurnOn = 19
TurnOff = 7
On = false
while wait(10) do
    if game.Lighting.ClockTime >= TurnOn then
        if not On then
            On = true
            script.Parent.Flicker.On.Value = true
        end
    elseif game.Lighting.ClockTime >= TurnOff then
        if On then
            On = false
            script.Parent.Flicker.On.Value = false
        end
    end
end