Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[ 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
-- Update the cutscene every render frame


RunService.RenderStepped:Connect(function(Delta)
	Demo:Update(Delta)
end)

if PlayOnPlayerJoin and PlayOnPlayerJoin.Value then
	-- Play the cutscene
	PlayCutscene()
end

if PlayOnPartTouch then
	local part = script.PlayOnPartTouch.Value
	if part and part:IsA("BasePart") then
		part.Touched:Connect(function(hit)
			if hit.Parent == Player.Character then
				PlayCutscene()
			end
		end)
	end
	PlayOnPartTouch:Destroy()
end

if PlayOnEventFire then
	local e = PlayOnEventFire.Value
	if e and e:IsA("BindableEvent") then
		e.Event:Connect(PlayCutscene)
	end
	PlayOnEventFire:Destroy()
end

if PlayOnRemoteEventFire then
	local e = PlayOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(PlayCutscene)
	end
	PlayOnRemoteEventFire:Destroy()
end

if StopOnRemoteEventFire then
	local e = StopOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(function()
			Demo:Stop()
		end)
	end
	StopOnRemoteEventFire:Destroy()
end

if StopOnRemoteEventFire then
	local e = StopOnRemoteEventFire.Value
	if e and e:IsA("RemoteEvent") then
		e.OnClientEvent:Connect(function()
			Demo:Stop()
		end)
	end
	StopOnRemoteEventFire:Destroy()
end

if CutsceneGui then
	CutsceneGui.Parent = Player:WaitForChild("PlayerGui")
	local SkipCutsceneButton = CutsceneGui:FindFirstChild("SkipCutscene", true)
	local PlayCutsceneButton = CutsceneGui:FindFirstChild("PlayCutscene", true)
	
	if SkipCutsceneButton and SkipCutsceneButton:IsA("GuiButton") then
		SkipCutsceneButton.MouseButton1Click:Connect(function()
			Demo:Stop()
		end)
	end
	
	if PlayCutsceneButton and PlayCutsceneButton:IsA("GuiButton") then
		PlayCutsceneButton.MouseButton1Click:Connect(function()
			PlayCutscene()
		end)
	end
	Demo.EStop.Event:Connect(function()
		CutsceneGui.Enabled = false
	end)
end

local Character = Player.Character or Player.CharacterAdded:Wait()

if PlayOnCharacterAdded and PlayOnCharacterAdded.Value then
	PlayCutscene()
end
if PlayOnCharacterDied and PlayOnCharacterDied.Value then
	local Humanoid = Character:WaitForChild("Humanoid")
	Character:WaitForChild("Humanoid").Died:Connect(function()
		PlayCutscene()
	end)
end
PlayOnCharacterAdded:Destroy()
--// 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)
----[[ 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)
-- 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()
----  \/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
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------



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 a t.union of each value in the table as a t.literal

	@param valueTable The table to get values from

	@returns True iff the condition is satisfied, false otherwise
**--]]


function t.valueOf(valueTable)
	local values = {}
	local length = 0
	for _, value in pairs(valueTable) do
		length = length + 1
		values[length] = value
	end

	return t.literal(table.unpack(values, 1, length))
end
--[[[Default Controls]]


	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}
	
	--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.T					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.M					,
		ToggleMouseDrive		= Enum.KeyCode.R					,
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,
		
		--Handbrake
		PBrake					= Enum.KeyCode.P					,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= nil				,
		ContlrToggleTCS			= nil				,
		ContlrToggleABS			= nil		,
	}