Prompt:
--[[
	The reconciler is the mechanism in Roact that constructs the virtual tree
	that later gets turned into concrete objects by the renderer.

	Roact's reconciler is constructed with the renderer as an argument, which
	enables switching to different renderers for different platforms or
	scenarios.

	When testing the reconciler itself, it's common to use `NoopRenderer` with
	spies replacing some methods. The default (and only) reconciler interface
	exposed by Roact right now uses `RobloxRenderer`.
]]

Response:
local function createReconciler(renderer)
	local reconciler
	local mountVirtualNode
	local updateVirtualNode
	local unmountVirtualNode

	--[[
		Unmount the given virtualNode, replacing it with a new node described by
		the given element.

		Preserves host properties, depth, and legacyContext from parent.
	]]
	local function replaceVirtualNode(virtualNode, newElement)
		local hostParent = virtualNode.hostParent
		local hostKey = virtualNode.hostKey
		local depth = virtualNode.depth
		local parent = virtualNode.parent

		-- If the node that is being replaced has modified context, we need to
		-- use the original *unmodified* context for the new node
		-- The `originalContext` field will be nil if the context was unchanged
		local context = virtualNode.originalContext or virtualNode.context
		local parentLegacyContext = virtualNode.parentLegacyContext

		-- If updating this node has caused a component higher up the tree to re-render
		-- and updateChildren to be re-entered then this node could already have been
		-- unmounted in the previous updateChildren pass.
		if not virtualNode.wasUnmounted then
			unmountVirtualNode(virtualNode)
		end
		local newNode = mountVirtualNode(newElement, hostParent, hostKey, context, parentLegacyContext)

		-- mountVirtualNode can return nil if the element is a boolean
		if newNode ~= nil then
			newNode.depth = depth
			newNode.parent = parent
		end

		return newNode
	end

	--[[
		Utility to update the children of a virtual node based on zero or more
		updated children given as elements.
	]]
	local function updateChildren(virtualNode, hostParent, newChildElements)
		if config.internalTypeChecks then
			internalAssert(Type.of(virtualNode) == Type.VirtualNode, "Expected arg #1 to be of type VirtualNode")
		end

		virtualNode.updateChildrenCount = virtualNode.updateChildrenCount + 1

		local currentUpdateChildrenCount = virtualNode.updateChildrenCount

		local removeKeys = {}

		-- Changed or removed children
		for childKey, childNode in pairs(virtualNode.children) do
			local newElement = ElementUtils.getElementByKey(newChildElements, childKey)
			local newNode = updateVirtualNode(childNode, newElement)

			-- If updating this node has caused a component higher up the tree to re-render
			-- and updateChildren to be re-entered for this virtualNode then
			-- this result is invalid and needs to be disgarded.
			if virtualNode.updateChildrenCount ~= currentUpdateChildrenCount then
				if newNode and newNode ~= virtualNode.children[childKey] then
					unmountVirtualNode(newNode)
				end
				return
			end

			if newNode ~= nil then
				virtualNode.children[childKey] = newNode
			else
				removeKeys[childKey] = true
			end
		end

		for childKey in pairs(removeKeys) do
			virtualNode.children[childKey] = nil
		end

		-- Added children
		for childKey, newElement in ElementUtils.iterateElements(newChildElements) do
			local concreteKey = childKey
			if childKey == ElementUtils.UseParentKey then
				concreteKey = virtualNode.hostKey
			end

			if virtualNode.children[childKey] == nil then
				local childNode = mountVirtualNode(
					newElement,
					hostParent,
					concreteKey,
					virtualNode.context,
					virtualNode.legacyContext
				)

				-- If updating this node has caused a component higher up the tree to re-render
				-- and updateChildren to be re-entered for this virtualNode then
				-- this result is invalid and needs to be discarded.
				if virtualNode.updateChildrenCount ~= currentUpdateChildrenCount then
					if childNode then
						unmountVirtualNode(childNode)
					end
					return
				end

				-- mountVirtualNode can return nil if the element is a boolean
				if childNode ~= nil then
					childNode.depth = virtualNode.depth + 1
					childNode.parent = virtualNode
					virtualNode.children[childKey] = childNode
				end
			end
		end
	end

	local function updateVirtualNodeWithChildren(virtualNode, hostParent, newChildElements)
		updateChildren(virtualNode, hostParent, newChildElements)
	end

	local function updateVirtualNodeWithRenderResult(virtualNode, hostParent, renderResult)
		if Type.of(renderResult) == Type.Element or renderResult == nil or typeof(renderResult) == "boolean" then
			updateChildren(virtualNode, hostParent, renderResult)
		else
			error(
				("%s\n%s"):format(
					"Component returned invalid children:",
					virtualNode.currentElement.source or "<enable element tracebacks>"
				),
				0
			)
		end
	end

	--[[
		Unmounts the given virtual node and releases any held resources.
	]]
	function unmountVirtualNode(virtualNode)
		if config.internalTypeChecks then
			internalAssert(Type.of(virtualNode) == Type.VirtualNode, "Expected arg #1 to be of type VirtualNode")
		end

		virtualNode.wasUnmounted = true

		local kind = ElementKind.of(virtualNode.currentElement)

		-- selene: allow(if_same_then_else)
		if kind == ElementKind.Host then
			renderer.unmountHostNode(reconciler, virtualNode)
		elseif kind == ElementKind.Function then
			for _, childNode in pairs(virtualNode.children) do
				unmountVirtualNode(childNode)
			end
		elseif kind == ElementKind.Stateful then
			virtualNode.instance:__unmount()
		elseif kind == ElementKind.Portal then
			for _, childNode in pairs(virtualNode.children) do
				unmountVirtualNode(childNode)
			end
		elseif kind == ElementKind.Fragment then
			for _, childNode in pairs(virtualNode.children) do
				unmountVirtualNode(childNode)
			end
		else
			error(("Unknown ElementKind %q"):format(tostring(kind)), 2)
		end
	end

	local function updateFunctionVirtualNode(virtualNode, newElement)
		local children = newElement.component(newElement.props)

		updateVirtualNodeWithRenderResult(virtualNode, virtualNode.hostParent, children)

		return virtualNode
	end

	local function updatePortalVirtualNode(virtualNode, newElement)
		local oldElement = virtualNode.currentElement
		local oldTargetHostParent = oldElement.props.target

		local targetHostParent = newElement.props.target

		assert(renderer.isHostObject(targetHostParent), "Expected target to be host object")

		if targetHostParent ~= oldTargetHostParent then
			return replaceVirtualNode(virtualNode, newElement)
		end

		local children = newElement.props[Children]

		updateVirtualNodeWithChildren(virtualNode, targetHostParent, children)

		return virtualNode
	end

	local function updateFragmentVirtualNode(virtualNode, newElement)
		updateVirtualNodeWithChildren(virtualNode, virtualNode.hostParent, newElement.elements)

		return virtualNode
	end

	--[[
		Update the given virtual node using a new element describing what it
		should transform into.

		`updateVirtualNode` will return a new virtual node that should replace
		the passed in virtual node. This is because a virtual node can be
		updated with an element referencing a different component!

		In that case, `updateVirtualNode` will unmount the input virtual node,
		mount a new virtual node, and return it in this case, while also issuing
		a warning to the user.
	]]
	function updateVirtualNode(virtualNode, newElement, newState)
		if config.internalTypeChecks then
			internalAssert(Type.of(virtualNode) == Type.VirtualNode, "Expected arg #1 to be of type VirtualNode")
		end
		if config.typeChecks then
			assert(
				Type.of(newElement) == Type.Element or typeof(newElement) == "boolean" or newElement == nil,
				"Expected arg #2 to be of type Element, boolean, or nil"
			)
		end

		-- If nothing changed, we can skip this update
		if virtualNode.currentElement == newElement and newState == nil then
			return virtualNode
		end

		if typeof(newElement) == "boolean" or newElement == nil then
			unmountVirtualNode(virtualNode)
			return nil
		end

		if virtualNode.currentElement.component ~= newElement.component then
			return replaceVirtualNode(virtualNode, newElement)
		end

		local kind = ElementKind.of(newElement)

		local shouldContinueUpdate = true

		if kind == ElementKind.Host then
			virtualNode = renderer.updateHostNode(reconciler, virtualNode, newElement)
		elseif kind == ElementKind.Function then
			virtualNode = updateFunctionVirtualNode(virtualNode, newElement)
		elseif kind == ElementKind.Stateful then
			shouldContinueUpdate = virtualNode.instance:__update(newElement, newState)
		elseif kind == ElementKind.Portal then
			virtualNode = updatePortalVirtualNode(virtualNode, newElement)
		elseif kind == ElementKind.Fragment then
			virtualNode = updateFragmentVirtualNode(virtualNode, newElement)
		else
			error(("Unknown ElementKind %q"):format(tostring(kind)), 2)
		end

		-- Stateful components can abort updates via shouldUpdate. If that
		-- happens, we should stop doing stuff at this point.
		if not shouldContinueUpdate then
			return virtualNode
		end

		virtualNode.currentElement = newElement

		return virtualNode
	end

	--[[
		Constructs a new virtual node but not does mount it.
	]]
	local function createVirtualNode(element, hostParent, hostKey, context, legacyContext)
		if config.internalTypeChecks then
			internalAssert(
				renderer.isHostObject(hostParent) or hostParent == nil,
				"Expected arg #2 to be a host object"
			)
			internalAssert(typeof(context) == "table" or context == nil, "Expected arg #4 to be of type table or nil")
			internalAssert(
				typeof(legacyContext) == "table" or legacyContext == nil,
				"Expected arg #5 to be of type table or nil"
			)
		end
		if config.typeChecks then
			assert(hostKey ~= nil, "Expected arg #3 to be non-nil")
			assert(
				Type.of(element) == Type.Element or typeof(element) == "boolean",
				"Expected arg #1 to be of type Element or boolean"
			)
		end

		return {
			[Type] = Type.VirtualNode,
			currentElement = element,
			depth = 1,
			parent = nil,
			children = {},
			hostParent = hostParent,
			hostKey = hostKey,
			updateChildrenCount = 0,
			wasUnmounted = false,

			-- Legacy Context API
			-- A table of context values inherited from the parent node
			legacyContext = legacyContext,

			-- A saved copy of the parent context, used when replacing a node
			parentLegacyContext = legacyContext,

			-- Context API
			-- A table of context values inherited from the parent node
			context = context or {},

			-- A saved copy of the unmodified context; this will be updated when
			-- a component adds new context and used when a node is replaced
			originalContext = nil,
		}
	end

	local function mountFunctionVirtualNode(virtualNode)
		local element = virtualNode.currentElement

		local children = element.component(element.props)

		updateVirtualNodeWithRenderResult(virtualNode, virtualNode.hostParent, children)
	end

	local function mountPortalVirtualNode(virtualNode)
		local element = virtualNode.currentElement

		local targetHostParent = element.props.target
		local children = element.props[Children]

		assert(renderer.isHostObject(targetHostParent), "Expected target to be host object")

		updateVirtualNodeWithChildren(virtualNode, targetHostParent, children)
	end

	local function mountFragmentVirtualNode(virtualNode)
		local element = virtualNode.currentElement
		local children = element.elements

		updateVirtualNodeWithChildren(virtualNode, virtualNode.hostParent, children)
	end

	--[[
		Constructs a new virtual node and mounts it, but does not place it into
		the tree.
	]]
	function mountVirtualNode(element, hostParent, hostKey, context, legacyContext)
		if config.internalTypeChecks then
			internalAssert(
				renderer.isHostObject(hostParent) or hostParent == nil,
				"Expected arg #2 to be a host object"
			)
			internalAssert(
				typeof(legacyContext) == "table" or legacyContext == nil,
				"Expected arg #5 to be of type table or nil"
			)
		end
		if config.typeChecks then
			assert(hostKey ~= nil, "Expected arg #3 to be non-nil")
			assert(
				Type.of(element) == Type.Element or typeof(element) == "boolean",
				"Expected arg #1 to be of type Element or boolean"
			)
		end

		-- Boolean values render as nil to enable terse conditional rendering.
		if typeof(element) == "boolean" then
			return nil
		end

		local kind = ElementKind.of(element)

		local virtualNode = createVirtualNode(element, hostParent, hostKey, context, legacyContext)

		if kind == ElementKind.Host then
			renderer.mountHostNode(reconciler, virtualNode)
		elseif kind == ElementKind.Function then
			mountFunctionVirtualNode(virtualNode)
		elseif kind == ElementKind.Stateful then
			element.component:__mount(reconciler, virtualNode)
		elseif kind == ElementKind.Portal then
			mountPortalVirtualNode(virtualNode)
		elseif kind == ElementKind.Fragment then
			mountFragmentVirtualNode(virtualNode)
		else
			error(("Unknown ElementKind %q"):format(tostring(kind)), 2)
		end

		return virtualNode
	end

	--[[
		Constructs a new Roact virtual tree, constructs a root node for
		it, and mounts it.
	]]
	local function mountVirtualTree(element, hostParent, hostKey)
		if config.typeChecks then
			assert(Type.of(element) == Type.Element, "Expected arg #1 to be of type Element")
			assert(renderer.isHostObject(hostParent) or hostParent == nil, "Expected arg #2 to be a host object")
		end

		if hostKey == nil then
			hostKey = "RoactTree"
		end

		local tree = {
			[Type] = Type.VirtualTree,
			[InternalData] = {
				-- The root node of the tree, which starts into the hierarchy of
				-- Roact component instances.
				rootNode = nil,
				mounted = true,
			},
		}

		tree[InternalData].rootNode = mountVirtualNode(element, hostParent, hostKey)

		return tree
	end

	--[[
		Unmounts the virtual tree, freeing all of its resources.

		No further operations should be done on the tree after it's been
		unmounted, as indicated by its the `mounted` field.
	]]
	local function unmountVirtualTree(tree)
		local internalData = tree[InternalData]
		if config.typeChecks then
			assert(Type.of(tree) == Type.VirtualTree, "Expected arg #1 to be a Roact handle")
			assert(internalData.mounted, "Cannot unmounted a Roact tree that has already been unmounted")
		end

		internalData.mounted = false

		if internalData.rootNode ~= nil then
			unmountVirtualNode(internalData.rootNode)
		end
	end

	--[[
		Utility method for updating the root node of a virtual tree given a new
		element.
	]]
	local function updateVirtualTree(tree, newElement)
		local internalData = tree[InternalData]
		if config.typeChecks then
			assert(Type.of(tree) == Type.VirtualTree, "Expected arg #1 to be a Roact handle")
			assert(Type.of(newElement) == Type.Element, "Expected arg #2 to be a Roact Element")
		end

		internalData.rootNode = updateVirtualNode(internalData.rootNode, newElement)

		return tree
	end

	reconciler = {
		mountVirtualTree = mountVirtualTree,
		unmountVirtualTree = unmountVirtualTree,
		updateVirtualTree = updateVirtualTree,

		createVirtualNode = createVirtualNode,
		mountVirtualNode = mountVirtualNode,
		unmountVirtualNode = unmountVirtualNode,
		updateVirtualNode = updateVirtualNode,
		updateVirtualNodeWithChildren = updateVirtualNodeWithChildren,
		updateVirtualNodeWithRenderResult = updateVirtualNodeWithRenderResult,
	}

	return reconciler
end

return createReconciler


Prompt: -- Check1 done!

Response:
local Tool = script.Parent;
local dancer = nil
local humanoid = nil

enabled = true

function onActivated()
	if not enabled  then
		return
	end

	enabled = false
	humanoid = Tool.Parent:FindFirstChild("Humanoid")

	dancer = humanoid:LoadAnimation(script.lol)
	dancer:Play()
	Tool.Handle.overworld:Play()
	Tool.Handle.overworld.TimePosition = 1

end

function onEquipped()
	--Tool.Handle.EquipSound:play()
end

function onUnequipped()
	--Tool.Handle.EquipSound:stop()
	enabled = true
	if dancer ~= nil then
		Tool.Handle.switchh:Stop()
		Tool.Handle.overworld:Stop()
		dancer:Stop()
	end
end

Tool.Activated:connect(onActivated)
Tool.Equipped:connect(onEquipped)
Tool.Unequipped:connect(onUnequipped)


Prompt: --Properties

Response:
local NPC = script.Parent.Parent -- who is talking (in this case workspace.NPC)
local CC = Enum.ChatColor.Red -- you can change the NPC'S chat color to Red to Blue, Green or White
local waittime = 2 -- time you have to wait for the NPC's reply
local playerchat = "who" -- what the player will chat for the NPC to reply


Prompt: -- A state object whose value is derived from other objects using a callback.

Response:
export type Computed<T> = PubTypes.Computed<T> & {
	_oldDependencySet: Set<PubTypes.Dependency>,
	_callback: () -> T,
	_value: T
}


Prompt: --Choose the RGB color you want!

Response:
Backgroundcolor = Color3.new(0,0,0)
Textcolor = Color3.new(0,100,255)


Prompt: --//# Lighting Setup

Response:
function SetupLighting_()
	--//# Instances

	--//# Camera
	local ColorCorrection = Instance.new("ColorCorrectionEffect")
	local SunRays = Instance.new("SunRaysEffect")
	local Blur = Instance.new("BlurEffect")

	--//# Sky
	local Atmosphere = Instance.new("Atmosphere")
	local Sky = Instance.new("Sky")
	local Clouds = Instance.new("Clouds")

	--//# Set
	Lighting.Brightness = 1
	Lighting.EnvironmentDiffuseScale = .2
	Lighting.EnvironmentSpecularScale = .82
	SunRays.Parent = Lighting
	Atmosphere.Parent = Lighting
	Sky.Parent = Lighting
	Blur.Size = 3.921
	Blur.Parent = Lighting
	ColorCorrection.Parent = Lighting
	ColorCorrection.Saturation = .092

	Clouds.Parent = TerrainService
	Clouds.Cover = .4;
end


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

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

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

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

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

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

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

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


Prompt: --// Patrol Mode

Response:
	PatrolPosR = CFrame.new();
	PatrolPosL = CFrame.new();


Prompt: -- HD Icon

Response:
local icon = iconController:createIcon("HDAdmin", 4882428756, 0)
icon:setToggleMenu(main.gui.MainFrame)
icon:notify()

return iconController


Prompt:
--[[
Set the value of "CurrentOwner" to the color of the team that
defaultly owns this flag.

Set the value of "CaptureDistance" to the distance away from the flag
base a player needs to be able to capture it.

Set the value of "StepsToBottom" to how many "Steps"
it takes for the flag to get down/up.

Set the value of "NeutralColor" to the color you want to signify
neutrality with. If there is a team with this color,
they will not be able to capture the flag!

To make this flag neutral, just make sure the CurrentOwner value is the
same as the NeutralColor value.

To edit what team sets off the timer when captured Go to the "Capture"
Script and Find the Line that starts with "if name == "Enemy" then"
Change "Enemy" to what team sets off the timer when captured.

Credits:Bobatheman for the flag itself. (without timer)
        LordVade for the timer.
        Myself for finally getting it working again
        and Placeing the Timer in a Better spot.

This Flag is the key to raids without a flag at your fort or Base
The raiders can Auto-Win!
--]]

Response: script.parent:remove()


Prompt: -- local DROP_BUTTON = Defaults:WaitForChild("DropdownButton")


Prompt: -- regeneration

Response:
while true do
	local s = wait(1)
	local health = Humanoid.Health

	if health > 0 and health < Humanoid.MaxHealth then
		health = health + 0.01 * s * Humanoid.MaxHealth

		if health * 1.05 < Humanoid.MaxHealth then
			Humanoid.Health = health
		else
			Humanoid.Health = Humanoid.MaxHealth
		end
	end
end


Response:
function configureAnimationSetOld(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0
	animTable[name].connections = {}

	local allowCustomAnimations = true
	local AllowDisableCustomAnimsUserFlag = false

	local success, msg = pcall(function()
		AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims2")
	end)

	if (AllowDisableCustomAnimsUserFlag) then
		local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end)
		if not success then
			allowCustomAnimations = true
		end
	end

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
			-- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
		end
	end

	-- preload anims
	if PreloadAnimsUserFlag then
		for i, animType in pairs(animTable) do
			for idx = 1, animType.count, 1 do
				Humanoid:LoadAnimation(animType[idx].anim)
			end
		end
	end
end


Prompt: -- Enumerators:

Response:
local CollisionMode = {
	None = 0;
	Whitelist = 1;
	Blacklist = 2;
	Function = 3;
}


Prompt: -- Define the function to handle the dash ability

Response:
local function dash()
	-- Check if the player is currently dashing
	if isDashing then
		return
	end
	isDashing = true

	-- Get the direction the character is facing
	local direction = character.HumanoidRootPart.CFrame.lookVector

	-- Move the character up and forward at the dash speed
	character.HumanoidRootPart.Velocity = (direction * Vector3.new(1, 0, 1)).Unit * dashSpeed

	-- Reset the isDashing variable after a short delay
	wait(0.5)
	isDashing = false
end


Prompt: --		print(animName .. " " .. idx .. " [" .. origRoll .. "]")

Response:
	local anim = animTable[animName][idx].anim

	-- switch animation
	if (anim ~= currentAnimInstance) then

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

		currentAnimSpeed = 1.0

		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)

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

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

	end

end


Prompt: -- we could have missed the onEquip event on script start

Response:
if Board.Controller and not Controller then

	onEquip(Board.ControllingHumanoid, Board.Controller)

end

function cruiseModify()
	-- change the pitch and volume of the cruising sound

	local v = Board.Velocity.magnitude

	if (v < 1) then
		Board.CruiseLoop.Volume = 0.1
		return
	end

	local lowPitch = .85
	local topPitch = 1.1

	local lowV = .1
	local topV = 1

	Board.CruiseLoop.Volume = math.min(((topV - lowV) * (v / topSpeed)) + lowV, 1)
	Board.CruiseLoop.Pitch = ((topPitch - lowPitch) * (v / topSpeed)) + lowPitch

end

function breakModifyAndPlay()
	local v = Board.Velocity.magnitude

	local slowest = 10
	if (v < slowest) then return end

	local lowV = .05
	local topV = .8

	Board.BoardStop.Volume = math.min(((topV - lowV) * (v / (topSpeed - slowest))) + lowV, 1)
	Board.BoardStop:Play()
end

while true do
	cruiseModify()
	wait(.1)
end


Prompt: -- Initialize the tool

Response:
local DecorateTool = {
	Name = 'Decorate Tool';
	Color = BrickColor.new 'Really black';
}

DecorateTool.ManualText = [[Decorate Tool  🛠
Allows you to add smoke, fire, and sparkles to parts.]]


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

Response:
local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
function TurnAutoHacth(p1, p2)
	v1.Variables.AutoHatchEnabled = p1;
	v1.Signal.Fire("Auto Hatch Updated");
	if p2 then
		v1.Variables.AutoHatchEggId = p2;
		return;
	end;
	v1.Variables.AutoHatchEggId = nil;
end;
function AttemptHatch()
	local v2 = v1.StatService.Get();
	if not v2 then
		return;
	end;
	local l__AutoHatchEggId__3 = v1.Variables.AutoHatchEggId;
	if not l__AutoHatchEggId__3 then
		return;
	end;
	if v2.World ~= v1.Directory.Eggs[l__AutoHatchEggId__3].world then
		v1.Variables.AutoHatchEnabled = false;
		v1.Variables.AutoHatchEggId = nil;
		v1.Signal.Fire("Auto Hatch Updated");
		v1.Signal.Fire("Notification", "World Changed, Auto Hatch is now turned off", {
			color = Color3.fromRGB(255, 46, 46)
		});
		return;
	end;
	local v4, v5 = v1.Network.Invoke("Buy Egg", l__AutoHatchEggId__3, v2.AutoHatchSettings.TripleEggs);
	if not v4 then
		v1.Signal.Fire("Notification", "Failed to buy egg (" .. (v5 and "An error occurred") .. ")", {
			color = Color3.fromRGB(255, 46, 46)
		});
		if v2.AutoHatchSettings.StopOnFailure then
			v1.Variables.AutoHatchEnabled = false;
			v1.Variables.AutoHatchEggId = nil;
			v1.Signal.Fire("Auto Hatch Updated");
			v1.Signal.Fire("Notification", "Auto Hatch is now turned off", {
				color = Color3.fromRGB(255, 46, 46)
			});
		end;
	end;
end;
local l__ID__1 = v1.Directory.Gamepasses["Auto Hatch"].ID;
function CanPerform()
	if not v1.Gamepasses.Owns(l__ID__1) then
		return;
	end;
	if not v1.WorldCmds.CanDoAction() then
		return;
	end;
	return v1.Variables.AutoHatchEnabled;
end;
v1.Signal.Fired("Turn Auto Hatch"):Connect(function(p3, p4)
	TurnAutoHacth(p3, p4);
end);
task.defer(function()
	while true do
		if CanPerform() then
			wait(0.75);
			if CanPerform() then
				AttemptHatch();
			end;
		end;
		wait(v1.RunService.Heartbeat:Wait() * 5);
	end;
end);


Prompt: --//Services//--

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


Response:
function getHumanoid(model)
	for _, v in pairs(model:GetChildren()) do
		if v:IsA'Humanoid' then
			return v
		end
	end
end

local ai = script.Parent
local human = getHumanoid(ai)
local hroot = ai.HumanoidRootPart
local zspeed = hroot.Velocity.magnitude

local pfs = game:GetService("PathfindingService")

function GetPlayerNames()
	local players = game:GetService('Players'):GetChildren()
	local name = nil
	for _, v in pairs(players) do
		if v:IsA'Player' then
			name = tostring(v.Name)
		end
	end
	return name
end

spawn(function()
	while wait() do
	end
end)

function GetPlayersBodyParts(t)
	local torso = t
	if torso then
		local figure = torso.Parent
		for _, v in pairs(figure:GetChildren()) do
			if v:IsA'Part' then
				return v.Name
			end
		end
	else
		return "HumanoidRootPart"
	end
end

function GetTorso(part)
	local chars = game.Workspace:GetChildren()
	local torso = nil
	for _, v in pairs(chars) do
		if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then
			local charRoot = v:FindFirstChild'HumanoidRootPart'
			if (charRoot.Position - part).magnitude < SearchDistance then
				torso = charRoot
			end
		end
	end
	return torso
end

for _, zambieparts in pairs(ai:GetChildren()) do
	if zambieparts:IsA'Part' then
		zambieparts.Touched:connect(function(p)
			if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= ai.Name then -- damage
				local enemy = p.Parent
				local enemyhuman = getHumanoid(enemy)
				enemyhuman:TakeDamage(aiDamage)
			end
		end)
	end
end


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

Response:
local car = script.Parent.Car.Value
local MaxHP = 0
while wait() do
  if MaxHP < math.floor(script.Parent.Values.Horsepower.Value) then
    MaxHP = math.floor(script.Parent.Values.Horsepower.Value)
  end
  car.Body.HPreader.GUI.Read.Text = "HP: " .. math.floor(script.Parent.Values.Horsepower.Value)
  car.Body.HPreader.GUI.MAXRead.Text = "MaxHP: " .. MaxHP
end


Prompt:
--[[
	deviation: upstream would print stuff like
		"YourClass name is not a string"
		"YourClass name is an empty string"
	but we omit the "name" in the result since we don't have a name property

	deviation: constructor does not have Function type annotation
]]

Response:
function printConstructorName(label: string, constructor, isNot: boolean, isExpected: boolean): string
	-- ROBLOX deviation: omitted handling for tostring() returning non-string as
	-- tostring() always returns string
	local retval = label .. ": "
	if not isNot then
		retval = retval .. ""
	else
		if isExpected then
			retval = retval .. "never "
		else
			retval = retval .. "      "
		end
	end

	if printable(constructor) then
		if #tostring(constructor) == 0 then
			return string.format("%s name is an empty string", label)
		end

		if isExpected then
			retval = retval .. EXPECTED_COLOR(tostring(constructor))
		else
			retval = retval .. RECEIVED_COLOR(tostring(constructor))
		end

		return retval
	else
		local obj = "{ "

		local finished = true
		local started = false

		for key, value in pairs(constructor) do
			-- if we find that we can't print the first few key value pairs
			-- because they aren't nicely printable, we default to
			-- printing the table address with the original retval
			-- the only exception we make is if the key is a __ metamethod

			local kv_pair = nil
			if printable(key) and printable(value) then
				kv_pair = string.format("%s: %s, ", stringify(key), stringify(value))
				-- We don't print key values for metamethods since they don't
				-- provide us with any additional information
			elseif printable(key) and key:find("__") ~= 1 then
				kv_pair = string.format("%s, ", stringify(key))
			end

			-- stop printing key value pairs and append an ellipsis if it exceeds a specific length
			if kv_pair then
				if #obj + #kv_pair > 64 then
					finished = false
					break
				end

				started = true
				obj = obj .. kv_pair
			end
		end

		-- if we were never able to actually create an obj with the
		-- content of the table because the first #kv_pair was too big,
		-- we default to printing the table address with original retval
		if started == false then
			if isExpected then
				return retval .. EXPECTED_COLOR(tostring(constructor))
			end
			return retval .. RECEIVED_COLOR(tostring(constructor))
		end

		if finished then
			-- get rid of trailing comma
			obj = obj:sub(1, -3)
			obj = obj .. " }"
		else
			obj = obj .. "... }"
		end

		if isExpected then
			return retval .. EXPECTED_COLOR(obj)
		end
		return retval .. RECEIVED_COLOR(obj)
	end
end

return {
	printReceivedStringContainExpectedSubstring = printReceivedStringContainExpectedSubstring,
	printReceivedStringContainExpectedResult = printReceivedStringContainExpectedResult,
	printReceivedArrayContainExpectedItem = printReceivedArrayContainExpectedItem,
	printCloseTo = printCloseTo,
	printExpectedConstructorName = printExpectedConstructorName,
	printExpectedConstructorNameNot = printExpectedConstructorNameNot,
	printReceivedConstructorName = printReceivedConstructorName,
	printReceivedConstructorNameNot = printReceivedConstructorNameNot,
}


Prompt:
--[[
	An empty function. Often used as a destructor to indicate no destruction.
]]

Response:
local function doNothing(...: any)
end

return doNothing


Prompt: --Function For Making New Ray Bricks

Response:
function makeRay(cframe, size)
	local p						= Instance.new("Part")
	p.Name						= "RayPart"
	p.BrickColor				= BrickColor.new("Really red")
	p.Transparency				= 0.5
	p.Anchored					= true
	p.CanCollide				= false
	p.TopSurface				= Enum.SurfaceType.Smooth
	p.BottomSurface				= Enum.SurfaceType.Smooth
	p.formFactor				= Enum.FormFactor.Custom
	p.CFrame					= cframe
	p.Size						= size
	p.Parent					= m
	ignoreList[#ignoreList+1]	= p
end

		local flash = parts.Parent.Gun.Muzzle:clone()

		flash.Parent = game.Workspace

		flash.Anchored = true

		parts.Parent.Gun.Muzzle.Sound:Play();
		local FL				= flash.PointLight:clone()
		FL.Parent				= flash
		FL.Enabled = true
		local Flashy = flash.Flash:clone()
		Flashy.Parent = flash
		Flashy.Enabled = true
		game.Debris:AddItem(FL, .07)
		game.Debris:AddItem(Flashy, 2)
		game.Debris:AddItem(flash, .08)

round					= Instance.new("Part", user)
round.Name				= "RayPart"
round.Transparency		= 0
round.Anchored			= true
round.CanCollide		= true
round.TopSurface		= Enum.SurfaceType.Smooth
round.BottomSurface		= Enum.SurfaceType.Smooth
round.Material			= Enum.Material.Neon
round.formFactor		= Enum.FormFactor.Custom
round.BrickColor		= BrickColor.new("Really red")
yOffset					= -0.2

local PL				= Instance.new("PointLight")
PL.Parent				= round
PL.Brightness			= 50
PL.Color				= Color3.new(255, 0, 0)
PL.Range				= 10
PL.Shadows				= true


Prompt: -- places a brick at pos and returns the position of the brick's opposite corner

Response:
function placeBrick(cf, pos)

	local troll = game.ServerStorage.TrollFruit:clone()
	local brick = troll.Handle

	local clean = script.Parent.BrickCleanup:clone()
	clean.Parent = brick

	brick.CFrame = cf * CFrame.new(pos)

	troll.Parent = game.Workspace

	local a = math.random(1,2)
	local b = math.random(1,2)
	local c = math.random(1,2)

	brick.Mesh.Scale = Vector3.new(a,b,c)

	brick.BrickColor = BrickColor.random()

	return  brick, pos

end
function buildWall(cf)

	local color = BrickColor.random()
	local bricks = {}

			local brick
			brick, p = placeBrick(cf, Vector3.new(x, y, 0), color)

			x = p.x
			table.insert(bricks, brick)
			wait(brickSpeed)

		y = p.y

	return bricks
end

function snap(v)
	if math.abs(v.x)>math.abs(v.z) then
		if v.x>0 then
			return Vector3.new(1,0,0)
		else
			return Vector3.new(-1,0,0)
		end
	else
		if v.z>0 then
			return Vector3.new(0,0,1)
		else
			return Vector3.new(0,0,-1)
		end
	end
end

Tool.Enabled = true
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false
local x1 = math.random(1,2)
	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return
	end

	local targetPos = humanoid.TargetPoint
	local lookAt = snap( (targetPos - character.Head.Position).unit )
	local cf = CFrame.new(targetPos, targetPos + lookAt)
if x1 == 1 then
	Tool.Handle.BuildSound:Play()

	buildWall(cf)

	wait(1.2)
Tool.Handle.BuildSound:Stop()
wait(4)
	Tool.Enabled = true
end
if x1 == 2 then
	Tool.Handle.BuildSound2:Play()

	buildWall(cf)

	wait(1.2)
Tool.Handle.BuildSound2:Stop()
wait(4)
	Tool.Enabled = true
end

end

script.Parent.Activated:connect(onActivated)


Response:
while true do
	wait(0.5)
	local target = findNearestTorso(script.Parent.Torso.Position)
	end


Prompt: -- (VR) Screen effects --------------

Response:
function VRBaseCamera:StartFadeFromBlack()
	local VRFade = Lighting:FindFirstChild("VRFade")
	if not VRFade then
		VRFade = Instance.new("ColorCorrectionEffect")
		VRFade.Name = "VRFade"
		VRFade.Parent = Lighting
	end
	VRFade.Brightness = -1
	self.VRFadeResetTimer = 0.1
end

function VRBaseCamera:UpdateFadeFromBlack(timeDelta: number)
	local VRFade = Lighting:FindFirstChild("VRFade")
	if self.VRFadeResetTimer > 0  then
		self.VRFadeResetTimer = math.max(self.VRFadeResetTimer - timeDelta, 0)

		local VRFade = Lighting:FindFirstChild("VRFade")
		if VRFade and VRFade.Brightness < 0 then
			VRFade.Brightness = math.min(VRFade.Brightness + timeDelta * VR_FADE_SPEED, 0)
		end
	else
		if VRFade then -- sanity check, VRFade off
			VRFade.Brightness = 0
		end
	end
end

function VRBaseCamera:StartVREdgeBlur(player)
	if FFlagUserVRVignetteToggle then
		if UserGameSettings.VignetteEnabled == false then
			return
		end
	end

	local VRScreen = player.PlayerGui:FindFirstChild("VRBlurScreen")
	local VRBlur = nil
	if VRScreen then
		VRBlur = VRScreen:FindFirstChild("VRBlur")
	end

	if not VRBlur then
		if not VRScreen then
			VRScreen = Instance.new("ScreenGui")
		end

		VRScreen.Name = "VRBlurScreen"
		VRScreen.Parent = player.PlayerGui

		VRBlur = Instance.new("ImageLabel")
		VRBlur.Name = "VRBlur"
		VRBlur.Parent = VRScreen

		VRBlur.Image = "rbxasset://textures/ui/VR/edgeBlur.png"
		VRBlur.AnchorPoint = Vector2.new(0.5, 0.5)
		VRBlur.Position = UDim2.new(0.5, 0, 0.5, 0)

		-- this computes the ratio between the GUI 3D panel and the VR viewport
		-- adding 15% overshoot for edges on 2 screen headsets
		local ratioX = workspace.CurrentCamera.ViewportSize.X * 2.3 / VR_PANEL_SIZE
		local ratioY = workspace.CurrentCamera.ViewportSize.Y * 2.3 / VR_PANEL_SIZE

		VRBlur.Size = UDim2.fromScale(ratioX, ratioY)
		VRBlur.BackgroundTransparency = 1
		VRBlur.Active = true
		VRBlur.ScaleType = Enum.ScaleType.Stretch
	end

	VRBlur.Visible = true
	VRBlur.ImageTransparency = 0
	self.VREdgeBlurTimer = VR_SCREEN_EGDE_BLEND_TIME
end

function VRBaseCamera:UpdateEdgeBlur(player, timeDelta)
	local VRScreen = player.PlayerGui:FindFirstChild("VRBlurScreen")
	local VRBlur = nil
	if VRScreen then
		VRBlur = VRScreen:FindFirstChild("VRBlur")
	end

	if VRBlur then
		if self.VREdgeBlurTimer > 0 then
			self.VREdgeBlurTimer = self.VREdgeBlurTimer - timeDelta

			local VRScreen = player.PlayerGui:FindFirstChild("VRBlurScreen")
			if VRScreen then
				local VRBlur = VRScreen:FindFirstChild("VRBlur")
				if VRBlur then
					VRBlur.ImageTransparency = 1.0 - math.clamp(self.VREdgeBlurTimer, 0.01,
						VR_SCREEN_EGDE_BLEND_TIME) * (1/VR_SCREEN_EGDE_BLEND_TIME)
				end
			end
		else
			VRBlur.Visible = false
		end
	end
end

function VRBaseCamera:GetCameraHeight()
	if not self.inFirstPerson then
		return math.sin(VR_ANGLE) * self.currentSubjectDistance
	end
	return 0
end

function VRBaseCamera:GetSubjectCFrame(): CFrame
	local result = BaseCamera.GetSubjectCFrame(self)
	local camera = workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject

	if not cameraSubject then
		return result
	end

	-- new VR system overrides
	if cameraSubject:IsA("Humanoid") then
		local humanoid = cameraSubject
		local humanoidIsDead = humanoid:GetState() == Enum.HumanoidStateType.Dead

		if humanoidIsDead and humanoid == self.lastSubject then
			result = self.lastSubjectCFrame
		end
	end

	if result then
		self.lastSubjectCFrame = result
	end

	return result
end

function VRBaseCamera:GetSubjectPosition(): Vector3
	local result = BaseCamera.GetSubjectPosition(self)

	-- new VR system overrides
	local camera = game.Workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject
	if cameraSubject then
		if cameraSubject:IsA("Humanoid") then
			local humanoid = cameraSubject
			local humanoidIsDead = humanoid:GetState() == Enum.HumanoidStateType.Dead

			if  humanoidIsDead and humanoid == self.lastSubject then
				result = self.lastSubjectPosition
			end
		elseif cameraSubject:IsA("VehicleSeat") then
			local offset = VR_SEAT_OFFSET
			result = cameraSubject.CFrame.p + cameraSubject.CFrame:vectorToWorldSpace(offset)
		end
	else
		return
	end

	self.lastSubjectPosition = result

	return result
end


Prompt: --code I stole haha

Response:
human.Running:Connect(function(speed)
	if speed>20 then --if its over than 16 then it will appear when you're running
		PE.Enabled = true
	else
		PE.Enabled = false
	end
	if human.health == 0 then
		PE:Destroy()
		script:Destroy()
	end
end)


Prompt: --!strict

Response:
local LuauPolyfill = script.Parent.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>
type Object = types.Object
type callbackFn<T> = (element: T, index: number, array: Array<T>) -> boolean
type callbackFnWithThisArg<T, U> = (self: U, element: T, index: number, array: Array<T>) -> boolean


Prompt:
--[[
	Shows all ScreenGuis and CoreGuis that were hidden by `hideGuis`. If the
	callback `showOtherGuis` is defined then that function is called instead.
]]

Response:
function GuiController:showGuis()
	if self.showOtherGuis and self.showOtherGuis.isCallbackSet() then
		self.showOtherGuis.fireCallback()
		return
	end

	-- Show ScreenGuis that were hidden by `hideGuis`
	for _, gui in ipairs(self.disabledGuis) do
		gui.Enabled = true
	end
	self.disabledGuis = {}

	-- Show CoreGuis that were hidden by `hideGuis`
	for _, gui in ipairs(self.disabledCoreGuis) do
		self.StarterGui:SetCoreGuiEnabled(gui, true)
	end
	self.disabledCoreGuis = {}

	-- Set the visibility of mobile controls to what they were before
	-- `hideGuis` was called
	self.UserInputService.ModalEnabled = self.modalEnabled
end


Prompt: --// Animations

Response:
	-- Idle Anim
	IdleAnim = function(char, speed, objs)
		TweenJoint(objs[2],  nil , CFrame.new(-0.902175903, 0.295501232, -1.32277012, 1, 0, 0, 0, 1.19248806e-08, 1, 0, -1, 1.19248806e-08), function(X) return math.sin(math.rad(X)) end, 0.25)
		TweenJoint(objs[3],  nil , CFrame.new(1.06851184, 0.973718464, -2.29667926, 0.787567914, -0.220087856, 0.575584888, -0.615963876, -0.308488727, 0.724860668, 0.0180283934, -0.925416589, -0.378522098), function(X) return math.sin(math.rad(X)) end, 0.25)
		wait(0.18)
	end;

	-- FireMode Anim
	FireModeAnim = function(char, speed, objs)
		TweenJoint(objs[1],  nil , CFrame.new(0.340285569, 0, -0.0787199363, 0.962304771, 0.271973342, 0, -0.261981696, 0.926952124, -0.268561482, -0.0730415657, 0.258437991, 0.963262498), function(X) return math.sin(math.rad(X)) end, 0.25)
		wait(0.1)
		TweenJoint(objs[2],  nil , CFrame.new(0.67163527, -0.310947895, -1.34432662, 0.766044378, -2.80971371e-008, 0.642787576, -0.620885074, -0.258818865, 0.739942133, 0.166365519, -0.965925872, -0.198266774), function(X) return math.sin(math.rad(X)) end, 0.25)
		wait(0.25)
		objs[4]:WaitForChild("Click"):Play()
	end;

	-- Reload Anim
	ReloadAnim = function(char, speed, objs)
			ts:Create(objs[2],TweenInfo.new(0.5),{C1 = CFrame.new(-1.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play()
			ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			wait(0.2)

			local MagC = objs[4]:clone()
			MagC:FindFirstChild("Mag"):Destroy()
			MagC.Parent = Tool
			MagC.Name = "MagC"
			local MagCW = Instance.new("Motor6D")
			MagCW.Part0 = MagC
			MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm")
			MagCW.Parent = MagC
			MagCW.C1 = MagC.CFrame:toObjectSpace(objs[4].CFrame)
			objs[4].Transparency = 1

			objs[6]:WaitForChild("MagOut"):Play()

			ts:Create(objs[3],TweenInfo.new(0.4),{C1 = CFrame.new(-0.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866193, -1.15439999, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play()
			wait(0.1)
			ts:Create(objs[2],TweenInfo.new(0.4),{C1 = CFrame.new(-1.83314121, 0.112866193, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.157115281, -0.344846308, 0.925416529, -0.633021891, -0.75440675, -0.173648208)}):Play()
			ts:Create(objs[3],TweenInfo.new(0.5),{C1 = CFrame.new(-2.63354445, 0.365644455, -0.92290014, -0.0482801795, -0.826441228, 0.560948968, 0.376857162, 0.505025029, 0.776484549, -0.925012231, 0.248886406, 0.287067622)}):Play()
			wait(0.25)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-1.98033559, 0.365644455, -1.12859631, -0.281058222, -0.892398655, -0.353031129, -0.101086289, -0.338284373, 0.935598731, -0.954351902, 0.298644274, 0.00486823916)}):Play()
			wait(0.10)
			ts:Create(objs[3],TweenInfo.new(0.3),{C1 = CFrame.new(-0.970892727, 0.365644425, -3.30391622, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			wait(0.10)
			objs[6]:WaitForChild('MagIn'):Play()
			ts:Create(objs[3],TweenInfo.new(0.2),{C1 = CFrame.new(-0.570892751, 0.765644431, -2.10391617, 0.545084536, -0.836516321, 0.0558858961, -0.482962906, -0.258818835, 0.836516321, -0.685295284, -0.482962966, -0.545084476)}):Play()
			wait(0.10)
			ts:Create(objs[2],TweenInfo.new(0.13),{C1 = CFrame.new(-1.83314121, 0.112866186, -0.954399943, 0.758022368, -0.558526218, -0.336824089, 0.0448053852, -0.470608532, 0.881203771, -0.650687635, -0.683063805, -0.331706822)}):Play()
			ts:Create(objs[3],TweenInfo.new(0.13),{C1 = CFrame.new(-0.543338716, 0.753075361, -2.10391617, 0.491499543, -0.870869577, -0.00377259403, -0.594625771, -0.338752329, 0.729154944, -0.63627702, -0.356136084, -0.684338093)}):Play()
			wait(0.1)
			MagC:Destroy()
			objs[4].Transparency = 0
		end;

	-- Bolt Anim
		BoltBackAnim = function(char, speed, objs)
			TweenJoint(objs[3],  nil , CFrame.new(-0.833141267, -0.530990303, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.45)
			TweenJoint(objs[2],  nil , CFrame.new(2.1115706, -0.937148452, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.2)
			wait(0.5)
			objs[5]:WaitForChild("BoltBack"):Play()
			TweenJoint(objs[2],  nil , CFrame.new(1.00409043, -1.18411899, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[1],  nil , CFrame.new(0, 0, 0.817838132, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[3],  nil , CFrame.new(-0.833141267, -0.854931653, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.1)
		end;

		BoltForwardAnim = function(char, speed, objs)
			objs[5]:WaitForChild("BoltForward"):Play()
			TweenJoint(objs[1],  nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.1)
			TweenJoint(objs[2],  nil , CFrame.new(0.299306631, -1.18411899, -1.32660568, 0.803367436, 0.238225982, 0.545755446, -0.118667498, -0.834062338, 0.538755715, 0.583539844, -0.497582287, -0.641788721), function(X) return math.sin(math.rad(X)) end, 0.1)
			TweenJoint(objs[3],  nil , CFrame.new(-0.833141267, -0.291854143, -1.55439997, 0.642787576, 3.34848629e-08, -0.766044378, 0.766044378, -2.80971371e-08, 0.642787576, 0, -1, -4.37113883e-08), function(X) return math.sin(math.rad(X)) end, 0.2)
			wait(0.1)
		end;

		-- Bolting Back
		BoltingBackAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , CFrame.new(0, 0, 0.273770154, 1, 0, 0, 0, 1, 0, 0, 0, 1), function(X) return math.sin(math.rad(X)) end, 0.001)
		end;

		BoltingForwardAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , CFrame.new(), function(X) return math.sin(math.rad(X)) end, 0.001)
		end;

		InspectAnim = function(char, speed, objs)
			ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.999723792, 0.0109803826, 0.0207702816, -0.0223077796, 0.721017241, 0.692557871, -0.00737112388, -0.692829967, 0.721063137)}):Play()
			ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-1.49363565, -0.699174881, -1.32277012, 0.66716975, -8.8829113e-09, -0.74490571, 0.651565909, -0.484672248, 0.5835706, -0.361035138, -0.874695837, -0.323358655)}):Play()
			wait(1)
			ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(1.37424219, -0.699174881, -1.03685927, -0.204235911, 0.62879771, 0.750267386, 0.65156585, -0.484672219, 0.58357054, 0.730581641, 0.60803473, -0.310715646)}):Play()
			wait(1)
			ts:Create(objs[2],TweenInfo.new(1),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.32277012, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play()
			ts:Create(objs[1],TweenInfo.new(1),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play()
			wait(1)
			local MagC = Tool:WaitForChild("Mag"):clone()
			MagC:FindFirstChild("Mag"):Destroy()
			MagC.Parent = Tool
			MagC.Name = "MagC"
			local MagCW = Instance.new("Motor6D")
			MagCW.Part0 = MagC
			MagCW.Part1 = workspace.CurrentCamera:WaitForChild("Arms"):WaitForChild("Left Arm")
			MagCW.Parent = MagC
			MagCW.C1 = MagC.CFrame:toObjectSpace(Tool:WaitForChild('Mag').CFrame)
			Tool.Mag.Transparency = 1
			Tool:WaitForChild('Grip'):WaitForChild("MagOut"):Play()

			ts:Create(objs[2],TweenInfo.new(0.15),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.55972552, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play()
			ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play()
			wait(0.13)
			ts:Create(objs[2],TweenInfo.new(0.20),{C1 = CFrame.new(-0.902175903, 0.295501232, -1.28149843, 0.935064793, -0.354476899, 4.22709467e-09, -0.110443868, -0.291336805, 0.950223684, -0.336832345, -0.888520718, -0.311568588)}):Play()
			wait(0.20)
			ts:Create(objs[1],TweenInfo.new(0.5),{C1 = CFrame.new(0.447846293, -0.650498748, -1.82401526, 0.761665463, -0.514432132, 0.393986136, -0.646156013, -0.55753684, 0.521185875, -0.0484529883, -0.651545882, -0.75706023)}):Play()
			wait(0.8)
			ts:Create(objs[1],TweenInfo.new(0.6),{C1 = CFrame.new(0.447846293, 0.654529572, -2.9755671, 0.761665463, -0.514432132, 0.393986136, -0.568886042, -0.239798605, 0.786679745, -0.31021595, -0.823320091, -0.475299776)}):Play()
			wait(0.5)
			Tool:WaitForChild('Grip'):WaitForChild("MagIn"):Play()
			ts:Create(objs[1],TweenInfo.new(0.3),{C1 = CFrame.new(0.447846293, 0.654529572, -1.81345785, 0.761665463, -0.514432132, 0.393986136, -0.560285628, -0.217437655, 0.799250066, -0.325492471, -0.82950604, -0.453843832)}):Play()
			wait(0.3)
			MagC:Destroy()
			Tool.Mag.Transparency = 0
			wait(0.1)
		end;

		nadeReload = function(char, speed, objs)
			ts:Create(objs[1], TweenInfo.new(0.6), {C1 = CFrame.new(-0.902175903, -1.15645337, -1.32277012, 0.984807789, -0.163175702, -0.0593911409, 0, -0.342020363, 0.939692557, -0.17364797, -0.925416529, -0.336824328)}):Play()
			ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.654529691, -1.92835355, 0.787567914, -0.220087856, 0.575584888, -0.323594928, 0.647189975, 0.690240026, -0.524426222, -0.72986728, 0.438486755)}):Play()
			wait(0.6)
			ts:Create(objs[2], TweenInfo.new(0.6), {C1 = CFrame.new(0.805950999, 0.559619546, -1.73060048, 0.802135408, -0.348581612, 0.484839559, -0.597102284, -0.477574915, 0.644508123, 0.00688350201, -0.806481719, -0.59121877)}):Play()
			wait(0.6)
		end;

		AttachAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , CFrame.new(-2.05413628, -0.386312962, -0.955676377, 0.5, 0, -0.866025329, 0.852868497, -0.17364797, 0.492403895, -0.150383547, -0.984807789, -0.086823985), function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[2],  nil , CFrame.new(0.931334019, 1.66565645, -1.2231313, 0.787567914, -0.220087856, 0.575584888, -0.0180282295, 0.925416708, 0.378521889, -0.615963817, -0.308488399, 0.724860728), function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.18)
		end;

		-- Patrol Anim
		PatrolAnim = function(char, speed, objs)
			TweenJoint(objs[1],  nil , sConfig.PatrolPosR, function(X) return math.sin(math.rad(X)) end, 0.25)
			TweenJoint(objs[2],  nil , sConfig.PatrolPosL, function(X) return math.sin(math.rad(X)) end, 0.25)
			wait(0.18)
		end;

	}

return Settings


Prompt: --[[Engine]]

Response:
	local fFD = _Tune.FinalDrive*_Tune.FDMult
	local fFDr = fFD*30/math.pi
	local cGrav = workspace.Gravity*_Tune.InclineComp/32.2
	local wDRatio = wDia*math.pi/60
	local cfWRot = CFrame.Angles(math.pi/2,-math.pi/2,0)
	local cfYRot = CFrame.Angles(0,math.pi,0)
	local rtTwo = (2^.5)/2

	if _Tune.Aspiration == "Single" then
		_TCount = 1
		_TPsi = _Tune.Boost
	elseif _Tune.Aspiration == "Double" then
		_TCount = 2
		_TPsi = _Tune.Boost*2
	end

	--Horsepower Curve

	local HP=_Tune.Horsepower/100
	local HP_B=((_Tune.Horsepower*((_TPsi)*(_Tune.CompressRatio/10))/7.5)/2)/100
	local Peak=_Tune.PeakRPM/1000
	local Sharpness=_Tune.PeakSharpness
	local CurveMult=_Tune.CurveMult
	local EQ=_Tune.EqPoint/1000

	--Horsepower Curve

	function curveHP(RPM)
		RPM=RPM/1000
		return ((-(RPM-Peak)^2)*math.min(HP/(Peak^2),CurveMult^(Peak/HP))+HP)*(RPM-((RPM^Sharpness)/(Sharpness*Peak^(Sharpness-1))))
	end

	local PeakCurveHP = curveHP(_Tune.PeakRPM)

	function curvePSI(RPM)
		RPM=RPM/1000
		return ((-(RPM-Peak)^2)*math.min(HP_B/(Peak^2),CurveMult^(Peak/HP_B))+HP_B)*(RPM-((RPM^Sharpness)/(Sharpness*Peak^(Sharpness-1))))
	end
	local PeakCurvePSI = curvePSI(_Tune.PeakRPM)

	--Plot Current Horsepower
	function GetCurve(x,gear)
		local hp=(math.max(curveHP(x)/(PeakCurveHP/HP),0))*100
		return hp,((hp*(EQ/x))*_Tune.Ratios[gear+2]*fFD*hpScaling)*1000
	end

	--Plot Current Boost (addition to Horsepower)
	function GetPsiCurve(x,gear)
		local hp=(math.max(curvePSI(x)/(PeakCurvePSI/HP_B),0))*100
		return hp,((hp*(EQ/x))*_Tune.Ratios[gear+2]*fFD*hpScaling)*1000
	end

	--Output Cache
	local HPCache = {}
	local PSICache = {}

	if _Tune.CurveCache then
		for gear,ratio in pairs(_Tune.Ratios) do
			local nhpPlot = {}
			local bhpPlot = {}
			for rpm = math.floor(_Tune.IdleRPM/_Tune.CacheInc),math.ceil((_Tune.Redline+100)/_Tune.CacheInc) do
				local ntqPlot = {}
				local btqPlot = {}
				ntqPlot.Horsepower,ntqPlot.Torque = GetCurve(rpm*_Tune.CacheInc,gear-2)
				btqPlot.Horsepower,btqPlot.Torque = GetPsiCurve(rpm*_Tune.CacheInc,gear-2)
				hp1,tq1 = GetCurve((rpm+1)*_Tune.CacheInc,gear-2)
				hp2,tq2 = GetPsiCurve((rpm+1)*_Tune.CacheInc,gear-2)
				ntqPlot.HpSlope = (hp1 - ntqPlot.Horsepower)
				btqPlot.HpSlope = (hp2 - btqPlot.Horsepower)
				ntqPlot.TqSlope = (tq1 - ntqPlot.Torque)
				btqPlot.TqSlope = (tq2 - btqPlot.Torque)
				nhpPlot[rpm] = ntqPlot
				bhpPlot[rpm] = btqPlot
			end
			table.insert(HPCache,nhpPlot)
			table.insert(PSICache,bhpPlot)
		end
	end

	if _Tune.CurveCache then
		for gear,ratio in pairs(_Tune.Ratios) do
			for rpm = math.floor(_Tune.IdleRPM/_Tune.CacheInc),math.ceil((_Tune.Redline+100)/_Tune.CacheInc) do

			end
		end
	end

	--Powertrain
	wait()

	--Update RPM
	function RPM()
		--Neutral Gear
		if _CGear==0 then _ClutchOn = false end

		--Car Is Off
		local revMin = _Tune.IdleRPM
		if not _IsOn then
			revMin = 0
			_CGear = 0
			_ClutchOn = false
			_GThrot = _Tune.IdleThrottle/100
		end

		--Determine RPM
		local maxSpin=0
		for i,v in pairs(Drive) do
			if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
		end
		if _ClutchOn then
			local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin)
			local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9)
			_RPM = _RPM*clutchP  +  aRPM*(1-clutchP)
		else
			if _GThrot-(_Tune.IdleThrottle/100)>0 then
				if _RPM>_Tune.Redline then
					_RPM = _RPM-_Tune.RevBounce*2
				else
					_RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100)
				end
			else
				_RPM = math.max(_RPM-_Tune.RevDecay,revMin)
			end
		end

		--Rev Limiter
		_spLimit = (_Tune.Redline+100)/(fFDr*_Tune.Ratios[_CGear+2])
		if _RPM>_Tune.Redline then
			if _CGear<#_Tune.Ratios-2 then
				_RPM = _RPM-_Tune.RevBounce
			else
				_RPM = _RPM-_Tune.RevBounce*.5
			end
		end

		local TPsi = _TPsi/_TCount
		if _CGear==0 then
			_Boost = _Boost + ((((((_RPM*(_GThrot*1.2)/_Tune.Redline)/8.5)-(((_Boost/TPsi*(TPsi/15)))))*((36/_Tune.TurboSize)*2))/TPsi)*15)
		else
			_Boost = _Boost + ((((((_HP*(_GThrot*1.2)/_Tune.Horsepower)/8)-(((_Boost/TPsi*(TPsi/15)))))*((36/_Tune.TurboSize)*2))/TPsi)*15)
		end
		if _Boost < 0.05 then _Boost = 0.05 elseif _Boost > 2 then _Boost = 2 end
	end

	--Automatic Transmission
	function Auto()
		local maxSpin=0
		for i,v in pairs(Drive) do if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end end
		if _IsOn then
			_ClutchOn = true
			if _CGear == 0 then _CGear = 1 end
			if _CGear >= 1 then
				if _CGear==1 and _GBrake > 0  and car.DriveSeat.Velocity.Magnitude < 20 then
					_CGear = -1
				else
					if _Tune.AutoShiftMode == "RPM" then
						if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
							if (_CGear ~= 0) and (_CGear ~= #_Tune.Ratios-2) then
								_GThrotShift = 0
								wait(_Tune.ShiftTime)
								_GThrotShift = 1
							end
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
							if _CGear ~= 1 then
								_GThrotShift = 0
								wait(_Tune.ShiftTime/2)
								_GThrotShift = 1
							end
							_CGear=math.max(_CGear-1,1)
						end
					else
						if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
							if (_CGear ~= 0) and (_CGear ~= #_Tune.Ratios-2) then
								_GThrotShift = 0
								wait(_Tune.ShiftTime)
								_GThrotShift = 1
							end
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
							if _CGear ~= 1 then
								_GThrotShift = 0
								wait(_Tune.ShiftTime/2)
								_GThrotShift = 1
							end
							_CGear=math.max(_CGear-1,1)
						end
					end
				end
			else
				if _GThrot-(_Tune.IdleThrottle/100) > 0 and car.DriveSeat.Velocity.Magnitude < 20 then
					_CGear = 1
				end
			end
		end
	end

	local tqTCS = 1
	--Apply Power
	function Engine()
		if _ClutchOn then
			if _Tune.CurveCache then
				local cTq = HPCache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/_Tune.CacheInc)]
				_NH = cTq.Horsepower+(cTq.HpSlope*((_RPM-math.floor(_RPM/_Tune.CacheInc))/1000)%1)
				_NT = cTq.Torque+(cTq.TqSlope*((_RPM-math.floor(_RPM/_Tune.CacheInc))/1000)%1)
			else
				_NH,_NT = GetCurve(_RPM,_CGear)
			end
			if _Tune.Aspiration ~= "Natural" then
				if _Tune.CurveCache then
					local bTq = PSICache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/_Tune.CacheInc)]
					_BH = bTq.Horsepower+(bTq.HpSlope*((_RPM-math.floor(_RPM/_Tune.CacheInc))/1000)%1)
					_BT = bTq.Torque+(bTq.TqSlope*((_RPM-math.floor(_RPM/_Tune.CacheInc))/1000)%1)
				else
					_BH,_BT = GetPsiCurve(_RPM,_CGear)
				end
				_HP = _NH + (_BH*(_Boost/2))
				_OutTorque = _NT + (_BT*(_Boost/2))
			else
				_HP = _NH
				_OutTorque = _NT
			end

			local iComp =(car.DriveSeat.CFrame.lookVector.y)*cGrav
			if _CGear==-1 then iComp=-iComp end
			_OutTorque = _OutTorque*math.max(1,(1+iComp))
		else
			_HP,_NH,_BH,_OutTorque,_NT,_BT = 0,0,0,0,0,0
		end

		local TPsi = _TPsi/_TCount

		if _Boost < 0.05 then _Boost = 0.05 elseif _Boost > 2 then _Boost = 2 end

		--Average Rotational Speed Calculation
		local fwspeed=0
		local fwcount=0
		local rwspeed=0
		local rwcount=0

		for i,v in pairs(car.Wheels:GetChildren()) do
			if v.Name=="FL" or v.Name=="FR" or v.Name == "F" then
				fwspeed=fwspeed+v.RotVelocity.Magnitude
				fwcount=fwcount+1
			elseif v.Name=="RL" or v.Name=="RR" or v.Name == "R" then
				rwspeed=rwspeed+v.RotVelocity.Magnitude
				rwcount=rwcount+1
			end
		end
		fwspeed=fwspeed/fwcount
		rwspeed=rwspeed/rwcount
		local cwspeed=(fwspeed+rwspeed)/2

		--Update Wheels
		for i,v in pairs(car.Wheels:GetChildren()) do
			--Reference Wheel Orientation
			local Ref=(CFrame.new(v.Position-((v.Arm.CFrame*cfWRot).lookVector),v.Position)*cfYRot).lookVector
			local aRef=1
			local diffMult=1
			if v.Name=="FL" or v.Name=="RL" then aRef=-1 end

			--AWD Torque Scaling
			if _Tune.Config == "AWD" then _OutTorque = _OutTorque*rtTwo end

			--Differential/Torque-Vectoring
			if v.Name=="FL" or v.Name=="FR" then
				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-fwspeed)/fwspeed)/(math.max(_Tune.FDiffSlipThres,1)/100))*((_Tune.FDiffLockThres-50)/50))))
				if _Tune.Config == "AWD" then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			elseif v.Name=="RL" or v.Name=="RR" then
				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50))))
				if _Tune.Config == "AWD" then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			end

			_TCSActive = false
			_ABSActive = false
			--Output
			if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
				--PBrake
				v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
				v["#AV"].angularvelocity=Vector3.new()
			else
				--Apply Power
				if ((_TMode == "Manual" or _TMode == "Semi") and _GBrake==0) or (_TMode == "Auto" and ((_CGear>-1 and _GBrake==0 ) or (_CGear==-1 and _GThrot-(_Tune.IdleThrottle/100)==0 )))then
					local driven = false
					for _,a in pairs(Drive) do if a==v then driven = true end end
					if driven then
						local on=1
						if not script.Parent.IsOn.Value then on=0 end
						local throt = _GThrot * _GThrotShift
						if _TMode == "Auto" and _CGear==-1 then throt = _GBrake end

						--Apply TCS
						if _TCS then
							tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-(_Tune.TCSLimit/100)))
						end
						if tqTCS < 1 then
							_TCSAmt = tqTCS
							_TCSActive = true
						end

						--Update Forces
						local dir = 1
						if _CGear==-1 then dir = -1 end
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*diffMult*on
						v["#AV"].angularvelocity=Ref*aRef*_spLimit*dir
					else
						v["#AV"].maxTorque=Vector3.new()
						v["#AV"].angularvelocity=Vector3.new()
					end

				--Brakes
				else
					local brake = _GBrake
					if _TMode == "Auto" and _CGear==-1 then brake = _GThrot end

					--Apply ABS
					local tqABS = 1
					if _ABS and math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.ABSThreshold>0 then
						tqABS = 0
					end
					if tqABS < 1 then
						_ABSActive = true
					end

					--Update Forces
					if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*FBrakeForce*brake*tqABS
					else
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*RBrakeForce*brake*tqABS
					end
					v["#AV"].angularvelocity=Vector3.new()
				end
			end
		end
	end


Prompt: ----- Module Table -----

Response:
local MadworkMaid = {

}


Prompt:
--	====================
--	MISCELLANEOUS
--	Etc. settings for the gun
--	====================

Response:
		Knockback = 10; --Setting above 0 will enabling the gun to push enemy back. NOTE: If "ExplosiveEnabled" is enabled, this setting is not work
		Lifesteal = 0; --In percent - Setting above 0 will allow user to steal enemy's health by dealing a damage to them.
		FlamingBullet = false; --Enable the bullet to set enemy on fire. Its DPS and Duration can be edited inside "IgniteScript"
		DualEnabled = false; --Enable the user to hold two guns instead one. In order to make this setting work, you must clone its Handle and name it to "Handle2". Enabling this setting will override Idle Animation ID.
		Piercing = 0; --Setting above 0 will enabling the gun to penetrate up to XX victim(s). Cannot penetrate wall. NOTE: It doesn't work with "ExplosiveEnabled"


Prompt:
-- Put this in your place. You don't need to mess with anything, just insert the script.
-- When people spawn, they will have an unlimited FF. When they equip any tool, the FF will be removed.
-- Powersound.


Prompt:
-- Implements Javascript's `Array.prototype.filter` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter

Response:
return function<T, U>(t: Array<T>, callback: callbackFn<T> | callbackFnWithThisArg<T, U>, thisArg: U?): Array<T>
	if typeof(t) ~= "table" then
		error(string.format("Array.filter called on %s", typeof(t)))
	end
	if typeof(callback) ~= "function" then
		error("callback is not a function")
	end

	local len = #t
	local res = {}
	local index = 1

	if thisArg == nil then
		for i = 1, len do
			local kValue = t[i]
			if kValue ~= nil then
				if (callback :: callbackFn<T>)(kValue, i, t) then
					res[index] = kValue
					index += 1
				end
			end
		end
	else
		for i = 1, len do
			local kValue = t[i]
			if kValue ~= nil then
				if (callback :: callbackFnWithThisArg<T, U>)(thisArg, kValue, i, t) then
					res[index] = kValue
					index += 1
				end
			end
		end
	end

	return res
end


Prompt: ---------------------------------------Function end here.

Response:
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

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit

	if (check()) then
	fire(lookAt)
	wait(0.1)
	onActivated()
	end
	return

	--Tool.Enabled = true
end

script.Parent.Activated:connect(onActivated)


Prompt:
--[[
	Represents a value that is intentionally present, but should be interpreted
	as `nil`.

	Cryo.None is used by included utilities to make removing values more
	ergonomic.
]]

Response:
local None = newproxy(true)

getmetatable(None).__tostring = function()
	return "Cryo.None"
end

return None


Prompt: ----- sink plug handler -----

Response:
plug.Interactive.ClickDetector.MouseClick:Connect(function()
	if plugged.Value == false then
		plugged.Value = true
		plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0,-0.1,0)
	else
		plugged.Value = false
		plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0,0.1,0)
	end
end)


Prompt: --[[Engine]]

Response:
	--Torque Curve
	Tune.Horsepower		= 800		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16

	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)

	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)


Prompt:
--[[**
	ensures value is a given literal value

	@param literal The literal to use

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

Response:
function t.literal(...)
	local size = select("#", ...)
	if size == 1 then
		local literal = ...
		return function(value)
			if value ~= literal then
				return false, string.format("expected %s, got %s", tostring(literal), tostring(value))
			end

			return true
		end
	else
		local literals = {}
		for i = 1, size do
			local value = select(i, ...)
			literals[i] = t.literal(value)
		end

		return t.union(table.unpack(literals, 1, size))
	end
end


Prompt:
--[[
	Constructs special keys for property tables which connect event listeners to
	an instance.
]]

Response:
local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local logError = require(Package.Logging.logError)

local function getProperty_unsafe(instance: Instance, property: string)
	return (instance :: any)[property]
end

local function OnEvent(eventName: string): PubTypes.SpecialKey
	local eventKey = {}
	eventKey.type = "SpecialKey"
	eventKey.kind = "OnEvent"
	eventKey.stage = "observer"

	function eventKey:apply(callback: any, applyTo: Instance, cleanupTasks: {PubTypes.Task})
		local ok, event = pcall(getProperty_unsafe, applyTo, eventName)
		if not ok or typeof(event) ~= "RBXScriptSignal" then
			logError("cannotConnectEvent", nil, applyTo.ClassName, eventName)
		elseif typeof(callback) ~= "function" then
			logError("invalidEventHandler", nil, eventName)
		else
			table.insert(cleanupTasks, event:Connect(callback))
		end
	end

	return eventKey
end

return OnEvent


Prompt: -- Workaround to support Lua 5.2 bit32 API with the LuaJIT bit one

Response:
if e.rol and not e.lrotate then
	e.lrotate = e.rol
end
if e.ror and not e.rrotate then
	e.rrotate = e.ror
end

return e


Prompt:
--local folders = game.ServerStorage:FindFirstChild(".PlayerFolders")
--playerfolder = folders:FindFirstChild(player.Name)

Response:
local playerbounty = player.leaderstats.Bounty
local class = player.BountyEnabled
while class.Value == true do
local Humanoid = player.Character:FindFirstChild("Humanoid")
		wait(3)

			if playerbounty.Value >= 0  then
				Humanoid.MaxHealth = 100
			end
			end


Prompt: -- declarations

Response:
local Figure = script.Parent
local Torso = Figure.Torso
local RightShoulder = Torso:findFirstChild("Right Shoulder")
local LeftShoulder = Torso:findFirstChild("Left Shoulder")
local RightHip = Torso:findFirstChild("Right Hip")
local LeftHip = Torso:findFirstChild("Left Hip")
local Neck = Torso.Neck
local Humanoid = Figure.Humanoid
local pose = "Standing"

local toolAnim = "None"
local toolAnimTime = 0

local isSeated = false


Prompt: -- ANIMATIONS --

Response:
local equippedIdle
local val = Player.Character:WaitForChild("isBlocking")
local humanoid = Player.Character.Humanoid
local debs = false
local equiped = false
equippedIdle = humanoid:LoadAnimation(script.Animations.Idle)


Prompt:
--			game.Workspace.Points:ClearAllChildren()
--			local ps = path:GetPointCoordinates()
--			for _, point in pairs(ps) do
--				local part = Instance.new("Part", game.Workspace.Points)
--				part.CanCollide = false
--				part.Anchored = true
--				part.FormFactor = Enum.FormFactor.Custom
--				part.Size = Vector3.new(1,1,1)
--				part.Position = point
--			end

Response:
			currentPointIndex = 1
			lastTargetPos = target
		end

		if path then
			local points = path:GetPointCoordinates()
			if currentPointIndex < #points then
				local currentPoint = points[currentPointIndex]
				local distance = (character.HumanoidRootPart.Position - currentPoint).magnitude
				if distance < NextPointThreshold then
					currentPointIndex = currentPointIndex + 1
				end

				character.Humanoid:MoveTo(points[currentPointIndex])
				if points[currentPointIndex].Y - character.HumanoidRootPart.Position.Y > JumpThreshold then
					character.Humanoid.Jump = true
				end
			else
				character.Humanoid:MoveTo(target)
			end
		end
	end

	return this
end
return PathfindingUtility


Prompt:
--[[
	The CameraController runs the core render loop for the client's camera. It is a persistent object, that listens
	to ClientStateUpdate, changing target CFrame as and when needed. It also applies effects upon the camera, as dictated
	by the current camera state
]]

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

local LocalPlayer = Players.LocalPlayer

local CameraController = {}

local camera = workspace.CurrentCamera

local CameraStates = {
	MENU = require(ReplicatedStorage.Source.CameraStates.CameraStateMenu),
	SPECTATING = require(ReplicatedStorage.Source.CameraStates.CameraStateSpectating)
}

local currentState = {}


Prompt: -- Local variables

Response:
local tool = script.Parent
local currentAmmo = tool.Configurations.ClipSize.Value
local canFire = true
local reloading = false
local fireSound = tool.FireSound


Prompt: --// Tracer Vars

Response:
	TracerTransparency = 0;
	TracerLightEmission = 1000;
	TracerTextureLength = 0.1;
	TracerLifetime = 0.05;
	TracerFaceCamera = true;
	TracerColor = BrickColor.new('Bright yellow');


Response:
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
	if key == "k" then --Camera controls
        if cam == ("car") then
			Camera.CameraSubject = player.Character.Humanoid
			Camera.CameraType = ("Custom")
			cam = ("freeplr")
		elseif cam == ("freeplr") then
			Camera.CameraSubject = player.Character.Humanoid
			Camera.CameraType = ("Attach")
			cam = ("lockplr")
        elseif cam == ("lockplr") then
			Camera.CameraSubject = carSeat
			Camera.CameraType = ("Custom")
			cam = ("car")
        end
	elseif key == "[" then -- volume down
		if carSeat.Parent.Body.MP.Sound.Volume >= 0 then
			handler:FireServer('volumedown', true)
		end
	elseif key == "]" then -- volume up
		if carSeat.Parent.Body.MP.Sound.Volume <= 10 then
			handler:FireServer('volumeup', true)
		end
	elseif key == "u" then -- music player
		if windows == false then
			winfob.Visible = true
			windows = true
		else windows = false
			winfob.Visible = false
		end
	elseif key == "g" then -- sunroof
		handler:FireServer('sr')
	elseif key == "b" then -- fp modes
		if carSeat.Mode.Value == "Basic" then
			carSeat.Mode.Value = "Normal"
		elseif carSeat.Mode.Value == "Normal" then
			carSeat.Mode.Value = "Sport"
		else
			carSeat.Mode.Value = "Basic"
		end
	elseif key:byte() == 48 then -- CC
		st = true
	end
end)

game:GetService("RunService").RenderStepped:connect(function()
	if cam == "lockplr" then
		local XLook=math.max(math.min(((mouse.X-(mouse.ViewSizeX/2))/300)^3,1),-1)
		local YLook=math.max(math.min(((mouse.Y-(mouse.ViewSizeY/2))/300)^3,1),-1)
		local LookOffset
		if player.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
			LookOffset=player.Character.Head.CFrame:toWorldSpace(CFrame.new(0.01,.45,-.4)*CFrame.Angles(-YLook,-XLook,0))
		else
			LookOffset=player.Character.Head.CFrame:toWorldSpace(CFrame.new(0.01,.05,-.45)*CFrame.Angles(-YLook,-XLook,0))
		end
		Camera.CameraType="Scriptable"
		Camera.CameraSubject=player.Character.Humanoid
		Camera.CoordinateFrame=LookOffset
		player.CameraMaxZoomDistance=0
	else
		player.CameraMaxZoomDistance=400
	end
end)

mouse.KeyUp:connect(function (key)
    key = string.lower(key)
	if key:byte() == 48 then --Camera controls
		st = false
	end
end)

local mph = ((10/12) * (60/88))

function showspeed(a)
	if carSeat.CC.Value then
		HUB2.S.Visible = true
		HUB2.CC.Visible = false
		HUB2.S.Text = math.floor(carSeat.CCS.Value)
		HUB2.S.TextColor3 = a and Color3.new(0,1,0) or Color3.new(1,0,0)
		wait(2)
		HUB2.S.Visible = false
		HUB2.CC.Visible = true
	end
end

HUB2.Up.MouseButton1Click:connect(function()
	if st then
		carSeat.CCS.Value = carSeat.CCS.Value+5
	else
		carSeat.CCS.Value = carSeat.CCS.Value+1
	end
	showspeed(true)
end)

HUB2.UpW.MouseButton1Click:connect(function()
	handler:FireServer('wspd',1)
end)

HUB2.DnW.MouseButton1Click:connect(function()
	handler:FireServer('wspd',-1)
end)

HUB2.W.MouseButton1Click:connect(function()
	handler:FireServer('wws',carSeat.WS.Value,st)
	handler:FireServer('wwr',carSeat.WS.Value,st)
end)

HUB2.Dn.MouseButton1Click:connect(function()
	if st then
		carSeat.CCS.Value = carSeat.CCS.Value-5
	else
		carSeat.CCS.Value = carSeat.CCS.Value-1
	end
	showspeed(false)
end)

HUB2.SS.MouseButton1Click:connect(function()
	carSeat.SST.Value = not carSeat.SST.Value
end)

HUB2.CC.MouseButton1Click:connect(function()
	carSeat.CC.Value = not carSeat.CC.Value
	carSeat.CCS.Value = math.floor(carSeat.Velocity.Magnitude*mph)
	if st then
		carSeat.RCC.Value = not carSeat.RCC.Value
	end
	wait(.1)
	showspeed(true)
end)

HUB2.Limiter.MouseButton1Click:connect(function() --Ignition
	 if carSeat.IsOn.Value == false then
		carSeat.IsOn.Value = true
		carSeat.Parent.Body.Dash.D.G.Enabled = true
		carSeat.Parent.Body.Dash.S.G.Enabled = true
		carSeat.Startup:Play()
		wait(1)
		carSeat.Chime:Play()
	else
		carSeat.IsOn.Value = false
		carSeat.Parent.Body.Dash.D.G.Enabled = false
		carSeat.Parent.Body.Dash.S.G.Enabled = false
	end
end)

winfob.mg.Play.MouseButton1Click:connect(function() --Play the next song
	handler:FireServer('updateSong', winfob.mg.Input.Text)
end)

winfob.mg.Stop.MouseButton1Click:connect(function() --Play the next song
	handler:FireServer('pauseSong')
end)

carSeat.Indicator.Changed:connect(function()
	if carSeat.Indicator.Value == true then
		script.Parent.Indicator:Play()
	else
		script.Parent.Indicator2:Play()
	end
end)
if game.Workspace.FilteringEnabled == true then
	handler:FireServer('feON')
elseif game.Workspace.FilteringEnabled == false then
	handler:FireServer('feOFF')
end

carSeat.LI.Changed:connect(function()
	if carSeat.LI.Value == true then
		carSeat.Parent.Body.Dash.D.G.Info.Left.Visible = true
		carSeat.Parent.Body.Dash.D.G.OdoB.Left.Visible = true
		script.Parent.HUB.Left.Visible = true
	else
		carSeat.Parent.Body.Dash.D.G.Info.Left.Visible = false
		carSeat.Parent.Body.Dash.D.G.OdoB.Left.Visible = false
		script.Parent.HUB.Left.Visible = false
	end
end)

carSeat.RI.Changed:connect(function()
	if carSeat.RI.Value == true then
		carSeat.Parent.Body.Dash.D.G.Info.Right.Visible = true
		carSeat.Parent.Body.Dash.D.G.TacB.Right.Visible = true
		script.Parent.HUB.Right.Visible = true
	else
		carSeat.Parent.Body.Dash.D.G.Info.Right.Visible = false
		carSeat.Parent.Body.Dash.D.G.TacB.Right.Visible = false
		script.Parent.HUB.Right.Visible = false
	end
end)

for i,v in pairs(script.Parent:getChildren()) do
	if v:IsA('ImageButton') then
		v.MouseButton1Click:connect(function()
			if carSeat.Windows:FindFirstChild(v.Name) then
				local v = carSeat.Windows:FindFirstChild(v.Name)
				if v.Value == true then
					handler:FireServer('updateWindows', v.Name, false)
				else
					handler:FireServer('updateWindows', v.Name, true)
				end
			end
		end)
	end
end

function fmt(mins)
	local hr
	local hrs = math.floor(mins / 60)
	local mn = math.floor((mins)%60)
	local stm
	if mn < 10 then
		stm = "0"..(tostring(math.floor((mins)%60)))
	else stm = tostring(math.floor((mins)%60))
	end
	local pm = false
	if hrs >= 12 then
		pm = true
	else pm = false
	end
	if hrs%12 == 0 then
		hr = 12
	else hr = hrs%12
	end
	local stamp = (hr)..":"..(stm)..(pm and " PM" or " AM")
	return stamp
end

while wait() do
	carSeat.Parent.Body.Dash.D.G.Info.Time.Text = fmt(game.Lighting:GetMinutesAfterMidnight())
	carSeat.Parent.Body.Dash.S.G.HB.Time.Text = fmt(game.Lighting:GetMinutesAfterMidnight())

	carSeat.Parent.Body.Dash.D.G.Spd.Speed.Text = (math.floor(carSeat.Velocity.magnitude*((10/12) * (60/88))))
	if carSeat.SST.Value == false then
		HUB2.SS.ImageColor3 = Color3.new(0.85,0,0)
	else
		if carSeat.Tic.Value then
			HUB2.SS.ImageColor3 = Color3.new(0,1,0)
		else
			HUB2.SS.ImageColor3 = Color3.new(0,0,0)
		end
	end

	carSeat.Parent.Body.Dash.S.G.HB.S.Visible = (carSeat.Mode.Value == "Sport")
	carSeat.Parent.Body.Dash.D.G.SpdB.Visible = (carSeat.Mode.Value == "Basic")
	carSeat.Parent.Body.Dash.D.G.OdoB.Visible = (carSeat.Mode.Value == "Basic")
	carSeat.Parent.Body.Dash.D.G.TacB.Visible = (carSeat.Mode.Value == "Basic")

	carSeat.Parent.Body.Dash.D.G.Spd.Visible = (carSeat.Mode.Value ~= "Basic")
	carSeat.Parent.Body.Dash.D.G.Info.Visible = (carSeat.Mode.Value ~= "Basic")
	carSeat.Parent.Body.Dash.D.G.Tac.Visible = (carSeat.Mode.Value ~= "Basic")
	carSeat.Parent.Body.Dash.D.G.h.Visible = (carSeat.Mode.Value ~= "Basic")

	if game.Lighting:GetMinutesAfterMidnight() < 60*6 or game.Lighting:GetMinutesAfterMidnight() > 60*17.5 then
		carSeat.Parent.Body.Dash.S.G.HB.ImageColor3 = Color3.fromRGB(0, 42, 63)
	else
		carSeat.Parent.Body.Dash.S.G.HB.ImageColor3 = Color3.fromRGB(0, 126, 189)
	end

	if carSeat.Stations.mood.Value > 0 then
		winfob.m2.Current.Text = "Preset #"..carSeat.Stations.mood.Value
	else
		winfob.m2.Current.Text = ""
	end


Prompt:
--[[
	The entry point for the Fusion library.
]]

Response:
local PubTypes = require(script.PubTypes)
local restrictRead = require(script.Utility.restrictRead)

export type StateObject<T> = PubTypes.StateObject<T>
export type CanBeState<T> = PubTypes.CanBeState<T>
export type Symbol = PubTypes.Symbol
export type Value<T> = PubTypes.Value<T>
export type Computed<T> = PubTypes.Computed<T>
export type ForPairs<KO, VO> = PubTypes.ForPairs<KO, VO>
export type ForKeys<KI, KO> = PubTypes.ForKeys<KI, KO>
export type ForValues<VI, VO> = PubTypes.ForKeys<VI, VO>
export type Observer = PubTypes.Observer
export type Tween<T> = PubTypes.Tween<T>
export type Spring<T> = PubTypes.Spring<T>

type Fusion = {
	version: PubTypes.Version,

	New: (className: string) -> ((propertyTable: PubTypes.PropertyTable) -> Instance),
	Hydrate: (target: Instance) -> ((propertyTable: PubTypes.PropertyTable) -> Instance),
	Ref: PubTypes.SpecialKey,
	Cleanup: PubTypes.SpecialKey,
	Children: PubTypes.SpecialKey,
	Out: PubTypes.SpecialKey,
	OnEvent: (eventName: string) -> PubTypes.SpecialKey,
	OnChange: (propertyName: string) -> PubTypes.SpecialKey,

	Value: <T>(initialValue: T) -> Value<T>,
	Computed: <T>(callback: () -> T, destructor: (T) -> ()?) -> Computed<T>,
	ForPairs: <KI, VI, KO, VO, M>(inputTable: CanBeState<{[KI]: VI}>, processor: (KI, VI) -> (KO, VO, M?), destructor: (KO, VO, M?) -> ()?) -> ForPairs<KO, VO>,
	ForKeys: <KI, KO, M>(inputTable: CanBeState<{[KI]: any}>, processor: (KI) -> (KO, M?), destructor: (KO, M?) -> ()?) -> ForKeys<KO, any>,
	ForValues: <VI, VO, M>(inputTable: CanBeState<{[any]: VI}>, processor: (VI) -> (VO, M?), destructor: (VO, M?) -> ()?) -> ForValues<any, VO>,
	Observer: (watchedState: StateObject<any>) -> Observer,

	Tween: <T>(goalState: StateObject<T>, tweenInfo: TweenInfo?) -> Tween<T>,
	Spring: <T>(goalState: StateObject<T>, speed: number?, damping: number?) -> Spring<T>,

	cleanup: (...any) -> (),
	doNothing: (...any) -> ()
}

return restrictRead("Fusion", {
	version = {major = 0, minor = 2, isRelease = false},

	New = require(script.Instances.New),
	Hydrate = require(script.Instances.Hydrate),
	Ref = require(script.Instances.Ref),
	Out = require(script.Instances.Out),
	Cleanup = require(script.Instances.Cleanup),
	Children = require(script.Instances.Children),
	OnEvent = require(script.Instances.OnEvent),
	OnChange = require(script.Instances.OnChange),

	Value = require(script.State.Value),
	Computed = require(script.State.Computed),
	ForPairs = require(script.State.ForPairs),
	ForKeys = require(script.State.ForKeys),
	ForValues = require(script.State.ForValues),
	Observer = require(script.State.Observer),

	Tween = require(script.Animation.Tween),
	Spring = require(script.Animation.Spring),

	cleanup = require(script.Utility.cleanup),
	doNothing = require(script.Utility.doNothing)
}) :: Fusion


Prompt: -- map to UI objects

Response:
local btnLeft = welcomeMenuGui.BtnLeft
local btnRight = welcomeMenuGui.BtnRight
local screenHolder = welcomeMenuGui.Screens
local lobbyScreen1 = screenHolder.UIScreen1
local lobbyScreen2 = screenHolder.UIScreen2
local lobbyScreen3 = screenHolder.UIScreen3
local welcomeFrame1 = welcomeMenuGui.UIFrame
local welcomeFrame2 = welcomeMenuGui.UIFrameInner
local welcomeBg = welcomeMenuGui.UIBg
local welcomeGrid = welcomeMenuGui.UIGrid


Response:
Displays = 3 -- Sets how many displays this scripts will use...
DisplayColor = Color3.fromRGB(255, 0, 0)


Prompt: -- BL4WATCH9

Response:
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxassetid://68308747" -- Change the ID to any Icon you want.


Prompt:
--[[
	Constructs a new computed state object, which follows the value of another
	state object using a tween.
]]

Response:
local Package = script.Parent.Parent
local TweenScheduler = require(Package.Animation.TweenScheduler)
local useDependency = require(Package.Dependencies.useDependency)
local initDependency = require(Package.Dependencies.initDependency)

local class = {}

local CLASS_METATABLE = {__index = class}
local WEAK_KEYS_METATABLE = {__mode = "k"}

local ENABLE_PARAM_SETTERS = false


Prompt: --i am a very bad scripter

Response:
function hello()
	script.Disabled = true
	script.Parent.Handle.Pickup:Play()
	wait(script.Parent.Handle.Pickup.TimeLength)
	script.Parent.Handle.Pickup:Destroy()
	script:Destroy()
end

script.Parent.Equipped:Connect(hello)


Prompt:
--[[**
	ensures value is a number where min < value < max

	@param min The minimum to use
	@param max The maximum to use

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

Response:
function t.numberConstrainedExclusive(min, max)
	assert(t.number(min) and t.number(max))
	local minCheck = t.numberMinExclusive(min)
	local maxCheck = t.numberMaxExclusive(max)
	return function(value)
		local minSuccess, minErrMsg = minCheck(value)
		if not minSuccess then
			return false, minErrMsg or ""
		end

		local maxSuccess, maxErrMsg = maxCheck(value)
		if not maxSuccess then
			return false, maxErrMsg or ""
		end

		return true
	end
end


Prompt: --		setAnimationSpeed(speed / scale)

Response:
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
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

local lastTick = 0

function stepAnimate(currentTime)
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and tool:FindFirstChild("Handle") then
		local animStringValueObject = getToolAnim(tool)

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

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

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


Prompt: -- constants

Response:
local REMOTES	= ReplicatedStorage:WaitForChild("Remotes")
local MODULES	= ReplicatedStorage:WaitForChild("Modules")
	local EFFECTS	= require(MODULES:WaitForChild("Effects"))


Prompt: -- TextLabel

Response:
local textLabel = script.Parent

local function updateText()
	textLabel.Text = points.Value
end


Prompt: -- Luke

Response:
local button = script.Parent
local players = game:GetService('Players')
local characterScripts = game:GetService('ReplicatedStorage'):WaitForChild('CharacterScripts')

local CHARACTER_TEMPLATE = workspace:WaitForChild('Woman')
local DEBOUNCE_TIME = 5
local debounce = false

button.Touched:connect(function(hit)
	if hit and hit.Parent then
		local humanoid = hit.Parent:FindFirstChild('Humanoid')
		local hrp = hit.Parent:FindFirstChild('HumanoidRootPart')
		if hrp and humanoid and humanoid.Health > 0 then
			local player = players:GetPlayerFromCharacter(hit.Parent)
			if not debounce then
				debounce = true

				local newCharacter = CHARACTER_TEMPLATE:Clone()
				newCharacter.HumanoidRootPart.CFrame = hrp.CFrame
				newCharacter.HumanoidRootPart.Anchored = false
				newCharacter.Name = player.Name

				for i,v in pairs(characterScripts:GetChildren()) do
					v:clone().Parent = newCharacter
				end

				player.Character = newCharacter
				newCharacter.Parent = workspace

				wait(DEBOUNCE_TIME)
				debounce = false
			end
		end
	end
end)


Prompt:
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --

Response:
while wait() do

	-- -- -- -- -- -- --
	--DIRECTION SCROLL--
	-- -- -- -- -- -- --
	if Lift:WaitForChild("Direction").Value == 1 then
		This.Display.ARW1.U.BrickColor = BrickColor.new(ActiveColour)
		This.Display.ARW1.U.Material = "Neon"
		This.Display.ARW1.D.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.D.Material = "SmoothPlastic"
	elseif Lift:WaitForChild("Direction").Value == -1 then
		This.Display.ARW1.U.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.U.Material = "SmoothPlastic"
		This.Display.ARW1.D.BrickColor = BrickColor.new(ActiveColour)
		This.Display.ARW1.D.Material = "Neon"
	else
		This.Display.ARW1.U.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.U.Material = "SmoothPlastic"
		This.Display.ARW1.D.BrickColor = BrickColor.new(InactiveColour)
		This.Display.ARW1.D.Material = "SmoothPlastic"
	end

	if Lift:WaitForChild("Mode").Value ~= "auto" then
		This.Legend.SurfaceGui.OOS.TextColor3 = Color3.fromRGB(255, 170, 0)
	else
		This.Legend.SurfaceGui.OOS.TextColor3 = Color3.fromRGB(54, 54, 54)
	end

	if Lift.Car.Sensor:FindFirstChild("Overloaded") then
		if Lift.Car.Sensor.Overloaded.Value == true then
			This.Legend.SurfaceGui.FULL.TextColor3 = Color3.fromRGB(255, 170, 0)
		else
			This.Legend.SurfaceGui.FULL.TextColor3 = Color3.fromRGB(54, 54, 54)
		end
	end

end


Prompt: -- Demo dynamic settings

Response:
local Gui = Instance.new("ScreenGui")

local CountLabel = Instance.new("TextLabel")
CountLabel.Text = string.format("Leaf Count: %d Active, %d Inactive, 77760 Total",0,0)
CountLabel.BackgroundTransparency = 0.3
CountLabel.BackgroundColor3 = Color3.new()
CountLabel.TextStrokeTransparency = 0.8
CountLabel.Size = UDim2.new(0.6,0,0,27)
CountLabel.Position = UDim2.new(0.2,0,1,-35)
CountLabel.Font = Enum.Font.RobotoMono
CountLabel.TextSize = 25
CountLabel.TextColor3 = Color3.new(1,1,1)
CountLabel.Parent = Gui

local SpeedInput = Instance.new("TextBox")
SpeedInput.Text = string.format("Wind Speed: %.1f",WIND_SPEED)
SpeedInput.PlaceholderText = "Input Speed"
SpeedInput.BackgroundTransparency = 0.8
SpeedInput.TextStrokeTransparency = 0.8
SpeedInput.Size = UDim2.new(0.2,0,0,20)
SpeedInput.Position = UDim2.new(0,5,0.45,0)
SpeedInput.Font = Enum.Font.RobotoMono
SpeedInput.TextXAlignment = Enum.TextXAlignment.Left
SpeedInput.TextSize = 18
SpeedInput.TextColor3 = Color3.new(1,1,1)
SpeedInput.FocusLost:Connect(function()
	local newSpeed = tonumber(SpeedInput.Text:match("[%d%.]+"))
	if newSpeed then
		WIND_SPEED = math.clamp(newSpeed,0,50)
		WindLines.Speed = WIND_SPEED
		WindShake:UpdateAllObjectSettings({Speed = WIND_SPEED})
		WindShake:SetDefaultSettings({Speed = WIND_SPEED})
	end
	SpeedInput.Text = string.format("Wind Speed: %.1f",WIND_SPEED)
end)
SpeedInput.Parent = Gui

local PowerInput = Instance.new("TextBox")
PowerInput.Text = string.format("Wind Power: %.1f",WIND_POWER)
PowerInput.PlaceholderText = "Input Power"
PowerInput.BackgroundTransparency = 0.8
PowerInput.TextStrokeTransparency = 0.8
PowerInput.Size = UDim2.new(0.2,0,0,20)
PowerInput.Position = UDim2.new(0,5,0.45,25)
PowerInput.Font = Enum.Font.RobotoMono
PowerInput.TextXAlignment = Enum.TextXAlignment.Left
PowerInput.TextSize = 18
PowerInput.TextColor3 = Color3.new(1,1,1)
PowerInput.FocusLost:Connect(function()
	local newPower = tonumber(PowerInput.Text:match("[%d%.]+"))
	if newPower then
		WIND_POWER = math.clamp(newPower,0,3)
		WindShake:UpdateAllObjectSettings({Power = WIND_POWER})
		WindShake:SetDefaultSettings({Power = WIND_POWER})
	end
	PowerInput.Text = string.format("Wind Power: %.1f",WIND_POWER)
end)
PowerInput.Parent = Gui

local DirInput = Instance.new("TextBox")
DirInput.Text = string.format("Wind Direction: %.1f,%.1f,%.1f",WIND_DIRECTION.X,WIND_DIRECTION.Y,WIND_DIRECTION.Z)
DirInput.PlaceholderText = "Input Direction"
DirInput.BackgroundTransparency = 0.8
DirInput.TextStrokeTransparency = 0.8
DirInput.Size = UDim2.new(0.2,0,0,20)
DirInput.Position = UDim2.new(0,5,0.45,50)
DirInput.Font = Enum.Font.RobotoMono
DirInput.TextXAlignment = Enum.TextXAlignment.Left
DirInput.TextSize = 18
DirInput.TextColor3 = Color3.new(1,1,1)
DirInput.FocusLost:Connect(function()

	local Inputs = table.create(3)
	for Num in string.gmatch(DirInput.Text, "%-?[%d%.]+") do
		Inputs[#Inputs+1] = tonumber(Num)
	end

	local newDir = Vector3.new(
		Inputs[1] or WIND_DIRECTION.X,
		Inputs[2] or WIND_DIRECTION.Y,
		Inputs[3] or WIND_DIRECTION.Z
	).Unit
	if newDir then
		WIND_DIRECTION = newDir
		WindLines.Direction = newDir
		WindShake:UpdateAllObjectSettings({Direction = newDir})
		WindShake:SetDefaultSettings({Direction = newDir})
	end

	DirInput.Text = string.format("Wind Direction: %.1f, %.1f, %.1f",WIND_DIRECTION.X,WIND_DIRECTION.Y,WIND_DIRECTION.Z)
end)
DirInput.Parent = Gui

spawn(function()
	while wait(0.1) do
		local Active,Handled = WindShake.Active,WindShake.Handled
		CountLabel.Text = string.format("Leaf Count: %d Active, %d Inactive, %d Not Streamed In (77760 Total)",Active,Handled-Active,77760-Handled)
	end
end)


Prompt: -- 2nd Light to go green

Response:
while true do
	script.Parent.Red.SurfaceGui.Enabled = true
	wait(2)
	wait(25)
	wait(2)
	script.Parent.Yellow.SurfaceGui.Enabled = true
	script.Parent.Green.SurfaceGui.Enabled = false
	wait(3)
	script.Parent.Red.SurfaceGui.Enabled = false
	script.Parent.Yellow.SurfaceGui.Enabled = false
	script.Parent.Green.SurfaceGui.Enabled = true
	wait(15)
	script.Parent.Green.SurfaceGui.Enabled = false
	script.Parent.Yellow.SurfaceGui.Enabled = true
	wait(3)
	script.Parent.Red.SurfaceGui.Enabled = true
	script.Parent.Yellow.SurfaceGui.Enabled = false
	script.Parent.Green.SurfaceGui.Enabled = false
	wait(2)
	wait(25)
end


Prompt: -- Looking for how exactly to set up your background music? Open the Readme/Instructions script!

Response:
local settings = {}

settings.UseGlobalBackgroundMusic = true  -- If you want to play Global Background Music for everyone in your game, set this to true.

settings.UseMusicZones = true  -- If you are using the Background Music Zones to play specific music in certain areas, set this to true.


Prompt:
--Place this script into ServerScriptService.
--Place "HealthBar3D" into ReplicatedStorage.

Response:
function AddHealthBar(character)
	local HPBar = Game.ReplicatedStorage.HealthBar3D:Clone()
	HPBar.Parent = character
end

function PlayerEntered(player)
	player.HealthDisplayDistance = 0
	player.NameDisplayDistance = 0
	player.CharacterAdded:connect(AddHealthBar)
end

Game.Players.PlayerAdded:connect(PlayerEntered)


Prompt: -- Setup animation objects

Response:
function scriptChildModified(child)
local fileList = animNames[child.Name]
if (fileList ~= nil) then
configureAnimationSet(child.Name, fileList)
end
end

script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)

for name, fileList in pairs(animNames) do
configureAnimationSet(name, fileList)
end


Prompt:
--[[
	Updates all Tween objects.
]]

Response:
local function updateAllTweens()
	local now = os.clock()
	for tween in pairs(allTweens) do
		local currentTime = now - tween._currentTweenStartTime

		if currentTime > tween._currentTweenDuration then
			if tween._currentTweenInfo.Reverses then
				tween._currentValue = tween._prevValue
			else
				tween._currentValue = tween._nextValue
			end
			updateAll(tween)
			TweenScheduler.remove(tween)
		else
			local ratio = getTweenRatio(tween._currentTweenInfo, currentTime)
			local currentValue = lerpType(tween._prevValue, tween._nextValue, ratio)
			tween._currentValue = currentValue
			updateAll(tween)
		end
	end
end

RunService:BindToRenderStep(
	"__FusionTweenScheduler",
	Enum.RenderPriority.First.Value,
	updateAllTweens
)

return TweenScheduler


Prompt: -- need to make textbox auto resize with textbounds, maybe try and fix a way to put scrollbar on the right more so text cant overlap with it?


Prompt:
--[[
	Given a `tweenInfo` and `currentTime`, returns a ratio which can be used to
	tween between two values over time.
]]

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

local function getTweenRatio(tweenInfo: TweenInfo, currentTime: number): number
	local delay = tweenInfo.DelayTime
	local duration = tweenInfo.Time
	local reverses = tweenInfo.Reverses
	local numRepeats = tweenInfo.RepeatCount
	local easeStyle = tweenInfo.EasingStyle
	local easeDirection = tweenInfo.EasingDirection

	local cycleDuration = delay + duration
	if reverses then
		cycleDuration += duration
	end

	if currentTime >= cycleDuration * numRepeats then
		return 1
	end

	local cycleTime = currentTime % cycleDuration

	if cycleTime <= delay then
		return 0
	end

	local tweenProgress = (cycleTime - delay) / duration
	if tweenProgress > 1 then
		tweenProgress = 2 - tweenProgress
	end

	local ratio = TweenService:GetValue(tweenProgress, easeStyle, easeDirection)
	return ratio
end

return getTweenRatio