Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
	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
]]


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,
}
--Function For Making New Ray Bricks


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
-- places a brick at pos and returns the position of the brick's opposite corner


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)
--!strict


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
--[[
	Shows all ScreenGuis and CoreGuis that were hidden by `hideGuis`. If the
	callback `showOtherGuis` is defined then that function is called instead.
]]


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
--	====================
--	MISCELLANEOUS
--	Etc. settings for the gun
--	====================



		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"
-- Implements Javascript's `Array.prototype.filter` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter


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
--[[
	Constructs special keys for property tables which connect event listeners to
	an instance.
]]



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
--local folders = game.ServerStorage:FindFirstChild(".PlayerFolders")
--playerfolder = folders:FindFirstChild(player.Name)


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
-- declarations



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


			
			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
--[[
	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
]]


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 = {}
--[[
	The entry point for the Fusion library.
]]



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
-- map to UI objects


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
--		setAnimationSpeed(speed / scale)


		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
-- Luke




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)
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --



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
-- 2nd Light to go green



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
--Place this script into ServerScriptService.
--Place "HealthBar3D" into ReplicatedStorage.



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)
--[[
	Updates all Tween objects.
]]


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
--[[
	Given a `tweenInfo` and `currentTime`, returns a ratio which can be used to
	tween between two values over time.
]]



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