Prompt: -- ROBLOX deviation: returning a function to be able to re-execute the module in tests

Response:
return function()
	type unknown = any --[[ ROBLOX FIXME: adding `unknown` type alias to make it easier to use Luau unknown equivalent when supported ]]
	local CurrentModule = script.Parent
	local Packages = CurrentModule.Parent
	local LuauPolyfill = require(Packages.LuauPolyfill)
	local Array = LuauPolyfill.Array
	local Object = LuauPolyfill.Object
	local String = LuauPolyfill.String
	local Symbol = LuauPolyfill.Symbol

	local Promise = require(Packages.Promise)

	local exports = {}

	-- ROBLOX deviation: fs not necessary
	-- local fs = require(Packages["graceful-fs"])
	local typesModule = require(Packages.JestTypes)
	type Config_ConfigGlobals = typesModule.Config_ConfigGlobals
	local createProcessObject = require(script.Parent.createProcessObject).default
	local deepCyclicCopy = require(script.Parent.deepCyclicCopy).default

	local DTRACE = Array.filter(Object.keys(_G), function(key)
		return typeof(key) == "string" and String.startsWith(key, "DTRACE")
	end)

	exports.default =
		function(globalObject: typeof(_G), globals: Config_ConfigGlobals): typeof(_G) & Config_ConfigGlobals
			-- ROBLOX deviation: added self to be able to bind DTRACE functions
			local self = globalObject
			globalObject.process = createProcessObject()
			-- Keep a reference to some globals that Jest needs
			Object.assign(globalObject, {
				-- ROBLOX deviation START: not making props readonly
				-- ROBLOX FIXME: have to cast element to `any` to avoid type narrowing issue
				[Symbol.for_("jest-native-promise")] = Promise :: any,
				[Symbol.for_("jest-native-now")] = DateTime.now,
				-- ROBLOX deviation END
				-- ROBLOX deviation START: skipped fs related globals
				-- [Symbol.for_("jest-native-read-file")] = {
				-- 	enumerable = false,
				-- 	value = fs.readFileSync:bind(fs),
				-- 	writable = false,
				-- },
				-- [Symbol.for_("jest-native-write-file")] = {
				-- 	enumerable = false,
				-- 	value = fs.writeFileSync:bind(fs),
				-- 	writable = false,
				-- },
				-- [Symbol.for_("jest-native-exists-file")] = {
				-- 	enumerable = false,
				-- 	value = fs.existsSync:bind(fs),
				-- 	writable = false,
				-- },
				-- ROBLOX deviation END
				-- ROBLOX deviation START: not making props readonly
				["jest-symbol-do-not-touch"] = Symbol,
				-- ROBLOX deviation END
			})

			-- Forward some APIs.
			Array.forEach(DTRACE, function(dtrace)
				-- @ts-expect-error: no index
				globalObject[dtrace] = function(_self, ...: any)
					local args = { ... }
					-- @ts-expect-error: no index
					return _G[dtrace](self, table.unpack(args))
				end
			end)
			return Object.assign(globalObject, deepCyclicCopy(globals))
		end
	return exports
end


Prompt:
--[=[
	@within TableUtil
	@function Flat
	@param tbl table
	@param depth number?
	@return table

	Returns a new table where all sub-arrays have been
	bubbled up to the top. The depth at which the scan
	is performed is dictated by the `depth` parameter,
	which is set to `1` by default.

	```lua
	local t = {{10, 20}, {90, 100}, {30, 15}}
	local flat = TableUtil.Flat(t)
	print(flat) --> {10, 20, 90, 100, 30, 15}
	```

	:::note Arrays only
	This function works on arrays, but not dictionaries.
]=]

Response:
local function Flat(tbl: Table, depth: number?): Table
	local maxDepth: number = if type(depth) == "number" then depth else 1
	local flatTbl = table.create(#tbl)
	local function Scan(t: Table, d: number)
		for _,v in ipairs(t) do
			if type(v) == "table" and d < maxDepth then
				Scan(v, d + 1)
			else
				table.insert(flatTbl, v)
			end
		end
	end
	Scan(tbl, 0)
	return flatTbl
end


Prompt: -- See if I have a tool

Response:
local spawner = script.Parent
local tool = nil
local region = Region3.new(Vector3.new(spawner.Position.X - spawner.Size.X/2, spawner.Position.Y + spawner.Size.Y/2, spawner.Position.Z - spawner.Size.Z/2),
   Vector3.new(spawner.Position.X + spawner.Size.X/2, spawner.Position.Y + 4, spawner.Position.Z + spawner.Size.Z/2))
local parts = game.Workspace:FindPartsInRegion3(region)
for _, part in pairs(parts) do
	if part and part.Parent and part.Parent:IsA("Tool") then
		tool = part.Parent
		break
	end
end

local configTable = spawner.Configurations
local configs = {}
local function loadConfig(configName, defaultValue)
	if configTable:FindFirstChild(configName) then
		configs[configName] = configTable:FindFirstChild(configName).Value
	else
		configs[configName] = defaultValue
	end
end

loadConfig("SpawnCooldown", 5)

if tool then
	tool.Parent = game.ServerStorage

	while true do
		-- put tool on pad
		local toolCopy = tool:Clone()
		local handle = toolCopy:FindFirstChild("Handle")
		toolCopy.Parent = game.Workspace
		local toolOnPad = true
		local parentConnection
		parentConnection = toolCopy.AncestryChanged:connect(function()
			if handle then handle.Anchored = false end
			toolOnPad = false
			parentConnection:disconnect()
		end)
		if handle then
			handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
			handle.Anchored = true
		end
		-- wait for tool to be removed
		while toolOnPad do
			if handle then
				handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
			end
			wait()
		end

		-- wait for cooldown
		wait(configs["SpawnCooldown"])
	end

end


Prompt: --- Recalculate the window height

Response:
function Window:UpdateWindowHeight()
	local windowHeight = LINE_HEIGHT

	for _, child in pairs(Gui:GetChildren()) do
		if child:IsA("GuiObject") then
			windowHeight = windowHeight + child.Size.Y.Offset
		end
	end

	Gui.CanvasSize = UDim2.new(Gui.CanvasSize.X.Scale, Gui.CanvasSize.X.Offset, 0, windowHeight)
	Gui.Size =
		UDim2.new(
		Gui.Size.X.Scale,
		Gui.Size.X.Offset,
		0,
		windowHeight > WINDOW_MAX_HEIGHT and WINDOW_MAX_HEIGHT or windowHeight
	)

	Gui.CanvasPosition = Vector2.new(0, math.clamp(windowHeight - 300, 0, math.huge))
end


Response:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Text = game:GetService("TextService")

local AvatarEditor = ReplicatedStorage.AvatarEditor
local remoteEvent = AvatarEditor.RemoteEvent
local Promise = require(AvatarEditor.Shared.Util.Promise)
local Maid = require(AvatarEditor.Shared.Util.Maid)
local Signal = require(AvatarEditor.Shared.Util.Signal)
local TableUtil = require(AvatarEditor.Shared.Util.TableUtil)
local QueryMap = require(AvatarEditor.Shared.QueryMap)
local Colors = require(AvatarEditor.Shared.Colors)
local Settings = require(AvatarEditor.Shared.Settings)
local GetProductInfo = require(AvatarEditor.Shared.GetProductInfo)
local UserCanUse = require(AvatarEditor.Shared.UserCanUse)

local outfitCache = {}
local settingsCache = {}

local module = {}
module.HumanoidDescriptionChanged = Signal.new()
module.CostumeAdded = Signal.new()
module.CostumeRemoved = Signal.new()
module.CostumeUpdated = Signal.new() -- TODO update outfit
module.SettingChanged = Signal.new()
module.PermissionFailed = Signal.new()

local function filterText(text, player)
	return Promise.new(function(resolve, reject)
		local success, result = pcall(function()
			return Text:FilterStringAsync(text, player.UserId)
		end)
		if success then
			resolve(result)
		else
			reject(result)
		end
	end)
	:andThen(function(textFilterResult)
		return Promise.new(function(resolve, reject)
			local success, result = pcall(function()
				-- hopefully this appeases the roblox gods
				return textFilterResult:GetNonChatStringForUserAsync(player.UserId)
			end)
			if success then
				resolve(result)
			else
				reject(result)
			end
		end)
	end)
end

local function getHumanoid(player)
	local character = player.Character
	local humanoid = character and character:FindFirstChildWhichIsA("Humanoid")
	if humanoid and humanoid.Health > 0 then
		return humanoid
	end
end

local function getHumanoidDescriptionFromUserId(userId)
	return Promise.new(function(resolve, reject)
		local success, result = pcall(function()
			return Players:GetHumanoidDescriptionFromUserId(userId)
		end)
		if success then
			resolve(result)
		else
			reject(result)
		end
	end)
end

local function applyDescriptionToHumanoid(humanoid, description)
	return Promise.new(function(resolve, reject)
		local success, result = pcall(function()
			humanoid:ApplyDescription(description)
		end)
		if success then
			resolve(success)
		else
			reject(result)
		end
	end)
end

local function applyDescriptionToPlayer(player, description)
	module.HumanoidDescriptionChanged:Fire(player, description)

	local humanoid = getHumanoid(player)
	if not humanoid then
		return Promise.reject()
	end

	return applyDescriptionToHumanoid(humanoid, description)
end

local function descriptionUpdated(player, ...)
	remoteEvent:FireClient(player, ...)
end

local function accessory(player, id)
	assert(typeof(id) == "number")

	local humanoid = getHumanoid(player)
	if not humanoid then
		return
	end

	local description = humanoid:GetAppliedDescription()
	if not description then
		return
	end

	GetProductInfo(id)
	:andThen(function(productInfo)
		local assetType = QueryMap.GetOptionName("AssetType", productInfo.AssetTypeId)
		if not assetType then
			return
		end

		-- really Roblox...??
		if assetType == "Hat" then
			assetType = "HatAccessory"
		elseif assetType == "ShoulderAccessory" then
			assetType = "ShouldersAccessory"
		end

		if string.find(assetType, "Accessory") then
			local accessories = string.split(description[assetType], ",")
			local index = table.find(accessories, tostring(productInfo.AssetId))
			if index then
				table.remove(accessories, index)
			elseif #humanoid:GetAccessories() < Settings.MAX_ACCESSORIES then
				table.insert(accessories, tostring(productInfo.AssetId))
			else
				-- TODO should probably notify the client
			end
			description[assetType] = table.concat(accessories, ",")
		else
			if description[assetType] == 0 or (description[assetType] ~= productInfo.AssetId) then
				description[assetType] = productInfo.AssetId
			else
				-- https://devforum.roblox.com/t/default-shirt-and-pants-to-be-applied-if-the-requested-ones-are-unavailable-moderated/381818
				-- force load default clothes. hacky
				-- hopefully there will never be a shirt or pants with id = 1 or 2
				description[assetType] = (assetType == "Shirt") and 1 or (assetType == "Pants") and 2 or 0
			end
		end

		applyDescriptionToPlayer(player, description)
		:andThenCall(descriptionUpdated, player, "accessory")
	end)
	:catch(warn)
end

local function tone(player, index)
	assert(typeof(index) == "number")

	local humanoid = getHumanoid(player)
	if not humanoid then
		return
	end

	local description = humanoid:GetAppliedDescription()
	if not description then
		return
	end

	index = math.clamp(index, 1, 75)

	local color = Colors[index]
	if color then
		description.HeadColor = color
		description.LeftArmColor = color
		description.LeftLegColor = color
		description.RightArmColor = color
		description.RightLegColor = color
		description.TorsoColor = color
	end

	applyDescriptionToPlayer(player, description)
	:doneCall(descriptionUpdated, player, "tone")
	:catch(warn)
end

local function reset(player)
	local humanoid = getHumanoid(player)
	if not humanoid then
		return
	end

	getHumanoidDescriptionFromUserId(player.UserId)
	:andThen(function(description)
		return applyDescriptionToPlayer(player, description)
	end)
	:doneCall(descriptionUpdated, player, "reset")
	:catch(warn)
end

local function scale(player, scaleName, value)
	assert(typeof(scaleName) == "string")
	assert(typeof(value) == "number")

	local humanoid = getHumanoid(player)
	if not humanoid then
		return
	end

	local description = humanoid:GetAppliedDescription()
	if not description then
		return
	end

	if scaleName == "HeightScale" then
		value = math.clamp(value, 0.9, 1.05)
	elseif scaleName == "WidthScale" then
		value = math.clamp(value, 0.7, 1)
	elseif scaleName == "HeadScale" then
		value = math.clamp(value, 0.95, 1)
	elseif scaleName == "ProportionScale" then
		value = math.clamp(value, 0, 1)
	elseif scaleName == "BodyTypeScale" then
		value = math.clamp(value, 0, 1)
	else
		return
	end

	Promise.new(function(resolve, reject)
		local success, result = pcall(function()
			description[scaleName] = value
		end)
		if success then
			resolve(success)
		else
			reject(result)
		end
	end)
	:andThenCall(applyDescriptionToPlayer, player, description)
	:doneCall(descriptionUpdated, player, "scale", scaleName, value)
	:catch(warn)
end

local function create(player, name)
	assert(typeof(name) == "string")

	if name == "" then
		return
	end
	name = string.gsub(name, "[%p%s]+", "")

	local cache = outfitCache[player]
	if not cache then
		return
	end

	if #cache.Costumes >= Settings.MAX_COSTUME then
		return
	end

	local humanoid = getHumanoid(player)
	if not humanoid then
		return
	end

	local description = humanoid:GetAppliedDescription()
	if not description then
		return
	end

	local info = module:ToAppearanceInfo(description)
	filterText(name, player)
	:andThen(function(result)
		info.Name = result

		-- converting it back to a HumanoidDescription for the client to use the filtered name
		local descriptionCopy = module:ToHumanoidDescription(info)
		descriptionCopy.Parent = cache.Folder
		table.insert(cache.Costumes, info)
		local index = #cache.Costumes
		cache.Map[description] = index

		module.CostumeAdded:Fire(player, descriptionCopy, info, index)
	end)
	:catch(warn)
end

local function delete(player, description)
	assert(typeof(description) == "Instance" and description:IsA("HumanoidDescription"))

	local cache = outfitCache[player]
	if not cache then
		return
	end

	local humanoid = getHumanoid(player)
	if not humanoid then
		return
	end

	if description:IsDescendantOf(cache.Folder) then
		local index = cache.Map[description]
		cache.Map[description] = nil
		description:Destroy()
		module.CostumeRemoved:Fire(player, description, cache.Costumes[index], index)
	end
end


Prompt: -- Remote Functions Server -> Client. (WARNING: This should only be used for info that is not sensitive as this can be hacked by the client.)


Prompt: --[[Transmission]]

Response:
	Tune.TransModes		={"Auto", "Semi"}												--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch

		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}
		>First mode is default mode													]]

	--Automatic Settings
	Tune.AutoShiftMode	= "RPM"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)

	--Gear Ratios
	Tune.FinalDrive		= 3.20			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.42		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.75		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.38		,
		--[[ 3 ]]		1.72		,
		--[[ 4 ]]		1.34		,
		--[[ 5 ]]		1.11		,
		--[[ 6 ]]		.78			,
	}
	Tune.FDMult			= 1			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)


Prompt: -- Overrides the current weather with a new one. this is purley the visual side.

Response:
WeatherPrompt.OnClientEvent:Connect(function(WeatherInfo)

	local Skip = coroutine.wrap(function()

		local tweenInfo = TweenInfo.new(
			10, -- Time
			Enum.EasingStyle.Linear, -- EasingStyle
			Enum.EasingDirection.Out -- EasingDirection
		)

		local tween = TweenService:Create(game.Lighting, tweenInfo, WeatherInfo["LightingSettings"])

		tween:Play()
	end)

	Skip()

end)


Prompt: -- Compiled with roblox-ts v2.1.0

Response:
local TS = require(game:GetService("ReplicatedStorage"):WaitForChild("rbxts_include"):WaitForChild("RuntimeLib"))
local Log = TS.import(script, game:GetService("ReplicatedStorage"), "rbxts_include", "node_modules", "@rbxts", "log", "out").default
local _components = TS.import(script, game:GetService("ReplicatedStorage"), "TS", "components")
local Body = _components.Body
local NPC = _components.NPC
local Wants = _components.Wants
local function customer(world, _)
	for id, wants in world:queryChanged(Wants) do
		if not wants.old and wants.new then
			Log.Info("v Wants " .. (tostring(id) .. (" | " .. (tostring(wants.new.product.amount) .. ("x " .. wants.new.product.product)))))
			task.delay(1, function()
				if not world:contains(id) then
					return nil
				end
				local npc = world:get(id, NPC)
				local _result = world:get(id, Body)
				if _result ~= nil then
					_result = _result.model
				end
				local body = _result
				if not npc or not body then
					Log.Error("No NPC or Body component for customer")
					return nil
				end
				body.DialogGui.DialogFrame.DialogText.Text = "I want " .. (tostring(wants.new.product.amount) .. ("x " .. wants.new.product.product))
				body.DialogGui.Enabled = true
			end)
		end
		if wants.old and wants.new then
			Log.Info("x Wants " .. (tostring(id) .. (" | " .. (tostring(wants.new.product.amount) .. ("x " .. wants.new.product.product)))))
			if not world:contains(id) then
				return nil
			end
			local npc = world:get(id, NPC)
			local _result = world:get(id, Body)
			if _result ~= nil then
				_result = _result.model
			end
			local body = _result
			if not npc or not body then
				Log.Error("No NPC or Body component for customer")
				continue
			end
			body.DialogGui.DialogFrame.DialogText.Text = "I want " .. (tostring(wants.new.product.amount) .. ("x " .. wants.new.product.product))
			body.DialogGui.Enabled = true
		end
		if wants.old and not wants.new then
			if not world:contains(id) then
				return nil
			end
			local npc = world:get(id, NPC)
			local _result = world:get(id, Body)
			if _result ~= nil then
				_result = _result.model
			end
			local body = _result
			if not npc or not body then
				Log.Error("No NPC or Body component for customer")
				continue
			end
			body.DialogGui.DialogFrame.DialogText.Text = "Thanks!"
			task.wait(2)
			body.DialogGui.Enabled = false
		end
	end
end
return customer


Prompt:
--[[
	A middleware that allows for functions to be dispatched.
	Functions will receive a single argument, the store itself.
	This middleware consumes the function; middleware further down the chain
	will not receive it.
]]

Response:
local function tracebackReporter(message)
	return debug.traceback(message)
end

local function thunkMiddleware(nextDispatch, store)
	return function(action)
		if typeof(action) == "function" then
			local ok, result = xpcall(function()
				return action(store)
			end, tracebackReporter)

			if not ok then
				-- report the error and move on so it's non-fatal app
				store._errorReporter.reportReducerError(store:getState(), action, {
					message = "Caught error in thunk",
					thrownValue = result,
				})
				return nil
			end

			return result
		end

		return nextDispatch(action)
	end
end

return thunkMiddleware


Prompt:
--[[
Make sure to put Menu Blur Script in StarterGui
And that you put MenuBlur in Lighting

Or paste this in the command bar:
	workspace:WaitForChild("Menu Blur Script").MenuBlur.Parent = game:GetService("Lighting") wait() workspace:WaitForChild("Menu Blur Script").Parent = game:GetService("StarterGui")
]]

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

local MenuBluriness = Lighting.MenuBlur

local GuiService = game:GetService("GuiService")
GuiService.MenuOpened:Connect(function()
	MenuBluriness.Enabled = true
end)

GuiService.MenuClosed:Connect(function()
	MenuBluriness.Enabled = false
end)


Prompt:
--[[ @brief Removes and returns the smallest element on the heap.
     @return The smallest element on the heap (using the stored comparator function).
--]]

Response:
function Heap:Pop()
	local v = self[1];
	self[1] = self[#self];
	self[#self] = nil;
	self:_HeapifyTopDown(1);
	return v;
end


Prompt: -- Color Changing Script ~ Rainbow!

Response:
while true do
script.Parent.BrickColor = BrickColor.Red()
wait(1)
script.Parent.Color = Color3.fromRGB(255, 149, 0)
wait(1)
script.Parent.BrickColor = BrickColor.Yellow()
wait(1)
script.Parent.BrickColor = BrickColor.Green()
wait(1)
script.Parent.Color = Color3.fromRGB(0, 255, 255)
wait(1)
script.Parent.BrickColor = BrickColor.Blue()
wait(1)
script.Parent.Color = Color3.fromRGB(226, 0, 255)
wait(1)
end


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

Response:
debris = game:GetService("Debris")
r = game:service("RunService")

local damage = 18

local slash_damage = 18

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

local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
SlashSound.Parent = sword
SlashSound.Volume = 1

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1

local blues = {23,107,102,11,45,135}

function isTurbo(character)
	return character:FindFirstChild("IceHelm") ~= nil
end

function allThatIce(pos, isTurbo)

	local count = 5
	if (isTurbo == true) then count = 10 end

	for i=1,count do
		local p = Instance.new("Part")
		p.BrickColor = BrickColor.new(blues[math.random(#blues)])
		p.formFactor = 2
		p.Size = Vector3.new(1,.4,1)
		p.Material = Enum.Material.Ice
		p.TopSurface = 0
		p.BottomSurface = 0

		local a = math.random() * 6.28
		local d = Vector3.new(math.cos(a), 0, math.sin(a)).unit
		p.Velocity = d * 25
		p.RotVelocity = d
		p.Position = pos + Vector3.new(0, math.random() * 3, 0) + (d * 2)
		p.Parent = game.Workspace

		debris:AddItem(p, 60)
	end

end

function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character

	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				if (isTurbo(vCharacter) == true) then
					humanoid:TakeDamage(damage * 1.2)
				else
					humanoid:TakeDamage(damage)
				end
			end
		end

	end
end

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

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

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

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

Tool.Enabled = true

function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

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

	attack()
	wait(.2)
	allThatIce(character.Torso.Position + (character.Torso.CFrame.lookVector * 3), isTurbo(character))

	wait(1)

	Tool.Enabled = true
end

function onEquipped()
	UnsheathSound:play()
end

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

connection = sword.Touched:connect(blow)


Prompt: -- Class

Response:
local CheckboxLabelClass = {}
CheckboxLabelClass.__index = CheckboxLabelClass
CheckboxLabelClass.__type = "CheckboxLabel"

function CheckboxLabelClass:__tostring()
	return CheckboxLabelClass.__type
end


Prompt: -- Events

Response:
local events = ReplicatedStorage.Events
local roundEnd = events.RoundEnd
local displayRoundResult = events.DisplayRoundResult


Prompt:
--Initialize
--* called by the client immediately after it is initialized.
--* used to pass communication functions into the interface.
--* the current list of functions is as follows:
--********************************************************--
--*--UserEnded
--*--* Call this function when the user manually ends
--*--* any dialogue, so that the server can respond
--*--* accordingly and not send false timeout signals
--********************************************************--

Response:
function Interface.Initialize(clientFunctions)
	Interface.ClientFunctions = clientFunctions
end


Prompt: --Reset Colour

Response:
	script.Parent.Configuration.Colour.Value = Color3.new(255, 255, 255)
	--ResetScript Ends
script.Parent.Configuration.Reset.Value = false;
end

end)


Response:
local Class = require(script.Class)
local Equipment = require(script.Equipment)

local LoadoutStates = require(game.ReplicatedStorage.Shared.LoadoutStates)

local Menu = New "Frame" {
	Size = UDim2.fromScale(1, 1),
	Transparency = 1,
	Visible = Computed(function()
		return LoadoutStates.Visible:get()
	end),
	[Children] = {
		New "UIAspectRatioConstraint" {
			AspectRatio = 1920/1080
		},
		Class {},
		Equipment {},
	},
}

return Menu


Prompt: --brake.Value = TCount

Response:
else
brake.Value = 1
end

if carSeat.Throttle == -1 and speed < 50 then
	script.FL.OVERRIDE.Value = true
	script.FR.OVERRIDE.Value = true
	script.RL.OVERRIDE.Value = true
	script.RR.OVERRIDE.Value = true
else
	script.FL.OVERRIDE.Value = false
	script.FR.OVERRIDE.Value = false
	script.RL.OVERRIDE.Value = false
	script.RR.OVERRIDE.Value = false
end


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

Response:
for v1, v2 in ipairs(script.Parent:GetChildren()) do
	if v2:IsA("ImageButton") then
		v2.MouseEnter:Connect(function()
			v2.Rotation = 5;
		end);
		v2.MouseLeave:Connect(function()
			v2.Rotation = 0;
		end);
	end;
end;


Prompt: -- Decompiled with Visenya | https://targaryentech.com

Response:
local MiscWeld = {}
function MakeWeld(x, y, type, s)
  if type == nil then
    type = "Weld"
  end
  local W = Instance.new(type)
  W.Part0 = x
  W.Part1 = y
  W.C0 = x.CFrame:inverse() * x.CFrame
  W.C1 = y.CFrame:inverse() * x.CFrame
  W.Parent = x
  if type == "Motor" and s ~= nil then
    W.MaxVelocity = s
  end
  return W
end
function ModelWeld(a, b)
  if a:IsA("BasePart") then
    MakeWeld(b, a, "Weld")
  elseif a:IsA("Model") then
    for i, v in pairs(a:GetDescendants()) do
      ModelWeld(v, b)
    end
  end
end
car = script.Parent.Parent.Parent
misc = car:WaitForChild("Misc")
car.DriveSeat.ChildAdded:connect(function(child)
  if child.Name == "SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent) ~= nil then
    child.C0 = CFrame.new(0, -0.5, 0) * CFrame.fromEulerAnglesXYZ(-(math.pi / 2), 0, 0)
  end
end)
return MiscWeld


Prompt: -- Compiled with roblox-ts v2.1.0

Response:
local TS = require(game:GetService("ReplicatedStorage"):WaitForChild("rbxts_include"):WaitForChild("RuntimeLib"))
local Players = TS.import(script, game:GetService("ReplicatedStorage"), "rbxts_include", "node_modules", "@rbxts", "services").Players
local Client = TS.import(script, game:GetService("ReplicatedStorage"), "TS", "components").Client
local player = Players.LocalPlayer
local function client(world, state)
	for id, client in world:queryChanged(Client) do
		if not client.old and (client.new and client.new.player.UserId == player.UserId) then
			state.playerId = id
			return nil
		end
	end
end
return client


Prompt: ----- cold tap handler -----

Response:
coldTap.Interactive.ClickDetector.MouseClick:Connect(function()
	if coldOn.Value == false then
		coldOn.Value = true
		faucet.ParticleEmitter.Enabled = true
		waterSound:Play()
		hotTap.Interactive.ClickDetector.MaxActivationDistance = 0
		coldTap.Interactive.ClickDetector.MaxActivationDistance = 32
		hotTap.Handle.Transparency = 1
		coldTap.Handle.Transparency = 0
		handle.HandleOff.Transparency = 1
	else
		coldOn.Value = false
		if hotOn.Value == false then
			faucet.ParticleEmitter.Enabled = false
			waterSound:Stop()
		end
		hotTap.Interactive.ClickDetector.MaxActivationDistance = 32
		coldTap.Interactive.ClickDetector.MaxActivationDistance = 32
		hotTap.Handle.Transparency = 1
		coldTap.Handle.Transparency = 1
		handle.HandleOff.Transparency = 0
	end
end)


Response:
script.Parent:WaitForChild("Gear")
script.Parent:WaitForChild("Speed")
script.Parent:WaitForChild("Needle")

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false

local _Tune = require(car["A-Chassis Tune"])

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)

script.Parent.Parent.Values.Gear.Changed:connect(function()
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then
		gearText = " " .. "N" .. " "

	elseif gearText == -1 then gearText = " " .. "R" .. " "
	end
	script.Parent.Gear.Text = " " .. gearText .. " "
	script.Parent.Gear.Font = Enum.Font.Oswald
end)

script.Parent.Parent.Values.RPM.Changed:connect(function()
	script.Parent.Needle.Rotation = 240 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000))
end)

script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speed.Text = "" .. math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude) .. ""
end)

wait(.1)

local RPMOFF = RedlineRPM - 100

script.Parent.Parent.Values.RPM.Changed:connect(function()
	local Roundspeed = script.Parent.Parent.Values.RPM.Value

	if Roundspeed <= RedlineRPM then
		script.Parent.Gear.TextColor3 = Color3.fromRGB(24, 255, 145)
		script.Parent.Center.ImageColor3 = Color3.fromRGB(24, 255, 145)

	elseif Roundspeed >= RPMOFF then
		script.Parent.Gear.TextColor3 = Color3.fromRGB(234, 31, 84)
		script.Parent.Center.ImageColor3 = Color3.fromRGB(234, 31, 84)

	end

end)

local values = script.Parent.Parent.Values
local gauges = script.Parent

values.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if values.TCS.Value then
			gauges.TCS.ImageColor3 = Color3.fromRGB(234, 31, 84)

			if values.TCSActive.Value then
				wait()
				--gauges.TCS.Visible = not gauges.TCS.Visible
			else
				wait()
				gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
			end
		else
			gauges.TCS.Visible = true
			gauges.TCS.ImageColor3 = Color3.fromRGB(234, 31, 84)

		end
	else
		gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

values.TCSActive.Changed:connect(function()
	if _Tune.TCSEnabled then
		if values.TCSActive.Value and values.TCS.Value then
			wait()

		elseif not values.TCS.Value then
			wait()
			gauges.TCS.Visible = true
		else
			wait()
			gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	else
		gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

gauges.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if values.TCSActive.Value and values.TCS.Value then
			wait()

		elseif not values.TCS.Value then
			wait()
			gauges.TCS.Visible = true
		end
	else
		if gauges.TCS.Visible then
			gauges.TCS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	end
end)

values.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if values.ABS.Value then
			gauges.ABS.ImageColor3 = Color3.fromRGB(234, 31, 84)

			if values.ABSActive.Value then
				wait()
				gauges.ABS.Visible = not gauges.ABS.Visible
			else
				wait()
				gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
			end
		else
			gauges.ABS.Visible = true
			gauges.ABS.ImageColor3 = Color3.fromRGB(234, 31, 84)

		end
	else
		gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

values.ABSActive.Changed:connect(function()
	if _Tune.ABSEnabled then
		if values.ABSActive.Value and values.ABS.Value then
			wait()

		elseif not values.ABS.Value then
			wait()
			gauges.ABS.Visible = true
		else
			wait()
			gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	else
		gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
	end
end)

gauges.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if values.ABSActive.Value and values.ABS.Value then
			wait()

		elseif not values.ABS.Value then
			wait()
			gauges.ABS.Visible = true
		end
	else
		if gauges.ABS.Visible then
			gauges.ABS.ImageColor3 = Color3.fromRGB(78, 78, 78)
		end
	end
end)

gauges.PBrake.Visible = values.PBrake.Value

function PBrake()
	gauges.PBrake.Visible = values.PBrake.Value
end

values.PBrake.Changed:connect(PBrake)


Prompt:
--[[for some reason, ROBLOX has decided that it is imperative that scripts DO NOT KNOW what physics
solver the place is using (same with part destroy height, but that is less annoying). Fortunately,
there's a simple hack that will tell us: surface motors. In PGS, surface motors are "braked" which
means that they always try to go to a certain speed, even when stopped. In Spring Physics, surface
motors "coast" which means that when they are stopped they are free to turn when stopped. We can use
this to determine the PGSness of the server. Three parts are created: an anchored part, an unanchored
part with a motor, and a brick on one side of the motor so it turns. If the motor turns, the server
is running spring physics.]]

Response:
local Value = game.ServerScriptService:FindFirstChild("PGSPhysicsSolverEnabled")
local Temporary = game.ServerScriptService:FindFirstChild("PGSPhysicsSolverEnabled TEMP")

if Value and not Temporary then--we want to be as lazy as possible. If another script already figured
	return Value.Value--out if the server is PGS or not, then lets just use their discovery
elseif Temporary then
	repeat--because it takes a second for the script to run, we want to make sure that we don't flood
	local inserted = game.ServerScriptService.ChildAdded:wait()--the thing with extra values.
	if inserted.Name == "PGSPhysicsSolverEnabled" then--but, we want to get back with the answer ASAP
		return inserted.Value
	end
	until false
else--well, it looks like this one will have to do the heavy lifting and run the test.
	local PGSTemp = Instance.new("BoolValue")--prevent a flood of values
	PGSTemp.Name = "PGSPhysicsSolverEnabled TEMP"
	PGSTemp.Parent = game.ServerScriptService
	local p1 = Instance.new("Part",workspace)
	p2 = Instance.new("Part",workspace)
	p3 = Instance.new("Part", workspace)
	p1.Anchored = true
	p1.CanCollide = false--having each property changed next to the others looks pretty
	p2.CanCollide = false
	p3.CanCollide = false
	p1.FormFactor = "Symmetric"
	p2.FormFactor = "Symmetric"
	p3.FormFactor = "Symmetric"
	p1.Transparency = 1
	p2.Transparency = 1
	p3.Transparency = 1
	p1.CFrame = CFrame.Angles(0,1,0)--this is to prevent things from accidentally welding to it
	p2.CFrame = p1.CFrame*CFrame.new(0,0,-2)
	p3.CFrame = p2.CFrame*CFrame.new(3,1,0)
	p2.BackSurface = "Motor"
	p2:MakeJoints()--makes sure that the unanchored parts don't fall apart
	p3:MakeJoints()
	local StartPos = p3.Position
	p2:SetNetworkOwner(nil)--make sure a pesky client doesn't get it!
	wait(1)--run the test
	local EndPos = p3.Position--test is over!
	local Magnitude = (EndPos-StartPos).magnitude--how much did the brick move?
	local PGSPhysicsSolverEnabledValue = Instance.new("BoolValue")
	PGSPhysicsSolverEnabledValue.Name = "PGSPhysicsSolverEnabled"
	PGSPhysicsSolverEnabledValue.Value = (Magnitude < 0.2) and true or false--if the brick moved a lot, then it's in Spring Physics
	PGSPhysicsSolverEnabledValue.Parent = game.ServerScriptService--let everyone else who was waiting know the outcome
	PGSTemp:Destroy()--this would cause major problems if it wasn't destroyed
	p1:Destroy()--clean up the test
	p2:Destroy()
	p3:Destroy()
	return Magnitude < 0.2--tell our script what the answer is
end


Prompt:
--[[
	Add a dummy child node to the current node to hold the given error. This
	allows an otherwise empty describe node to report an error in a more natural
	way.
]]

Response:
function TestSession:addDummyError(phrase, message)
	self:pushNode({ type = TestEnum.NodeType.It, phrase = phrase })
	self:setError(message)
	self:popNode()
	self.nodeStack[#self.nodeStack].status = TestEnum.TestStatus.Failure
end


Prompt: --[[Driver Handling]]

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

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

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


Prompt: -- ScriptSignal object:

Response:
local ScriptSignal = {
	--[[
		_head = nil,
		_listener_count = 0,
	--]]
}
ScriptSignal.__index = ScriptSignal

function ScriptSignal:Connect(listener, disconnect_listener, disconnect_param) --> [ScriptConnection]

	local script_connection = {
		_listener = listener,
		_script_signal = self,
		_disconnect_listener = disconnect_listener,
		_disconnect_param = disconnect_param,

		_next = self._head,
		_is_connected = true,
	}
	setmetatable(script_connection, ScriptConnection)

	self._head = script_connection
	self._listener_count += 1

	return script_connection

end

function ScriptSignal:GetListenerCount() --> [number]
	return self._listener_count
end

function ScriptSignal:Fire(...)
	local item = self._head
	while item ~= nil do
		if item._is_connected == true then
			if not FreeRunnerThread then
				FreeRunnerThread = coroutine.create(RunEventHandlerInFreeThread)
			end
			task.spawn(FreeRunnerThread, item._listener, ...)
		end
		item = item._next
	end
end

function ScriptSignal:FireUntil(continue_callback, ...)
	local item = self._head
	while item ~= nil do
		if item._is_connected == true then
			item._listener(...)
			if continue_callback() ~= true then
				return
			end
		end
		item = item._next
	end
end

function MadworkScriptSignal.NewScriptSignal() --> [ScriptSignal]
	return {
		_head = nil,
		_listener_count = 0,
		Connect = ScriptSignal.Connect,
		GetListenerCount = ScriptSignal.GetListenerCount,
		Fire = ScriptSignal.Fire,
		FireUntil = ScriptSignal.FireUntil,
	}
end

return MadworkScriptSignal


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

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

	local UI = client.UI

	local gui = service.New("ScreenGui", {ResetOnSpawn = false})
	local gTable = UI.Register(gui)

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

	gTable.Name = "HelpButton"
	gTable.CanKeepAlive = true

	local toggle = service.New("ImageButton", {
		Parent = gui;
		Name = "Toggle";
		BackgroundTransparency = 1;
		Position = UDim2.new(1, -45, 1, -45);
		Size = UDim2.fromOffset(40, 40);
		Image = client.HelpButtonImage;
		ImageTransparency = 0.5;
	})

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

	toggle.MouseButton1Down:Connect(function()
		local found = UI.Get("UserPanel", nil, true)
		if found then
			found.Object:Destroy()
		else
			UI.Make("UserPanel")
		end
	end)

	gTable:Ready()
end


Prompt: -- SERVICES --

Response: local RS = game:GetService("ReplicatedStorage")


Prompt: ----- Frames -----

Response:
local GiftFrame = ScreenGui.ClaimGift.GiftFrame
local DailyRewardFrame = ScreenGui.DailyReward.DailyRewardFrame
local RebirthFrame = ScreenGui.Rebirth.RebirthFrame
local StoreFrame = ScreenGui.Store.StoreFrame
local VipFrame = ScreenGui.VIP.VipFrame
local InventoryFrame = ScreenGui.Inventory.InventoryFrame
local CaseStoreFrame = ScreenGui.CaseShop.CaseShopFrame


Prompt: --m3.Volume = 0

Response:
m2.Looped = false
m2.Playing = false
script.Parent.Parent:WaitForChild("Drive").Locotrol.Event:connect(function(data)
	if data["Horn"] == true then
		m2.Volume = 0
		m2.Looped = false
		m2:Stop()
		m2.Playing = false
		--m3.Volume = 0
		--m3.Stop()
		m1.Volume = 7.5
		m1:Play()
		--wait(m1.TimeLength) --disabled because it makes looping part stuck playing if stopped too soon.
		if m1.TimePosition < m1.TimeLength then
			m2.Looped = true
			m2.Volume = 7.5
			m2:Play()
		else
			m1.Volume = 0
			m1:Stop()
		end
	elseif data["Horn"] == false then
		m1.Volume = 0
		m1:Stop()
		--[[ --For 3 part option
		m2.Volume = 0
		m2:Stop()
		m2.Looped = false
		m2.Playing = false
		m3.Volume = 1
		m3:Play()
		--]]
		----[[ -- For 2 part option
		if m2.IsPlaying == true then
			for i=2, 0, -.2 do
				m2.Volume = i*1
				wait(.1)
			end
		end
		m2.Volume = 0
		m2.Looped = false
		m2.Playing = false
		m2:Stop()
		----]]
	end
end)


Prompt: -- создание клона

Response: local target = targets.Zombie:Clone()


Prompt: -- PRIVATE FUNCTIONS

Response:
function ZoneController._registerZone(zone)
   	registeredZones[zone] = true
	local registeredMaid = zone._maid:give(Maid.new())
	zone._registeredMaid = registeredMaid
	registeredMaid:give(zone.updated:Connect(function()
		ZoneController._updateZoneDetails()
	end))
   ZoneController._updateZoneDetails()
end

function ZoneController._deregisterZone(zone)
	registeredZones[zone] = nil
	zone._registeredMaid:clean()
	zone._registeredMaid = nil
	ZoneController._updateZoneDetails()
end

function ZoneController._registerConnection(registeredZone, registeredTriggerType)
	local originalItems = dictLength(registeredZone.activeTriggers)
	activeConnections += 1
	if originalItems == 0 then
		activeZones[registeredZone] = true
		ZoneController._updateZoneDetails()
	end
	local currentTriggerCount = activeTriggers[registeredTriggerType]
	activeTriggers[registeredTriggerType] = (currentTriggerCount and currentTriggerCount+1) or 1
	registeredZone.activeTriggers[registeredTriggerType] = true
	if registeredZone.touchedConnectionActions[registeredTriggerType] then
		registeredZone:_formTouchedConnection(registeredTriggerType)
	end
	if heartbeatActions[registeredTriggerType] then
		ZoneController._formHeartbeat(registeredTriggerType)
	end
end


Prompt:
--[[
    Create a ClientAvatarComponent for the given model
]]

Response:
function ClientAvatarComponent.new(model, userId)
	local component = {
		model = model
	}
	setmetatable(component, {__index = ClientAvatarComponent})

	local avatar = model:FindFirstChild(ReplicatedConstants.AVATAR_MODEL_NAME)
	component.avatar = avatar

	component:setupJoints()

	return component
end


Prompt: --activate

Response:
script.Parent.Activated:Connect(function()

end)


Prompt: -- same as jump for now

Response:
function moveFreeFall()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = (3.14)
	LeftShoulder.DesiredAngle = (-3.14)
	RightHip.DesiredAngle = (0)
	LeftHip.DesiredAngle = (0)
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle = (3.14 /2)
	LeftShoulder.DesiredAngle = (-3.14 /2)
	RightHip.DesiredAngle = (3.14 /2)
	LeftHip.DesiredAngle = (-3.14 /2)
end

function getTool()
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

function animateTool()

	if (toolAnim == "None") then
		RightShoulder.DesiredAngle = (1.57)
		return
	end

	if (toolAnim == "Slash") then
		RightShoulder.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = (0)
		return
	end

	if (toolAnim == "Lunge") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		RightHip.MaxVelocity = 0.5
		LeftHip.MaxVelocity = 0.5
		RightShoulder.DesiredAngle = (1.57)
		LeftShoulder.DesiredAngle = (1.0)
		RightHip.DesiredAngle = (1.57)
		LeftHip.DesiredAngle = (1.0)
		return
	end
end

function move(time)
	local amplitude
	local frequency

	if (pose == "Jumping") then
		moveJump()
		return
	end

	if (pose == "FreeFall") then
		moveFreeFall()
		return
	end

	if (pose == "Seated") then
		moveSit()
		return
	end

	local climbFudge = 0

	if (pose == "Running") then
		RightShoulder.MaxVelocity = 0.15
		LeftShoulder.MaxVelocity = 0.15
		amplitude = 1
		frequency = 9
	elseif (pose == "Climbing") then
		RightShoulder.MaxVelocity = 0.5
		LeftShoulder.MaxVelocity = 0.5
		amplitude = 1
		frequency = 9
		climbFudge = 3.14
	else
		amplitude = 0.1
		frequency = 1
	end

	desiredAngle = amplitude * math.sin(time*frequency)

	RightShoulder.DesiredAngle = (desiredAngle + climbFudge)
	LeftShoulder.DesiredAngle = (desiredAngle - climbFudge)
	RightHip.DesiredAngle = (-desiredAngle)
	LeftHip.DesiredAngle = (-desiredAngle)

	local tool = getTool()

	if tool then

		animStringValueObject = getToolAnim(tool)

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

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

		animateTool()

	else
		toolAnim = "None"
		toolAnimTime = 0
	end
end


Prompt:
--Institutional white
--Electric blue

Response:
function SetDigit(Value)

	if Value == "0" then
		SP.D1.BrickColor = BrickColor.new("Really red")
		SP.D2.BrickColor = BrickColor.new("Really black")
		SP.D3.BrickColor = BrickColor.new("Really red")
		SP.D4.BrickColor = BrickColor.new("Really red")
		SP.D5.BrickColor = BrickColor.new("Really red")
		SP.D6.BrickColor = BrickColor.new("Really red")
		SP.D7.BrickColor = BrickColor.new("Really red")
		return
	end
	if Value == "1" then
		SP.D1.BrickColor = BrickColor.new("Electric blue")
		SP.D2.BrickColor = BrickColor.new("Electric blue")
		SP.D3.BrickColor = BrickColor.new("Electric blue")
		SP.D4.BrickColor = BrickColor.new("Electric blue")
		SP.D5.BrickColor = BrickColor.new("Institutional white")
		SP.D6.BrickColor = BrickColor.new("Electric blue")
		SP.D7.BrickColor = BrickColor.new("Institutional white")
		return
	end
	if Value == "2" then
		SP.D1.BrickColor = BrickColor.new("Institutional white")
		SP.D2.BrickColor = BrickColor.new("Institutional white")
		SP.D3.BrickColor = BrickColor.new("Institutional white")
		SP.D4.BrickColor = BrickColor.new("Electric blue")
		SP.D5.BrickColor = BrickColor.new("Institutional white")
		SP.D6.BrickColor = BrickColor.new("Institutional white")
		SP.D7.BrickColor = BrickColor.new("Electric blue")
		return
	end
	if Value == "3" then
		SP.D1.BrickColor = BrickColor.new("Institutional white")
		SP.D2.BrickColor = BrickColor.new("Institutional white")
		SP.D3.BrickColor = BrickColor.new("Institutional white")
		SP.D4.BrickColor = BrickColor.new("Electric blue")
		SP.D5.BrickColor = BrickColor.new("Institutional white")
		SP.D6.BrickColor = BrickColor.new("Electric blue")
		SP.D7.BrickColor = BrickColor.new("Institutional white")
		return
	end
	if Value == "4" then
		SP.D1.BrickColor = BrickColor.new("Electric blue")
		SP.D2.BrickColor = BrickColor.new("Institutional white")
		SP.D3.BrickColor = BrickColor.new("Electric blue")
		SP.D4.BrickColor = BrickColor.new("Institutional white")
		SP.D5.BrickColor = BrickColor.new("Institutional white")
		SP.D6.BrickColor = BrickColor.new("Electric blue")
		SP.D7.BrickColor = BrickColor.new("Institutional white")
		return
	end
	if Value == "5" then
		SP.D1.BrickColor = BrickColor.new("Institutional white")
		SP.D2.BrickColor = BrickColor.new("Institutional white")
		SP.D3.BrickColor = BrickColor.new("Institutional white")
		SP.D4.BrickColor = BrickColor.new("Institutional white")
		SP.D5.BrickColor = BrickColor.new("Electric blue")
		SP.D6.BrickColor = BrickColor.new("Electric blue")
		SP.D7.BrickColor = BrickColor.new("Institutional white")
		return
	end
	if Value == "6" then
		SP.D1.BrickColor = BrickColor.new("Institutional white")
		SP.D2.BrickColor = BrickColor.new("Institutional white")
		SP.D3.BrickColor = BrickColor.new("Institutional white")
		SP.D4.BrickColor = BrickColor.new("Institutional white")
		SP.D5.BrickColor = BrickColor.new("Electric blue")
		SP.D6.BrickColor = BrickColor.new("Institutional white")
		SP.D7.BrickColor = BrickColor.new("Institutional white")
		return
	end
	if Value == "7" then
		SP.D1.BrickColor = BrickColor.new("Really red")
		SP.D2.BrickColor = BrickColor.new("Really black")
		SP.D3.BrickColor = BrickColor.new("Really black")
		SP.D4.BrickColor = BrickColor.new("Really black")
		SP.D5.BrickColor = BrickColor.new("Really red")
		SP.D6.BrickColor = BrickColor.new("Really black")
		SP.D7.BrickColor = BrickColor.new("Really red")
		return
	end
	if Value == "8" then
		SP.D1.BrickColor = BrickColor.new("Really red")
		SP.D2.BrickColor = BrickColor.new("Really red")
		SP.D3.BrickColor = BrickColor.new("Really red")
		SP.D4.BrickColor = BrickColor.new("Really red")
		SP.D5.BrickColor = BrickColor.new("Really red")
		SP.D6.BrickColor = BrickColor.new("Really red")
		SP.D7.BrickColor = BrickColor.new("Really red")
		return
	end
	if Value == "9" then
		SP.D1.BrickColor = BrickColor.new("Really red")
		SP.D2.BrickColor = BrickColor.new("Really red")
		SP.D3.BrickColor = BrickColor.new("Really red")
		SP.D4.BrickColor = BrickColor.new("Really red")
		SP.D5.BrickColor = BrickColor.new("Really red")
		SP.D6.BrickColor = BrickColor.new("Really black")
		SP.D7.BrickColor = BrickColor.new("Really red")
		return
	end
	if Value == "L" then
		SP.D1.BrickColor = BrickColor.new("Really black")
		SP.D2.BrickColor = BrickColor.new("Really black")
		SP.D3.BrickColor = BrickColor.new("Really red")
		SP.D4.BrickColor = BrickColor.new("Really red")
		SP.D5.BrickColor = BrickColor.new("Really black")
		SP.D6.BrickColor = BrickColor.new("Really red")
		SP.D7.BrickColor = BrickColor.new("Really black")
		return
	end
	if Value == "E" then
		SP.D1.BrickColor = BrickColor.new("Really red")
		SP.D2.BrickColor = BrickColor.new("Really red")
		SP.D3.BrickColor = BrickColor.new("Really red")
		SP.D4.BrickColor = BrickColor.new("Really red")
		SP.D5.BrickColor = BrickColor.new("Really black")
		SP.D6.BrickColor = BrickColor.new("Really red")
		SP.D7.BrickColor = BrickColor.new("Really black")
		return
	end

	if Value == "" then
		SP.D1.BrickColor = BrickColor.new("Really black")
		SP.D2.BrickColor = BrickColor.new("Really black")
		SP.D3.BrickColor = BrickColor.new("Really black")
		SP.D4.BrickColor = BrickColor.new("Really black")
		SP.D5.BrickColor = BrickColor.new("Really black")
		SP.D6.BrickColor = BrickColor.new("Really black")
		SP.D7.BrickColor = BrickColor.new("Really black")
		return
	end
end

SP.Value.Changed:connect(function() SetDigit(SP.Value.Value) end)


Prompt: -- Number of lines used to draw axis circles

Response:
ArcHandles.CircleSlices = 60

function ArcHandles.new(Options)
    local self = setmetatable({}, ArcHandles)

    -- Create maid for cleanup on destroyal
    self.Maid = Maid.new()

    -- Create UI container
    local Gui = Instance.new('ScreenGui')
    self.Gui = Gui
    Gui.Name = 'BTArcHandles'
    Gui.IgnoreGuiInset = true
    self.Maid.Gui = Gui

    -- Create interface
    self.IsMouseAvailable = UserInputService.MouseEnabled
    self:CreateCircles()
    self:CreateHandles(Options)

    -- Get camera and viewport information
    self.Camera = Workspace.CurrentCamera
    self.GuiInset = GuiService:GetGuiInset()

    -- Get list of ignorable handle obstacles
    self.ObstacleBlacklistIndex = Support.FlipTable(Options.ObstacleBlacklist or {})
    self.ObstacleBlacklist = Support.Keys(self.ObstacleBlacklistIndex)

    -- Enable handles
    self:SetAdornee(Options.Adornee)
    self.Gui.Parent = Options.Parent

    -- Return new handles
    return self
end

function ArcHandles:CreateCircles()

    -- Create folder to contain circles
    local CircleFolder = Instance.new('Folder')
    CircleFolder.Name = 'AxisCircles'
    CircleFolder.Parent = self.Gui
    local Circles = {}
    self.AxisCircles = Circles

    -- Determine angle for each circle slice
    local CircleSliceAngle = 2 * math.pi / self.CircleSlices

    -- Set up each axis
    for _, Axis in ipairs(Enum.Axis:GetEnumItems()) do
        local AxisColor = self.AxisColors[Axis.Name]

        -- Create container for circle
        local Circle = Instance.new('Folder', CircleFolder)
        Circle.Name = Axis.Name
        local Lines = {}
        Circles[Axis.Name] = Lines

        -- Create lines for circle
        for i = 1, self.CircleSlices do
            local Line = Instance.new 'CylinderHandleAdornment'
            Line.Transparency = 0.4
            Line.Color3 = AxisColor
            Line.Radius = 0
            Line.Height = 0
            Line.Parent = Circle
            Lines[i] = Line
        end
    end

end

function ArcHandles:CreateHandles(Options)

    -- Create folder to contain handles
    local HandlesFolder = Instance.new('Folder')
    HandlesFolder.Name = 'Handles'
    HandlesFolder.Parent = self.Gui
    self.Handles = {}
    self.HandleStates = {}

    -- Generate a handle for each side
    for _, Side in ipairs(Enum.NormalId:GetEnumItems()) do

        -- Get axis information
        local Axis = self.SideToAxis[Side.Name]
        local AxisColor = self.AxisColors[Axis]

        -- Create handle
        local Handle = Instance.new('ImageButton')
        Handle.Name = Side.Name
        Handle.Image = 'rbxassetid://2347145012'
        Handle.ImageColor3 = AxisColor
        Handle.ImageTransparency = 0.33
        Handle.AnchorPoint = Vector2.new(0.5, 0.5)
        Handle.BackgroundTransparency = 1
        Handle.BorderSizePixel = 0
        Handle.ZIndex = 1
        Handle.Visible = false

        -- Create handle dot
        local HandleDot = Handle:Clone()
        HandleDot.Active = false
        HandleDot.Size = UDim2.new(0, 4, 0, 4)
        HandleDot.Position = UDim2.new(0.5, 0, 0.5, 0)
        HandleDot.Visible = true
        HandleDot.Parent = Handle
        HandleDot.ZIndex = 0

        -- Create maid for handle cleanup
        local HandleMaid = Maid.new()
        self.Maid[Side.Name] = HandleMaid

        -- Add handle hover effect
        HandleMaid.HoverStart = Handle.MouseEnter:Connect(function ()
            Handle.ImageTransparency = 0
            self:SetCircleTransparency(Axis, 0)
        end)
        HandleMaid.HoverEnd = Handle.MouseLeave:Connect(function ()
            Handle.ImageTransparency = 0.33
            self:SetCircleTransparency(Axis, 0.4)
        end)

        -- Listen for handle interactions on click
        HandleMaid.DragStart = Handle.MouseButton1Down:Connect(function (X, Y)
            local InitialHandlePlane = self.HandleStates[Handle].PlaneNormal
            local InitialHandleCFrame = self.HandleStates[Handle].HandleCFrame
            local InitialAdorneeCFrame = self.HandleStates[Handle].AdorneeCFrame

            -- Calculate aim offset
            local AimRay = self.Camera:ViewportPointToRay(X, Y)
            local AimDistance = (InitialHandleCFrame.p - AimRay.Origin):Dot(InitialHandlePlane) / AimRay.Direction:Dot(InitialHandlePlane)
            local AimWorldPoint = (AimDistance * AimRay.Direction) + AimRay.Origin
            local InitialDragOffset = InitialAdorneeCFrame:PointToObjectSpace(AimWorldPoint)

            -- Run callback
            if Options.OnDragStart then
                Options.OnDragStart()
            end

            local function ProcessDragChange(AimScreenPoint)

                -- Calculate current aim
                local AimRay = self.Camera:ScreenPointToRay(AimScreenPoint.X, AimScreenPoint.Y)
                local AimDistance = (InitialHandleCFrame.p - AimRay.Origin):Dot(InitialHandlePlane) / AimRay.Direction:Dot(InitialHandlePlane)
                local AimWorldPoint = (AimDistance * AimRay.Direction) + AimRay.Origin
                local CurrentDragOffset = InitialAdorneeCFrame:PointToObjectSpace(AimWorldPoint)

                -- Calculate angle on dragged axis
                local DragAngle
                if Axis == 'X' then
                    local InitialAngle = math.atan2(InitialDragOffset.Y, -InitialDragOffset.Z)
                    DragAngle = math.atan2(CurrentDragOffset.Y, -CurrentDragOffset.Z) - InitialAngle
                elseif Axis == 'Y' then
                    local InitialAngle = math.atan2(InitialDragOffset.X, InitialDragOffset.Z)
                    DragAngle = math.atan2(CurrentDragOffset.X, CurrentDragOffset.Z) - InitialAngle
                elseif Axis == 'Z' then
                    local InitialAngle = math.atan2(InitialDragOffset.X, InitialDragOffset.Y)
                    DragAngle = math.atan2(-CurrentDragOffset.X, CurrentDragOffset.Y) - InitialAngle
                end

                -- Run drag callback
                if Options.OnDrag then
                    Options.OnDrag(Axis, DragAngle)
                end

            end

            -- Create maid for dragging cleanup
            local DragMaid = Maid.new()
            HandleMaid.Dragging = DragMaid

            -- Perform dragging when aiming anywhere (except handle)
            DragMaid.Drag = Support.AddUserInputListener('Changed', {'MouseMovement', 'Touch'}, true, function (Input)
                ProcessDragChange(Input.Position)
            end)

            -- Perform dragging while aiming at handle
            DragMaid.InHandleDrag = Handle.MouseMoved:Connect(function (X, Y)
                local AimScreenPoint = Vector2.new(X, Y) - self.GuiInset
                ProcessDragChange(AimScreenPoint)
            end)

            -- Finish dragging when input ends
            DragMaid.DragEnd = Support.AddUserInputListener('Ended', {'MouseButton1', 'Touch'}, true, function (Input)
                HandleMaid.Dragging = nil
            end)

            -- Fire callback when dragging ends
            DragMaid.Callback = function ()
                coroutine.wrap(Options.OnDragEnd)()
            end

        end)

        -- Finish dragging when input ends while aiming at handle
        HandleMaid.InHandleDragEnd = Handle.MouseButton1Up:Connect(function ()
            HandleMaid.Dragging = nil
        end)

        -- Save handle
        Handle.Parent = HandlesFolder
        self.Handles[Side.Name] = Handle

    end

end

function ArcHandles:Hide()

    -- Make sure handles are enabled
    if not self.Running then
        return self
    end

    -- Pause updating
    self:Pause()

    -- Hide UI
    self.Gui.Enabled = false

end

function ArcHandles:Pause()
    self.Running = false
end

local function IsFirstPerson(Camera)
    return (Camera.CFrame.p - Camera.Focus.p).magnitude <= 0.6
end

function ArcHandles:Resume()

    -- Make sure handles are disabled
    if self.Running then
        return self
    end

    -- Allow handles to run
    self.Running = true

    -- Update each handle
    for Side, Handle in pairs(self.Handles) do
        coroutine.wrap(function ()
            while self.Running do
                self:UpdateHandle(Side, Handle)
                RunService.RenderStepped:Wait()
            end
        end)()
    end

    -- Update each axis circle
    for Axis, Lines in pairs(self.AxisCircles) do
        coroutine.wrap(function ()
            while self.Running do
                self:UpdateCircle(Axis, Lines)
                RunService.RenderStepped:Wait()
            end
        end)()
    end

    -- Ignore character whenever character enters first person
    if Players.LocalPlayer then
        coroutine.wrap(function ()
            while self.Running do
                local FirstPerson = IsFirstPerson(self.Camera)
                local Character = Players.LocalPlayer.Character
                if Character then
                    self.ObstacleBlacklistIndex[Character] = FirstPerson and true or nil
                    self.ObstacleBlacklist = Support.Keys(self.ObstacleBlacklistIndex)
                end
                wait(0.2)
            end
        end)()
    end

    -- Show UI
    self.Gui.Enabled = true

end

function ArcHandles:SetAdornee(Item)
    -- Return self for chaining

    -- Save new adornee
    self.Adornee = Item
    self.IsAdorneeModel = Item and (Item:IsA 'Model') or nil

    -- Attach axis circles to adornee
    for Axis, Lines in pairs(self.AxisCircles) do
        for _, Line in ipairs(Lines) do
            Line.Adornee = Item
        end
    end

    -- Resume handles
    if Item then
        self:Resume()
    else
        self:Hide()
    end

    -- Return handles for chaining
    return self

end

function ArcHandles:SetCircleTransparency(Axis, Transparency)
    for _, Line in ipairs(self.AxisCircles[Axis]) do
        Line.Transparency = Transparency
    end
end

local function WorldToViewportPoint(Camera, Position)

    -- Get viewport position for point
    local ViewportPoint, Visible = Camera:WorldToViewportPoint(Position)
    local CameraDepth = ViewportPoint.Z
    ViewportPoint = Vector2.new(ViewportPoint.X, ViewportPoint.Y)

    -- Adjust position if point is behind camera
    if CameraDepth < 0 then
        ViewportPoint = Camera.ViewportSize - ViewportPoint
    end

    -- Return point and visibility
    return ViewportPoint, CameraDepth, Visible

end

function ArcHandles:BlacklistObstacle(Obstacle)
    if Obstacle then
        self.ObstacleBlacklistIndex[Obstacle] = true
        self.ObstacleBlacklist = Support.Keys(self.ObstacleBlacklistIndex)
    end
end

function ArcHandles:UpdateHandle(Side, Handle)
    local Camera = self.Camera

    -- Hide handles if not attached to an adornee
    if not self.Adornee then
        Handle.Visible = false
        return
    end

    -- Get adornee CFrame and size
    local AdorneeCFrame = self.IsAdorneeModel and
        self.Adornee:GetModelCFrame() or
        self.Adornee.CFrame
    local AdorneeSize = self.IsAdorneeModel and
        self.Adornee:GetModelSize() or
        self.Adornee.Size

    -- Calculate radius of adornee extents
    local ViewportPoint, CameraDepth, Visible = WorldToViewportPoint(Camera, AdorneeCFrame.p)
    local StudWidth = 2 * math.tan(math.rad(Camera.FieldOfView) / 2) * CameraDepth
    local StudsPerPixel = StudWidth / Camera.ViewportSize.X
    local HandlePadding = math.max(1, StudsPerPixel * 14) * (self.IsMouseAvailable and 1 or 1.6)
    local AdorneeRadius = AdorneeSize.magnitude / 2
    local Radius = AdorneeRadius + 2 * HandlePadding

    -- Calculate CFrame of the handle's side
    local SideUnitVector = Vector3.FromNormalId(Side)
    local HandleCFrame = AdorneeCFrame * CFrame.new(Radius * SideUnitVector)
    local AxisCFrame = AdorneeCFrame * Vector3.FromAxis(self.SideToAxis[Side])
    local HandleNormal = (AxisCFrame - AdorneeCFrame.p).unit

    -- Get viewport position of adornee and the side the handle will be on
    local HandleViewportPoint, HandleCameraDepth, HandleVisible = WorldToViewportPoint(Camera, HandleCFrame.p)

    -- Display handle if side is visible to the camera
    Handle.Visible = HandleVisible

    -- Calculate handle size (12 px, or at least 0.5 studs)
    local StudWidth = 2 * math.tan(math.rad(Camera.FieldOfView) / 2) * HandleCameraDepth
    local PixelsPerStud = Camera.ViewportSize.X / StudWidth
    local HandleSize = math.max(12, 0.5 * PixelsPerStud) * (self.IsMouseAvailable and 1 or 1.6)
    Handle.Size = UDim2.new(0, HandleSize, 0, HandleSize)

    -- Calculate where handles will appear on the screen
    Handle.Position = UDim2.new(
        0, HandleViewportPoint.X,
        0, HandleViewportPoint.Y
    )

    -- Save handle position
    local HandleState = self.HandleStates[Handle] or {}
    self.HandleStates[Handle] = HandleState
    HandleState.HandleCFrame = HandleCFrame
    HandleState.PlaneNormal = HandleNormal
    HandleState.AdorneeCFrame = AdorneeCFrame

    -- Hide handles if obscured by a non-blacklisted part
    local HandleRay = Camera:ViewportPointToRay(HandleViewportPoint.X, HandleViewportPoint.Y)
    local TargetRay = Ray.new(HandleRay.Origin, HandleRay.Direction * (HandleCameraDepth - 0.25))
    local Target, TargetPoint = Workspace:FindPartOnRayWithIgnoreList(TargetRay, self.ObstacleBlacklist)
    if Target then
        Handle.ImageTransparency = 1
    elseif Handle.ImageTransparency == 1 then
        Handle.ImageTransparency = 0.33
    end
end

function ArcHandles:UpdateCircle(Axis, Lines)
    local Camera = self.Camera

    -- Get adornee CFrame and size
    local AdorneeCFrame = self.IsAdorneeModel and
        self.Adornee:GetModelCFrame() or
        self.Adornee.CFrame
    local AdorneeSize = self.IsAdorneeModel and
        self.Adornee:GetModelSize() or
        self.Adornee.Size

    -- Get circle information
    local AxisVector = Vector3.FromAxis(Axis)
    local CircleVector = Vector3.FromNormalId(self.AxisToSide[Axis])

    -- Determine circle radius
    local ViewportPoint, CameraDepth, Visible = WorldToViewportPoint(Camera, AdorneeCFrame.p)
    local StudWidth = 2 * math.tan(math.rad(Camera.FieldOfView) / 2) * CameraDepth
    local StudsPerPixel = StudWidth / Camera.ViewportSize.X
    local HandlePadding = math.max(1, StudsPerPixel * 14) * (self.IsMouseAvailable and 1 or 1.6)
    local AdorneeRadius = AdorneeSize.magnitude / 2
    local Radius = AdorneeRadius + 2 * HandlePadding

    -- Determine angle of each circle slice
    local Angle = 2 * math.pi / #Lines

    -- Circle thickness (px)
    local Thickness = 1.5

    -- Redraw lines for circle
    for i, Line in ipairs(Lines) do

        -- Calculate arc's endpoints
        local From = CFrame.fromAxisAngle(AxisVector, Angle * (i - 1)) *
            (CircleVector * Radius)
        local To = CFrame.fromAxisAngle(AxisVector, Angle * i) *
            (CircleVector * Radius)
        local Center = From:Lerp(To, 0.5)

        -- Determine thickness of line (in studs)
        local ViewportPoint, CameraDepth, Visible = WorldToViewportPoint(Camera, AdorneeCFrame * Center)
        local StudWidth = 2 * math.tan(math.rad(Camera.FieldOfView) / 2) * CameraDepth
        local StudsPerPixel = StudWidth / Camera.ViewportSize.X
        Line.Radius = Thickness * StudsPerPixel / 2

        -- Position line between the endpoints
        Line.CFrame = CFrame.new(Center, To) *
            CFrame.new(0, 0, Line.Radius / 2)

        -- Make line span between endpoints
        Line.Height = (To - From).magnitude

    end
end

function ArcHandles:Destroy()

    -- Pause updating
    self.Running = nil

    -- Clean up resources
    self.Maid:Destroy()

end

return ArcHandles


Prompt: --- Alternative to WaitForChild which doesn't error and has custom wait time

Response:
local function WaitFor(parent, index) --- funny
	if not parent then
		return print("Failed to grab " .. index .. " (" .. parent.Name .. " is nil)", true)
	end
	local _t = tick()
	while (tick() - _t) <= waitTimeout do
		local child = parent:FindFirstChild(index)
		if child then
			return child
		end
		_L.RunService.Heartbeat:Wait()
	end
	return print("Failed to grab " .. index, true)
end

Player.Get = function(instance, player)
	if isClient then
		player = player or game.Players.LocalPlayer
	end
	player = (type(player) == "string" and game.Players:FindFirstChild(player) or player)
	instance = instance or "Player"
	instance = string.lower(instance)

	--- Wait for player + character to EXIST!
	local _t = tick()
	while (player and (not player.Character) and (tick() - _t < waitTimeout)) do  _L.RunService.Stepped:Wait()  end
	if (not player) or (tick() - _t) >= waitTimeout then  return  end

	--- Get humanoid & rigtype
	local humanoid = player.Character:FindFirstChild("Humanoid")
	local rigType = defaultRigType --- this will be default if humanoid cannot be read
	if humanoid then
		rigType = humanoid.RigType
	end

	--- R6 Compatibility
	if rigType == Enum.HumanoidRigType.R6 then
		if instance == "torso" then
			return WaitFor(player.Character, "Torso")
		elseif instance == "leftarm" then
			return WaitFor(player.Character, "LeftArm")
		elseif instance == "leftleg" then
			return WaitFor(player.Character, "LeftLeg")
		elseif instance == "rightarm" then
			return WaitFor(player.Character, "RightArm")
		elseif instance == "rightleg" then
			return WaitFor(player.Character, "RightLeg")
		end
	end

	--- R15 + everything else
	if instance == "player" or (not instance) then
		return player
	elseif instance == "character" then
		return player.Character
	elseif instance == "head" then
		return WaitFor(player.Character, "Head")
	elseif instance == "torso" or instance == "uppertorso" then
		return WaitFor(player.Character, "UpperTorso")
	elseif instance == "rootpart" or instance == "humanoidrootpart" then
		return WaitFor(player.Character, "HumanoidRootPart")
	elseif instance == "humanoid" then
		return WaitFor(player.Character, "Humanoid")
	elseif instance == "lowertorso" then
		return WaitFor(player.Character, "LowerTorso")
	elseif instance == "leftfoot" then
		return WaitFor(player.Character, "LeftFoot")
	elseif instance == "lefthand" then
		return WaitFor(player.Character, "LeftHand")
	elseif instance == "leftlowerarm" then
		return WaitFor(player.Character, "LeftLowerArm")
	elseif instance == "leftlowerleg" then
		return WaitFor(player.Character, "LeftLowerLeg")
	elseif instance == "leftupperarm" then
		return WaitFor(player.Character, "LeftUpperArm")
	elseif instance == "leftupperleg" then
		return WaitFor(player.Character, "LeftUpperLeg")
	elseif instance == "rightfoot" then
		return WaitFor(player.Character, "RightFoot")
	elseif instance == "righthand" then
		return WaitFor(player.Character, "RightHand")
	elseif instance == "rightlowerarm" then
		return WaitFor(player.Character, "RightLowerArm")
	elseif instance == "rightlowerleg" then
		return WaitFor(player.Character, "RightLowerLeg")
	elseif instance == "rightupperarm" then
		return WaitFor(player.Character, "RightUpperArm")
	elseif instance == "rightupperleg" then
		return WaitFor(player.Character, "RightUpperLeg")
	elseif instance == "root" then
		return WaitFor(WaitFor(player.Character, "LowerTorso"), "Root")
	elseif instance == "waist" then
		return WaitFor(WaitFor(player.Character, "UpperTorso"), "Waist")
	elseif instance == "neck" then
		return WaitFor(WaitFor(player.Character, "Head"), "Neck")
	elseif instance == "leftankle" then
		return WaitFor(WaitFor(player.Character, "LeftFoot"), "LeftAnkle")
	elseif instance == "leftwrist" then
		return WaitFor(WaitFor(player.Character, "LeftHand"), "LeftWrist")
	elseif instance == "leftelbow" then
		return WaitFor(WaitFor(player.Character, "LeftLowerArm"), "LeftElbow")
	elseif instance == "leftknee" then
		return WaitFor(WaitFor(player.Character, "LeftLowerLeg"), "LeftKnee")
	elseif instance == "leftshoulder" then
		return WaitFor(WaitFor(player.Character, "LeftUpperArm"), "LeftShoulder")
	elseif instance == "lefthip" then
		return WaitFor(WaitFor(player.Character, "LeftUpperLeg"), "LeftHip")
	elseif instance == "rightankle" then
		return WaitFor(WaitFor(player.Character, "RightFoot"), "RightAnkle")
	elseif instance == "rightwrist" then
		return WaitFor(WaitFor(player.Character, "RightHand"), "RightWrist")
	elseif instance == "rightelbow" then
		return WaitFor(WaitFor(player.Character, "RightLowerArm"), "RightElbow")
	elseif instance == "rightknee" then
		return WaitFor(WaitFor(player.Character, "RightLowerLeg"), "RightKnee")
	elseif instance == "rightshoulder" then
		return WaitFor(WaitFor(player.Character, "RightUpperArm"), "RightShoulder")
	elseif instance == "righthip" then
		return WaitFor(WaitFor(player.Character, "RightUpperLeg"), "RightHip")
	elseif instance == "playergui" then
		return player:WaitForChild("PlayerGui")
	elseif instance == "starterplayer" then
		return player:WaitForChild("StarterPlayer")
	elseif instance == "mouse" then
		return player:GetMouse()
	elseif instance == "camera" then
		return game.Workspace.CurrentCamera
	elseif instance == "name" then
		return player.Name
	end
end


Prompt:
-- Test Module
-- Username
-- August 29, 2020

Response:
local TestModule = {}

function TestModule:Start()
	print("Test Module loaded.")

	self.Controllers.HelloController:SayHello()
	while (not TestModule.ABC) do
		wait()
	end
end

function TestModule:Init()

end

return TestModule


Prompt: ----------------------This is just an example-----------------------------

Response:
	script.Parent.Parent.Ammo.Visible = true
	script.Parent.Parent.Ammo.Text = ammo.value


Prompt: --script.Parent.CCC.Velocity = script.Parent.CCC.CFrame.lookVector *script.Parent.Speed.Value

Response:
script.Parent.CCCC.Velocity = script.Parent.CCCC.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.D.Velocity = script.Parent.D.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.DD.Velocity = script.Parent.DD.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.DDD.Velocity = script.Parent.DDD.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.DDDD.Velocity = script.Parent.DDDD.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.E.Velocity = script.Parent.E.CFrame.lookVector *script.Parent.Speed.Value


Prompt: -- Battery1 --

Response:
Battery.Interaction.Touched:Connect(function(hit)
	if hit.Parent:IsA("Tool") and hit.Parent.Name == ToolRequired then
		Battery.Battery1.Transparency = 0
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			hit.Parent:Destroy()
		end
		Battery.Parent.SoundPart.Insert:Play()
		Battery.Parent.Light2.Color = Color3.fromRGB(0,255,0)
		LocksLeft.Value = LocksLeft.Value - 1
		Battery.Battery1Script.Disabled = true
	end
end)

Battery.Interaction.ClickDetector.MouseClick:Connect(function(plr)
	if plr.Backpack:FindFirstChild(Battery.ToolRequired.Value) then
		Battery.Battery1.Transparency = 0
		if game.ReplicatedStorage.ItemSwitching.Value == true then
			plr.Backpack:FindFirstChild(ToolRequired):Destroy()
		end
		Battery.Parent.SoundPart.Insert:Play()
		Battery.Parent.Light2.Color = Color3.fromRGB(0,255,0)
		LocksLeft.Value = LocksLeft.Value - 1
		Battery.Battery1Script.Disabled = true
	end
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
local EffectFunctions =
{
	function(hum,dir) hum:TakeDamage(1) end,
	function(hum,dir) hum:TakeDamage(-1) end,
	function(hum,dir)
		if hum.Torso then
			local nforce = Instance.new('BodyForce')
			nforce.force = dir*100
			nforce.Parent = hum.Torso
			hum.Sit = true
			game.Debris:AddItem(nforce,.2)
			Delay(.2,function() hum.Sit = false end)
		end
	end
}
Tool.Equipped:connect(function(mouse)
	--game.Players.LocalPlayer:GetMouse()
	Spawn(function()
		local colorChoice = 1
		if not Tool.Parent:FindFirstChild('Torso') or not Tool.Parent.Torso:FindFirstChild('Right Shoulder') or not Tool.Parent:FindFirstChild('Humanoid') then return end
		LazerSound:Play()
		nweld = Tool.Parent.Torso['Right Shoulder']
		oldC0 = nweld.C0
		nweld.CurrentAngle = 0
		nweld.DesiredAngle = 0
		nweld.MaxVelocity = 0
		mouse.Button1Down:connect(function()
			colorChoice=colorChoice+1
			if colorChoice>#ColorChoices then colorChoice =1 end
			LazerSound.Pitch = .75+((colorChoice*.25)*3)
		end)
		equipped = true
		while equipped and Tool.Parent:FindFirstChild('Torso') do
			local tframe = Tool.Parent.Torso.CFrame
			tframe = tframe + tframe:vectorToWorldSpace(Vector3.new(1, 0.5, 0))
			local taim = mouse.Hit.p -( tframe.p )
			nweld.C0 = (CFrame.new(Vector3.new(),tframe:vectorToObjectSpace(taim))*CFrame.Angles(0,math.pi/2,0))+Vector3.new( 1, 0.5, 0 )
			rayparts = CastLightRay(Handle.CFrame.p+Handle.CFrame:vectorToWorldSpace(StartOffset[colorChoice]),mouse.Hit.p,ColorChoices[colorChoice], 5, .2,rayparts, EffectFunctions[colorChoice])
			LazerSound.Volume = ((math.sin(tick()*3)+1)*.25)+.25
			wait()
		end
		nweld.C0 =oldC0
		LazerSound:Stop()
	end)
end)

Tool.Unequipped:connect(function(mouse)
	equipped= false
	LazerSound:Stop()
	for i=1,50,1 do
		if rayparts[i] then
			rayparts[i]:Destroy()
			rayparts[i]=nil
		end
	end
	if nweld then
		nweld.MaxVelocity =.15
		nweld.C0 =oldC0
	end

end)


Response:
Edit = {
U = {{CFrame.new(0,0.03*(3.5/TimeOpen),0),TimeOpen*SL}},
D = {{CFrame.new(0,-0.03*(3.5/TimeOpen),0),TimeOpen*SL}},
R = {{CFrame.new(-0.03*(3.5/TimeOpen),0,0),TimeOpen*SL,TimeOpen}},
L = {{CFrame.new(0.03*(3.5/TimeOpen),0,0),TimeOpen*SL,TimeOpen}},
}
WaitTime = 7.5


Prompt: --Kinglime

Response:
while true do
script.Parent.Velocity = script.Parent.CFrame.lookVector *script.Parent.Speed.Value
wait(0.1)
end


Prompt: -- Adds numParts more parts to the cache.

Response:
function PartCacheStatic:Expand(numParts: number): ()
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("Expand", "PartCache.new"))
	if numParts == nil then
		numParts = self.ExpansionSize
	end

	for i = 1, numParts do
		table.insert(self.Open, MakeFromTemplate(self.Template, self.CurrentCacheParent))
	end
end


Prompt: --DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!

Response:
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.SuperSpeedRibbon -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)


Prompt:
--This will change all player's characters into R6 1.0.
--You can either modify this script or use another script to change the player's 'package'.

Response:
script:WaitForChild("R6 Camera").Parent = game.StarterPlayer.StarterPlayerScripts
script:WaitForChild("R6").Parent = game:GetService("ReplicatedStorage")
game.Players.PlayerAdded:connect(function(p)
	p.CharacterAdded:connect(function(c)
		if not p.Character:FindFirstChild("R6") then
			game.Workspace:WaitForChild(p.Name)
			local r = game:GetService("ReplicatedStorage"):WaitForChild("R6"):Clone()
			r.Name = p.Name
			r.Parent = game.Workspace
			r.HumanoidRootPart.CFrame = CFrame.new(c.HumanoidRootPart.Position)
			r:WaitForChild("Body Colors")
			c:WaitForChild("Body Colors")
			local b1 = r["Body Colors"]
			local b2 = c["Body Colors"]
			b1.HeadColor = b2.HeadColor
			b1.LeftArmColor = b2.LeftArmColor
			b1.LeftLegColor = b2.LeftLegColor
			b1.RightArmColor = b2.RightArmColor
			b1.RightLegColor = b2.RightLegColor
			b1.TorsoColor = b2.TorsoColor
			r:WaitForChild("Head"):WaitForChild("face").Texture = c.Head.face.Texture
			for _,h in pairs(c:GetChildren()) do
				if h.ClassName == "Accessory" or h.ClassName == "Hat" or h.ClassName == "Shirt" or h.ClassName == "Pants" or h.ClassName == "Shirt Graphic" then
					h.Parent = game.Workspace
					h.Parent = r
				end
			end
			c:Destroy()
			p.Character = r
			wait()
			p.Character:WaitForChild("Animate").Disabled = false
		end
	end)
end)


Prompt:
-----------------
--| Constants |--
-----------------

Response:
local GRAVITY_ACCELERATION = workspace.Gravity

local RELOAD_TIME = 3 -- Seconds until tool can be used again
local ROCKET_SPEED = 80 -- Speed of the projectile

local MISSILE_MESH_ID = 'http://www.roblox.com/asset/?id=2251534'
local MISSILE_MESH_SCALE = Vector3.new(0.35, 0.35, 0.25)
local ROCKET_PART_SIZE = Vector3.new(1.2, 1.2, 3.27)


Prompt:
--!strict
--[=[
  @function merge
  @within Set

  @param ... ...any -- The sets to merge.
  @return { [T]: boolean } -- The merged set.

  Combines one or more sets into a single set.

  Aliases: `join`, `union`

  ```lua
  local set1 = { hello = true, world = true }
  local set2 = { cat = true, dog = true, hello = true }

  local merge = Merge(set1, set2) -- { hello = true, world = true, cat = true, dog = true }
  ```
]=]

Response:
local function merge<T>(...: any): { [T]: boolean }
	local result = {}

	for setIndex = 1, select("#", ...) do
		local set = select(setIndex, ...)

		if type(set) ~= "table" then
			continue
		end

		for key, _ in pairs(set) do
			result[key] = true
		end
	end

	return result
end

return merge


Prompt:
--[[
	Returns the currentMinigame object
]]

Response:
function RoundController.getCurrentMinigame()
	return currentMinigame
end

return RoundController


Prompt:
--[=[
	Retrieves the full path of this datastore stage for diagnostic purposes.
	@return string
]=]

Response:
function DataStoreStage:GetFullPath()
	if self._loadParent then
		return self._loadParent:GetFullPath() .. "." .. tostring(self._loadName)
	else
		return tostring(self._loadName)
	end
end


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

Response:
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	return plrData.Classes.Base.Smasher.Obtained.Value == false
end


Prompt: -- Unlock the camera:

Response:
function CamLock.Unlock()
	cam.CameraType = Enum.CameraType.Custom
	plane = nil
end

return CamLock


Prompt: -- ROBLOX deviation: ansi-styles not ported

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

local LuauPolyfill = require(Packages.LuauPolyfill)
local Error = LuauPolyfill.Error
local Object = LuauPolyfill.Object
local extends = LuauPolyfill.extends
local isNaN = LuauPolyfill.Number.isNaN

local Collections = require(CurrentModule.Collections)
local printTableEntries = Collections.printTableEntries
local printListItems = Collections.printListItems

local AsymmetricMatcher = require(CurrentModule.plugins.AsymmetricMatcher)
local ConvertAnsi = require(CurrentModule.plugins.ConvertAnsi)
local RobloxInstance = require(CurrentModule.plugins.RobloxInstance)
local ReactElement = require(CurrentModule.plugins.ReactElement)
local ReactTestComponent = require(CurrentModule.plugins.ReactTestComponent)

local JestGetType = require(Packages.JestGetType)
local getType = JestGetType.getType
local isRobloxBuiltin = JestGetType.isRobloxBuiltin

local Types = require(CurrentModule.Types)
export type Colors = Types.Colors
export type CompareKeys = Types.CompareKeys
export type Config = Types.Config
export type Options = Types.Options
export type OptionsReceived = Types.OptionsReceived
export type OldPlugin = Types.OldPlugin
export type NewPlugin = Types.NewPlugin
export type Plugin = Types.Plugin
export type Plugins = Types.Plugins
export type PrettyFormatOptions = Types.PrettyFormatOptions
export type Printer = Types.Printer
export type Refs = Types.Refs
export type Theme = Types.Theme

local PrettyFormatPluginError = extends(Error, "PrettyFormatPluginError", function(self, message)
	self.name = "PrettyFormatPluginError"
	self.message = message
end)


Prompt: -- Given a part, will return return the character from the given part.

Response:
function PartUtility.GetCharacterFromInstance_R(part)
	local model = part:FindFirstAncestorOfClass("Model")
	if model and model:FindFirstChild("Humanoid") then
		return model
	elseif model then
		PartUtility.GetCharacterFromInstance_R(model)
	end
end

function PartUtility.MakeInvisible(model)
	for _, child in pairs(model:GetDescendants()) do
		if child:IsA("BasePart") then
			child:SetAttribute("InitialTransparency",child.Transparency)
			child.Transparency = 1
		end
	end
end

function PartUtility.RestoreVisibility(model)
	for _, child in pairs(model:GetDescendants()) do
		if child:IsA("BasePart") then
			child.Transparency = child:GetAttribute("InitialTransparency") and child:GetAttribute("InitialTransparency") or 0
		end
	end
end

function PartUtility.MakeVisible(model)
	for _, child in pairs(model:GetDescendants()) do
		if child:IsA("BasePart") then
			child.Transparency = 0
		end
	end
end

return PartUtility


Prompt: ----- Connections -----

Response:
Players.PlayerAdded:Connect(function(player)
	PlayerReference[player] = true
end)

Players.PlayerRemoving:Connect(function(player)
	PlayerReference[player] = nil
	-- Automatic player reference cleanup:
	for rate_limiter in pairs(RateLimiters) do
		rate_limiter._sources[player] = nil
	end
end)

return RateLimiter


Prompt: -- Copied from GenericButton. TODO: factor it out

Response:
return function(contentMap, controlState, style)
	local contentThemeClass = contentMap[controlState]
		or contentMap[ControlState.Default]

	local contentStyle = {
		Color = style.Theme[contentThemeClass].Color,
		Transparency = style.Theme[contentThemeClass].Transparency,
	}

	--Based on the design specs, the disabled and pressed state is 0.5 * alpha value
	if controlState == ControlState.Disabled or
		controlState == ControlState.Pressed then
			contentStyle.Transparency = 0.5 * contentStyle.Transparency + 0.5
	end
	return contentStyle
end


Prompt: --------STAGE--------

Response:
game.Workspace.back1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.back2.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.crewbig1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.crewsmall1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.djstand.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.djtv.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.side1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.side2.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.side3.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.side4.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.side11.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.side12.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
game.Workspace.sidebig1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""

if game.Workspace.CurrentStageTV.Value == "1" then
game.Workspace.main1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.CustomScreen.Value)..""
end


Prompt: -- Services

Response:
local Teams = game:GetService("Teams")
local Workspace = game:GetService("Workspace")
local Debris = game:GetService("Debris")
local ContentProvider = game:GetService("ContentProvider")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")


Prompt:
--[=[
	Pops an entry from the left of the queue
	@return T
]=]

Response:
function Queue:PopLeft()
	if self._first > self._last then
		error("Queue is empty")
	end

	local value = self[self._first]
	self[self._first] = nil
	self._first = self._first + 1

	return value
end


Prompt: --create tables:

Response:
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "a" then
		table.insert(a, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "b" then
		table.insert(b, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "c" then
		table.insert(c, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "d" then
		table.insert(d, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "e" then
		table.insert(e, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "f" then
		table.insert(f, 1, part)
	end
end

function on(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = true
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = true
		end
	end
end

function off(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = false
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = false
		end
	end
end

function run() --mian

	off(a)--turns all lights off
	off(b)
	off(c)
	off(d)
	off(e)
	off(f)

	if pattern == "Flash" then
		repeat
			local w = 0.45
			off(c)
			off(d)
			on(a)
			on(b)
			on(e)
			on(f)
			wait(w)

			off(a)
			off(b)
			off(e)
			off(f)
			on(c)
			on(d)
			wait(w)

		until pattern ~= "Flash"
		return
	end

	if pattern == "Left" then
		repeat
		local w = 0.15
		on(f)
		wait(w)
		on(e)
		wait(w)
		on(d)
		wait(w)
		on(c)
		wait(w)
		on(b)
		wait(w)
		on(a)
		wait(w)

		off(f)
		wait(w)
		off(e)
		wait(w)
		off(d)
		wait(w)
		off(c)
		wait(w)
		off(b)
		wait(w)
		off(a)
		wait(w)
		until pattern ~= "Left"
		return
	end

	if pattern == "Right" then
		repeat
		local w = 0.15
		on(a)
		wait(w)
		on(b)
		wait(w)
		on(c)
		wait(w)
		on(d)
		wait(w)
		on(e)
		wait(w)
		on(f)
		wait(w)

		off(a)
		wait(w)
		off(b)
		wait(w)
		off(c)
		wait(w)
		off(d)
		wait(w)
		off(e)
		wait(w)
		off(f)
		wait(w)
		until pattern ~= "Right"
		return
	end

	if pattern == "Split" then
		repeat
		local w = 0.2
		on(c)
		on(d)
		wait(w)
		on(b)
		on(e)
		wait(w)
		on(a)
		on(f)
		wait(w)

		off(c)
		off(d)
		wait(w)
		off(b)
		off(e)
		wait(w)
		off(a)
		off(f)
		wait(w)
		until pattern ~= "Split"
		return
	end
end--run end


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

local AvatarEditor = ReplicatedStorage.AvatarEditor
local Maid = require(AvatarEditor.Shared.Util.Maid)
local Promise = require(AvatarEditor.Shared.Util.Promise)
local GuiLib = require(AvatarEditor.Client.GuiLib.LazyLoader)
local Theme = require(AvatarEditor.Client.Theme)

local player = Players.LocalPlayer

local Class = {}
Class.__index = Class

function Class.new(frame)
	local self = setmetatable({}, Class)

	self.Frame = frame
	self.ScrollingFrame = self.Frame.ScrollingFrame
	self.Maid = Maid.new()

	self.Maid:GiveTask(Theme:Bind(self.ScrollingFrame, "ScrollBarImageColor3", "Scrollbar"))
	self.Maid:GiveTask(Theme:Bind(self.ScrollingFrame.Theme.DropdownButton, "BackgroundColor3", "Tertiary"))
	self.Maid:GiveTask(Theme:Bind(self.ScrollingFrame.Theme.DropdownButton.ListFrame, "BackgroundColor3", "Tertiary"))
	self.Maid:GiveTask(Theme:Bind(self.ScrollingFrame.Theme.DropdownButton.Arrow, "ImageColor3", "Deselected"))
	self.Maid:GiveTask(Theme:Bind(self.ScrollingFrame.Theme.DropdownButton.Option, "TextColor3", "Text"))
	self.Maid:GiveTask(Theme:Bind(self.ScrollingFrame.Theme.TextLabel, "TextColor3", "Text"))

	local dropdownButton = self.ScrollingFrame.Theme.DropdownButton
	for i, v in ipairs(Theme:GetAll()) do
		local button = AvatarEditor.DropdownTemplate:Clone()
		button.LayoutOrder = i
		button.Text = v
		button.Name = v
		self.Maid:GiveTask(Theme:Bind(button, "BackgroundColor3", "Tertiary"))
		self.Maid:GiveTask(Theme:Bind(button, "TextColor3", "Text"))
		self.Maid:GiveTask(button)
		button.Parent = dropdownButton.ListFrame.ScrollFrame
	end
	self.Maid:GiveTask(Theme:Bind(dropdownButton.ListFrame.ScrollFrame, "ScrollBarImageColor3", "Scrollbar"))

	-- for some reason AutomaticCanvasSize doesnt want to work here...
	dropdownButton.ListFrame.ScrollFrame.CanvasSize = UDim2.new(0, 0, 0, dropdownButton.ListFrame.ScrollFrame.UIListLayout.AbsoluteContentSize.Y)

	local themeDropdown = GuiLib.Classes.Dropdown.new(dropdownButton, dropdownButton.ListFrame)
	self.Maid:GiveTask(themeDropdown)

	self.Maid:GiveTask(themeDropdown.Changed:Connect(function(button)
		local theme = button.Name
		Theme:Set(theme)
	end))

	Promise.new(function(resolve, reject)
		local folder = player:WaitForChild("AE_Settings")
		resolve(folder)
	end)
	:andThen(function(folder)
		self.Folder = folder

		themeDropdown:Set(dropdownButton.ListFrame.ScrollFrame[self.Folder:GetAttribute("Theme")])
		Theme:Set(themeDropdown:Get().Name)
	end)
	:catch(warn)

	return self
end

function Class:Destroy()
	self.Maid:DoCleaning()
	self.Maid = nil
	setmetatable(self, nil)
end

return Class


Prompt:
--[[
    Instantiates object fields
]]

Response:
function VehicleSoundComponent:setup()
	local idle = CarSoundsFolder:FindFirstChild("Idle")
	local engine = CarSoundsFolder:FindFirstChild("Engine")
	local skid = CarSoundsFolder:FindFirstChild("Skid")
	local boost = CarSoundsFolder:FindFirstChild("Boost")

	self.idle = idle:Clone()
	self.engine = engine:Clone()
	self.skid = skid:Clone()
	self.boost = boost:Clone()

	self.idle.Parent = self.model.PrimaryPart
	self.engine.Parent = self.model.PrimaryPart
	self.skid.Parent = self.model.PrimaryPart
	self.boost.Parent = self.model.PrimaryPart

	self.idle.Volume = 0
	self.engine.Volume = 0
	self.skid.Volume = 0
	self.boost.Volume = 0

	self.idle:Play()
	self.engine:Play()
	self.skid:Play()
	self.boost:Play()

	coroutine.wrap(
		function()
			while self.model and self.model.Parent do
				self:updateSounds()
				wait(0.5)
			end
		end
	)()
end


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

Response:
return function(player, dialogueFolder)
	local ClassInformationTable = require(game.ReplicatedStorage.Source.Modules.CharacterScripts.Classes.ClassInformation)
	return ClassInformationTable:GetClassFolder(player,"Warlock").Firespread.Value and ClassInformationTable:GetClassFolder(player,"Warlock").FastCasting.Value ~= true
end


Prompt: --------LEFT DOOR --------

Response:
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)


Prompt: -- Important parts --

Response:
local faucet = p.Faucet
local faucetParticles = p.Tap.ParticleEmitter
local showerHead = p.ShowerHead.Spout.ParticleEmitter
local bathPlug = p.Plug
local showerPlug = p.ShowerPlug


Prompt: -- Local variables

Response:
local PlayersCanSpawn = false
local GameRunning = false


Prompt: -- Libraries

Response:
local Roact = require(Vendor:WaitForChild 'Roact')
local Maid = require(Libraries:WaitForChild 'Maid')


Prompt: --[[Run]]

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

	--Runtime Loops

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

		--Power
		Engine()

		--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.Boost.Value = (_Boost/2)*_TPsi
		script.Parent.Values.Horsepower.Value = _HP
		script.Parent.Values.HpNatural.Value = _NH
		script.Parent.Values.HpBoosted.Value = _BH*(_Boost/2)
		script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
		script.Parent.Values.TqNatural.Value = _NT
		script.Parent.Values.TqBoosted.Value = _BT*(_Boost/2)
		script.Parent.Values.TransmissionMode.Value = _TMode
		script.Parent.Values.Throttle.Value = _GThrot*_GThrotShift
		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.TCSAmt.Value = 1-_TCSAmt
		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
		--Automatic Transmission
		if _TMode == "Auto" then Auto() end

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


Prompt: --Toggle Lights 1 or 0

Response:
function Chassis.ToggleLights()
	local lightR = Chassis.Body.lightR
	local lightL = Chassis.Body.lightL
	local lightValue = lightR.SurfaceLight.Enabled

	lightR.SurfaceLight.Enabled = not lightValue
	lightL.SurfaceLight.Enabled = not lightValue
end


Prompt:
--[=[
	Concats `target` with `source`.

	@param target table -- Table to append to
	@param source table -- Table read from
	@return table -- parameter table
]=]

Response:
function Table.append(target, source)
	for _, value in pairs(source) do
		target[#target+1] = value
	end

	return target
end


Response:
script.Parent.ClickDetector.MouseClick:Connect(function()
	if isopen == false then
		isopen = true
		script.Parent.DoorOpen:Play()
		doormotor.Motor.DesiredAngle = -0.8
	else
		isopen = false
		script.Parent.DoorClose:Play()
		doormotor.Motor.DesiredAngle = 0
	end
end)


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

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

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

ZoneModelName = "Explode Zone" -- name the zone model

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


Prompt:
--[[

!Reminder!

Format to calculate hour's rotation:

90 * DateTimeTable.hour / 3 (1 to 12) or (90 * DateTimeTable.hour / 3) / 3) (12 to 24)

Every 3 hours the needle will rotate 90 degrees.

Format to calculate second's rotation:

90 * DateTimeTable.min / 15 (1 to 30) or (90 * DateTimeTable.min / 15) / 15) (30 to 60)

Every 15 minutes the needle will rotate 90 degrees.

Format to calculate second's rotation:

90 * DateTimeTable.sec / 15 (1 to 30) or  (90 * DateTimeTable.sec / 15) / 15) (30 to 60)

Every 15 seconds the needle will rotate 90 degrees.

]]