game.Players.PlayerAdded:connect(function(player)
game.Workspace.Players.Value = game.Workspace.Players.Value + 1
local folder1 = Instance.new("Folder")
folder1.Parent = player
folder1.Name = "leaderstats"
local folder2 = Instance.new("Folder")
folder2.Parent = player
folder2.Name = "Settings"
local currency = Instance.new("IntValue",folder1)
currency.Name = "Coins" -- Put your currency name here. Mine is Credits
local wins = Instance.new("IntValue",folder1)
wins.Name = "Wins"
local realcurrency = Instance.new("IntValue",folder2)
realcurrency.Name = "RCurrency"
local realwins = Instance.new("IntValue",folder2)
realwins.Name = "RWins"
local afk = Instance.new("BoolValue",folder2)
afk.Name = "AFK"
local winner = Instance.new("BoolValue",folder2)
winner.Name = "Winner"
local playing = Instance.new("BoolValue",folder2)
playing.Name = "Playing"
player.CharacterAdded:connect(function(char)
char.Humanoid.Died:connect(function()
that minigame
winner.Value = false
playing.Value = false
end)
end)
while wait() do
wins.Value = (realwins.Value/10)
currency.Value = (realcurrency.Value/10)
end
end)
game.Players.PlayerRemoving:connect(function()
game.Workspace.Players.Value = game.Workspace.Players.Value - 1
end)
This somewhat dosen't work?

2 comments
Any Errors?
what does line 2 work for