#MinuteLeaderstats

1 messages · Page 1 of 1 (latest)

tight hare
#

hi guys, i have a script which shows ur minutes that u played in ur leaderstats. but i want that theres infinity symbol next to my name in the leaderstats minutes field. is that possible?

#

so i did this script now, in my name it says infinty but im not sure if only i have it, can sm1 check it up?:

local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("TimeStats")

local INFINITE_USER_ID = YOUR_USER_ID_HERE -- ← put your UserId here

game.Players.PlayerAdded:Connect(function(Player)
local Leaderstats = Instance.new("Folder")
Leaderstats.Name = "leaderstats"
Leaderstats.Parent = Player

-- Leaderstats display
local Minutes = Instance.new("StringValue")
Minutes.Name = "Minutes"
Minutes.Parent = Leaderstats

-- Real stored minutes
local RealMinutes = Instance.new("IntValue")
RealMinutes.Name = "RealMinutes"
RealMinutes.Parent = Player

local Data = DataStore:GetAsync(Player.UserId)
if Data then
    RealMinutes.Value = Data
end

-- If it's YOU → infinity
if Player.UserId == INFINITE_USER_ID then
    Minutes.Value = "∞"
else
    Minutes.Value = tostring(RealMinutes.Value)
end

task.spawn(function()
    while task.wait(60) do
        RealMinutes.Value += 1

        if Player.UserId ~= INFINITE_USER_ID then
            Minutes.Value = tostring(RealMinutes.Value)
        end
    end
end)

end)

game.Players.PlayerRemoving:Connect(function(Player)
local real = Player:FindFirstChild("RealMinutes")
if real then
DataStore:SetAsync(Player.UserId, real.Value)
end
end)

solar trout
#

chatgpt slop

#

you can do it but not with an integer value

acoustic wraith
#

Fr is chatgpt alarm

tight hare
#

nice help

edgy glade
tight hare
#

next to my name is an infinity symbol

#

but idk if other players have normal minutes or an infinty symbol

edgy glade
#

You'll have to make a string instead of an int just for yourself under the same name

#

but that could also break your game in a bunch of ways if you're not careful

#

for example just in this script

game.Players.PlayerRemoving:Connect(function(Player)
local real = Player:FindFirstChild("RealMinutes")
if real then
DataStore:SetAsync(Player.UserId, real.Value)
end
end)

you'd need to convert real.Value to a number or the datastore would break for you

#

and if you can spend minutes or gain minutes or anything like that, you would need to do the same thing