Roblox/luau_corpus huggingface dataset:
-- DO NOT MESS WITH THE SCRIPT UNLESS YOU KNOW WHAT YOU'RE DOING!
-- DO NOT CHANGE FOOTSTEPS SCRIPT NAME OR IT WONT WORK.
game.Players.ChildAdded:connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		if plr.ClassName == "Player" then
			if plr.Character:FindFirstChild("Sound") then
				plr.Character:FindFirstChild("Sound"):remove()
			else
				return
			end
			local footsteps = script.FootSteps:clone()
			footsteps.Parent = plr.Character
			footsteps.Disabled = false
		else
			return
		end
	end)
end)
--returns the wielding player of this tool
function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position
	
	spawnPos  = spawnPos + (direction * 5)
	Tool.Handle.Part.Transparency = 1
	
	local Object = Tool.Handle:Clone()
	Object.Parent = workspace
	Object.Part.Transparency = 0
	
	Object.Swing.Pitch = Random.new():NextInteger(90, 110)/100
	Object.Swing:Play()
	
	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	Object.Trail.Enabled = true
	
	local rand = 11.25
	Object.RotVelocity = Vector3.new(Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand))
	Object:SetNetworkOwner(getPlayer())
	
	local ScriptClone = DamageScript:Clone()
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false
	
	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "creator"
	tag.Parent = Object
end

PowerRemote.OnServerEvent:Connect(function(player, Power)
	local holder = getPlayer()
	if holder ~= player then return end
	
	AttackVelocity = Power
end)

TossRemote.OnServerEvent:Connect(function(player, mousePosition)
	local holder = getPlayer()
	if holder ~= player then return end
	
	if Cooldown.Value == true then return end
	Cooldown.Value = true
	
	local holder = getPlayer()
	
	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		TossRemote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit
	
	Toss(lookAt)
	
	task.wait(CooldownTime)
	Cooldown.Value = false
end)

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)
--[[ Local Functions ]]--
local function onShiftLockToggled()
	IsShiftLocked = not IsShiftLocked
	if IsShiftLocked then
		ShiftLockIcon.Image = SHIFT_LOCK_ON
		Mouse.Icon = SHIFT_LOCK_CURSOR
	else
		ShiftLockIcon.Image = SHIFT_LOCK_OFF
		Mouse.Icon = ""
	end
	ShiftLockController.OnShiftLockToggled:Fire()
end

local function initialize()
	if ScreenGui then
		ScreenGui:Destroy()
		ScreenGui = nil
	end
	ScreenGui = Instance.new('ScreenGui')
	ScreenGui.Name = "ControlGui"
	
	local frame = Instance.new('Frame')
	frame.Name = "BottomLeftControl"
	frame.Size = UDim2.new(0, 130, 0, 46)
	frame.Position = UDim2.new(0, 0, 1, -46)
	frame.BackgroundTransparency = 1
	frame.Parent = ScreenGui
	
	ShiftLockIcon = Instance.new('ImageButton')
	ShiftLockIcon.Name = "MouseLockLabel"
	ShiftLockIcon.Size = UDim2.new(0, 62, 0, 62)
	ShiftLockIcon.Position = UDim2.new(0, 2, 0, -65)
	ShiftLockIcon.BackgroundTransparency = 1
	ShiftLockIcon.Image = IsShiftLocked and SHIFT_LOCK_ON or SHIFT_LOCK_OFF
	ShiftLockIcon.Visible = IsShiftLockMode
	ShiftLockIcon.Parent = frame
	
	ShiftLockIcon.MouseButton1Click:connect(onShiftLockToggled)
	
	ScreenGui.Parent = PlayerGui
end
--!strict
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 *
 ]]
local Packages = script.Parent.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local setTimeout = LuauPolyfill.setTimeout

return function(task)
	-- deviation: Replace with setImmediate once we create an equivalent polyfill
	return setTimeout(task, 0)
end
--// Techyfied \\--
-- For info, visit https://devforum.roblox.com/t/623798 --
-- Put in ReplicatedFirst to make it work --

local ChatService = game:GetService("Chat") -- Gets the Chat service
ChatService.BubbleChatEnabled = true -- Enables the bubble chat

local settings = {		
	--[[ DELETE THIS LINE IF YOU HAVE BACKGROUND IMAGE
	BackgroundImage = {
		Image = "rbxassetid://6733332557",
		ScaleType = Enum.ScaleType.Slice,
		SliceCenter = Rect.new(40, 40, 360, 160),
		SliceScale = 0.5
	},
	    DELETE THIS LINE IF YOU HAVE BACKGROUND IMAGE ]]
	
	--[[ DELETE THIS LINE IF YOU WANT GRADIENT BACKGROUND
	
	BackgroundGradient = {
		Enabled = true,
		Rotation = 90,
		Color = ColorSequence.new(Color3.fromRGB(150, 225, 255), Color3.fromRGB(50, 115, 255)),
		Transparency = NumberSequence.new({
			NumberSequenceKeypoint.new(0, 0.2),
			NumberSequenceKeypoint.new(1, 0.5)
		})
	},
	
	    DELETE THIS LINE IF YOU WANT GRADIENT BACKGROUND]]

	BubbleDuration = 15, -- How long the bubble chat should stay on player's head
	MaxBubbles = 3, -- How many bubbles can be on a players head at one time
	
	BackgroundColor3 = Color3.fromRGB(250, 250, 250), -- Background Color of the bubblechat
	TextColor3 = Color3.fromRGB(57, 59, 61), -- Text Color of the bubble chat
	TextSize = 16, -- Text size of the text in bubble chat
	Font = Enum.Font.GothamSemibold, -- Font of the text in bubble chat
	Transparency = .1, -- Transparency of the bubble chat (0-1)
	CornerRadius = UDim.new(0, 12), -- CornerRadius of the bubble chat
	TailVisible = true, -- Visiblity of the tail located under bubble chat
	Padding = 8, -- Extra Height of each bubble chat (in studs)
	MaxWidth = 300, -- Max width possible for the bubble chat (in studs)

	VerticalStudsOffset = 0, -- How far (in studs) the bubble will appear from player's head (in studs)

	BubblesSpacing = 6, -- Spacing between each bubble chat

	MinimizeDistance = 40, -- The minimum distance a player must be to see the bubbles. Else it'll appear like "..."
	MaxDistance = 100, -- The maximum distance a player must be to see the bubble chat. If they're far than this, the chat text will appear like "..."
	
	--[[ DELETE THIS LINE IF YOU WANT CUSTOM ANIMATION  
	
	SizeAnimation = {
		SpringDampingRatio = 0.25
	},
	TransparencyAnimation = {
		SpringFrequency = 3
	},
	    DELETE THIS LINE IF YOU WANT CUSTOM ANIMATION]]
	
	
}

pcall(function()
	game:GetService("Chat"):SetBubbleChatSettings(settings)
end)
--[=[
	Utility functions primarily used to bind animations into update loops of the Roblox engine.
	@class StepUtils
]=]

local HttpService = game:GetService("HttpService")
local RunService = game:GetService("RunService")

local StepUtils = {}
--			torsoPos = torsoPos * 2 -- Turn Impeded?, off
	--		Distance = 10
		end -- if no target?
	end -- Logic 0
----[[ Color Settings ]]
module.BackGroundColor = Color3.new(0, 0, 0)
module.DefaultMessageColor = Color3.new(1, 1, 1)
module.DefaultChatColor = Color3.fromRGB(200, 200, 200)
module.DefaultNameColor = Color3.new(1, 1, 1)
module.ChatBarBackGroundColor = Color3.new(0, 0, 0)
module.ChatBarBoxColor = Color3.new(1, 1, 1)
module.ChatBarTextColor = Color3.new(0, 0, 0)
module.ChannelsTabUnselectedColor = Color3.new(0, 0, 0)
module.ChannelsTabSelectedColor = Color3.new(30/255, 30/255, 30/255)
module.DefaultChannelNameColor = Color3.fromRGB(35, 76, 142)
module.WhisperChannelNameColor = Color3.fromRGB(102, 14, 102)
module.ErrorMessageTextColor = Color3.fromRGB(245, 50, 50)

module.DefaultPrefix = ""
module.DefaultPrefixColor = Color3.fromRGB(255,255,255)
--AdditionPerIntelligence: Increase to heal power per Intelligence.
--BaseHeal: How much it will heal before any attribute modifiers.
--Cooldown: How long you have to wait before you can cast again.
--ManaCost: The amount of MP needs to cast.
--Offset: The offset to heal amount. (Example: If set to 2, it will randomly add or subtract anything from -2 to +2.)

Tool = script.Parent

Debris = Game:GetService("Debris")

script.Parent.ToolTip = "Cost: " .. script.Parent.PROPERTIES.ManaCost.Value .. " MP"

function Heal()
	Character = Tool.Parent
	Player = Game.Players:GetPlayerFromCharacter(Character)
	if script.Parent.Enabled == true and Player ~= nil then
		if Player.Stats.Mana.Value >= script.Parent.PROPERTIES.ManaCost.Value then
			script.Parent.Enabled = false
			HealAmount = script.Parent.PROPERTIES.BaseHeal.Value + (script.Parent.PROPERTIES.AdditionPerIntelligence.Value * Player.attributes.Intelligence.Value) + math.random(-script.Parent.PROPERTIES.Offset.Value, script.Parent.PROPERTIES.Offset.Value)
			
			--Heal text
			local part = Instance.new("BillboardGui")
			part.Size = UDim2.new(0,50,0,100) 
			part.StudsOffset = Vector3.new(0,2,0)
			local part2 = Instance.new("TextLabel") 
			dt = Game.ReplicatedStorage.DynamicText:Clone()
			part2.Font = "SourceSansBold"
			part2.FontSize = "Size24"
			part2.TextStrokeTransparency = 0
			part2.Size = UDim2.new(1,0,1,0) 
			part2.Position = UDim2.new(0,0,0,0) 
			part2.BackgroundTransparency = 1
			part2.Parent = part 
			part2.TextColor3 = Color3.new(0, 1, 0)
			dt.Parent = part2
			dt.Disabled = false
			part.Parent = Character.Head
			part.Adornee = part.Parent
			
			part2.Text = "+" .. HealAmount
			Debris:AddItem(part, 2)		
			
			Character.Humanoid.Health = Character.Humanoid.Health + HealAmount
			Player.Stats.Mana.Value = Player.Stats.Mana.Value - script.Parent.PROPERTIES.ManaCost.Value
			wait(script.Parent.PROPERTIES.Cooldown.Value)
			script.Parent.Enabled = true
		else print("Insufficient mana!")
		end
	else print("Either cooldown is in effect or player doesn't exist!")
	end	
end

script.Parent.Activated:connect(Heal)
-- Helps identify side effects in render-phase lifecycle hooks and setState
-- reducers by double invoking them in Strict Mode.
-- ROBLOX TODO: we'll want to enable this for DEV app bundles
exports.debugRenderPhaseSideEffectsForStrictMode = _G.__DEV__
-- The amount the aim will increase or decrease by
-- decreases this number reduces the speed that recoil takes effect
local AimInaccuracyStepAmount = 0.0125
-- changes a BezierPoint in the Bezier
-- only works if the BezierPoint exists in the Bezier
function Bezier:ChangeBezierPoint(index: number, p: Vector3 | BasePart)
	
	-- check that index is a number
	if type(index) ~= "number" then
		error("Bezier:ChangeBezierPoint() only accepts a number index as the first argument!")
	end
	
	-- check if given value is a Vector3 or BasePart
	if p and (typeof(p) == "Instance" and p:IsA("BasePart")) or typeof(p) == "Vector3" then
		
		-- check if the bezier point exists
		local BezierPoint = self.Points[index]
		if BezierPoint then
			
			-- check type of point and add to bezier
			BezierPoint.Type = typeof(p) == "Vector3" and "StaicPoint" or "BasePartPoint";
			BezierPoint.Point = p
			
			-- update bezier
			self:UpdateLength()
		else
			
			-- bezier point does not exist
			error("Did not find BezierPoint at index " .. tostring(index))
		end
	else
		
		-- incorrect type
		error("Bezier:ChangeBezierPoint() only accepts a Vector3 or BasePart as the second argument!")
	end
end
-- Left Arms
character.RagdollRig.ConstraintLeftUpperArm.Attachment0 = LUA
character.RagdollRig.ConstraintLeftUpperArm.Attachment1 = LUARig
character.RagdollRig.ConstraintLeftLowerArm.Attachment0 = LLA
character.RagdollRig.ConstraintLeftLowerArm.Attachment1 = LLARig
character.RagdollRig.ConstraintLeftHand.Attachment0 = LH
character.RagdollRig.ConstraintLeftHand.Attachment1 = LHRig
-- ================================================================================
-- PUBLIC FUNCTIONS
-- ================================================================================
function PilotSeat.new(speeder)
	local newPilotSeat = {}
	setmetatable(newPilotSeat, PilotSeat)
	
	-- Set speeder and main (PrimaryPart)
	newPilotSeat.speeder = speeder
	newPilotSeat.main = speeder.PrimaryPart
	
	-- Mass equalizer
	SetMassless(newPilotSeat.speeder, newPilotSeat)
	SetMass(newPilotSeat.main)
	newPilotSeat.mass = GetMass(newPilotSeat.speeder)
	
	SetupCollisionDetection(newPilotSeat.speeder, newPilotSeat)
	
	-- Settings
	local _settings = newPilotSeat.main:FindFirstChild("Settings")
	assert(_settings, "A Settings script wasn't found. Make sure your finished Model includes a Body part with an attached Setting Script")
	newPilotSeat._settings = require(_settings)
	
	newPilotSeat.engine = Engine.new(newPilotSeat)


	return newPilotSeat
end -- PilotSeat.new()


function PilotSeat:Destroy()	
	self.speeder:Destroy()
	self.main = false
	self.id = false
	self.engine = false
end -- PilotSeat:Destroy()
-- Reference to the configuration module
local config = require(game.ReplicatedFirst.ClipSettings) -- Assuming the new configuration module is stored in ReplicatedStorage as "Config"
----  \/Lighting\/
model = script.Parent
wait(0.5)
currentP = "Off"
script.Parent.Events.Lighting.OnServerEvent:Connect( function(player, pattern)
	if script.Parent.Values.Lighting.Value == true then
		script.Parent.Values.Lighting.Value = false
	else
		script.Parent.Values.Lighting.Value = true
	end
end)
-- Create component
local Tooltip = Roact.PureComponent:extend(script.Name)

function Tooltip:init()
    self.FrameSize, self.SetFrameSize = Roact.createBinding(UDim2.new())
    self:UpdateTextBounds(self.props.Text)
end

function Tooltip:willUpdate(nextProps)
    if self.props.Text ~= nextProps.Text then
        self:UpdateTextBounds(nextProps.Text)
    end
end

function Tooltip:UpdateTextBounds(Text)
    self.TextBounds = TextService:GetTextSize(
        Text:gsub('<br />', '\n'):gsub('<.->', ''),
        10,
        Enum.Font.Gotham,
        Vector2.new(math.huge, math.huge)
    )
end

function Tooltip:render()
    return new('Frame', {
        AnchorPoint = Vector2.new(0.5, 0);
        BackgroundColor3 = Color3.fromRGB(58, 58, 58);
        BackgroundTransparency = 0;
        BorderSizePixel = 0;
        Position = UDim2.new(0.5, 0, 1, 2);
        Size = UDim2.fromOffset(self.TextBounds.X + 20, self.TextBounds.Y + 8);
        ZIndex = 2;
        Visible = self.props.IsVisible;
    }, {
        Corners = new('UICorner', {
            CornerRadius = UDim.new(0, 3);
        });
        Arrow = new('Frame', {
            AnchorPoint = Vector2.new(0.5, 0.5);
            BackgroundColor3 = Color3.fromRGB(58, 58, 58);
            BackgroundTransparency = 0;
            BorderSizePixel = 0;
            Position = UDim2.new(0.5, 0, 0, 0);
            Size = UDim2.new(0, 6, 0, 6);
            ZIndex = 2;
        });
        Text = new('TextLabel', {
            BackgroundTransparency = 1;
            Size = UDim2.new(1, 0, 1, 0);
            ZIndex = 2;
            Font = Enum.Font.Gotham;
            RichText = true;
            Text = self.props.Text;
            TextColor3 = Color3.fromRGB(255, 255, 255);
            TextSize = 10;
            TextXAlignment = Enum.TextXAlignment.Center;
            TextYAlignment = Enum.TextYAlignment.Center;
        });
    })
end

return Tooltip
--////////////////////////////// Include
--//////////////////////////////////////
local ChatConstants = require(replicatedModules:WaitForChild("ChatConstants"))
local Util = require(modulesFolder:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
ChatLocalization = ChatLocalization or {}

if not ChatLocalization.FormatMessageToSend or not ChatLocalization.LocalizeFormattedMessage then
	function ChatLocalization:FormatMessageToSend(key,default) return default end
end
--[[**
	asserts a given check

	@param check The function to wrap with an assert

	@returns A function that simply wraps the given check in an assert
**--]]
function t.strict(check)
	return function(...)
		assert(check(...))
	end
end

return t
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		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 amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

  	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()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	local requireHandleCheck = not UserSettings():IsUserFeatureEnabled("UserToolR15Fix")
	if tool and ((requireHandleCheck and tool.RequiresHandle) or 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
--[[Super Util]]--
function WaitForChild(parent,...)
	local debugPrint = false
	for _, i in ipairs({...}) do
		if type(i)=='boolean' then
			debugPrint = i
		else
			while not parent:FindFirstChild(i) do  
				wait(1/30) 
				if debugPrint then
					print(script.Name..':'..parent.Name..' Waiting for '.. i)
				end
			end
			parent=parent[i]
		end
	end
	return parent
end

function ForEach(parent,func)
	if type(parent)=='table' then
		for _,i in pairs(parent) do
			func(i)
		end
	else
		for _,i in pairs(parent:GetChildren()) do
			func(i)
		end
	end
end

function MakeValue(class,name,value,parent)
	local temp = Instance.new(class)
	temp.Name = name
	temp.Value = value
	temp.Parent = parent
	return temp
end	

function TweenProperty(obj, propName, inita, enda, length,sentinel)
	local startTime = tick()
	local mySentinel = sentinel.Value
	local diff = enda-inita
	while tick()-startTime<length and mySentinel==sentinel.Value do
		obj[propName] = (((tick()-startTime)/length)*diff)+inita
		wait(1/30)
	end
	obj[propName] = enda	
end
-- Animate Out, slow
for i=1,i_total do
if( math.abs(wiggle_total) > (wiggle_i * 3) ) then
wiggle_i = -wiggle_i
end
wiggle_total = wiggle_total + wiggle_i
overlay.Position = UDim2.new( (0 - (2 * (i/i_total)) + wiggle_total/2), 0, (0 - (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
-- Animate stuff
waitForChild(script.Parent, "Base")
local base = script.Parent.Base
waitForChild(base, "Fire")
waitForChild(base, "Smoke")

local onColor = BrickColor.new(1,1,1)
local offColor = BrickColor.new(.2,.2,.2)
base.BrickColor = onColor

base.Fire.Enabled = true
base.Smoke.Enabled = true
wait(0.5)
base.Fire.Enabled = false
wait(0.5)
base.Smoke.Enabled = false
base.BrickColor = offColor
-- Don't edit if you don't know what you're doing --

local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local DataStore = DataStoreService:GetOrderedDataStore("Fails")
local Frame = script.Parent.Frame
local Contents = Frame.Contents
local Template = script.objTemplate

local COLORS = {
	Default = Color3.fromRGB(38, 50, 56),
	Gold = Color3.fromRGB(255, 215, 0),
	Silver = Color3.fromRGB(192, 192, 192),
	Bronze = Color3.fromRGB(205, 127, 50)
}
local ABBREVIATIONS = { "K", "M", "B", "T" }


local function toHumanReadableNumber(num)
	if num < 1000 then
		return tostring(num)
	end
	
	local digits = math.floor(math.log10(num)) + 1
	local index = math.min(#ABBREVIATIONS, math.floor((digits - 1) / 3))
	local front = num / math.pow(10, index * 3)
	
	return string.format("%i%s+", front, ABBREVIATIONS[index])
end

local function getItems()
	local data = DataStore:GetSortedAsync(false, maxItems, minValueDisplay, maxValueDisplay)
	local topPage = data:GetCurrentPage()

	Contents.Items.Nothing.Visible = #topPage == 0 and true or false

	for position, v in ipairs(topPage) do
		local userId = v.key
		local value = v.value
		local username = "[Not Available]"
		local color = COLORS.Default

		local success, err = pcall(function()
			username = Players:GetNameFromUserIdAsync(userId)
		end)

		if position == 1 then
			color = COLORS.Gold
		elseif position == 2 then
			color = COLORS.Silver
		elseif position == 3 then
			color = COLORS.Bronze
		end

		local item = Template:Clone()
		item.Name = username
		item.LayoutOrder = position
		item.Values.Number.TextColor3 = color
		item.Values.Number.Text = position
		item.Values.Username.Text = username
		item.Values.Value.Text = abbreviateValue and toHumanReadableNumber(value) or value
		item.Parent = Contents.Items
	end
end


script.Parent.Parent.Color = headingColor
Frame.Heading.ImageColor3 = headingColor
Frame.Heading.Bar.BackgroundColor3 = headingColor

while true do
	for _, player in pairs(Players:GetPlayers()) do
		local leaderstats = player:FindFirstChild("leaderstats")

		if not leaderstats then
			warn("Couldn't find leaderstats!")
			break
		end

		local statsValue = leaderstats:FindFirstChild(statsName)
		

		if not statsValue then
			warn("Couldn't find " .. statsName .. " in leaderstats!")
			break
		end

		pcall(function()
			DataStore:UpdateAsync(player.UserId, function()
				return tonumber(statsValue.Value)
			end)
		end)
	end

	for _, item in pairs(Contents.Items:GetChildren()) do
		if item:IsA("Frame") then
			item:Destroy()
		end
	end

	getItems()

	wait()
	Frame.Heading.Heading.Text = statsName .. " Leaderboard"
	Contents.GuideTopBar.Value.Text = statsName
	wait(updateEvery)
end
--[[
	Returns the current value of this ComputedPairs object.
	The object will be registered as a dependency unless `asDependency` is false.
]]
function class:get(asDependency: boolean?)
	if asDependency ~= false then
		useDependency(self)
	end
	return self._outputTable
end