#MinuteLeaderstats
1 messages · Page 1 of 1 (latest)
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)
Fr is chatgpt alarm
nice help
You can't put an infinity character in an intvalue since it's not a number, just set it to math.huge() so it's effectively infinity and it should work for whatever testing you need this for
it s like i wanted
next to my name is an infinity symbol
but idk if other players have normal minutes or an infinty symbol
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