function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local p = Instance.new("IntValue")
p.Name = "Hunger"
p.Value = 100
p.Parent = stats
local b = Instance.new("NumberValue")
b.Name = "Wood"
b.Value = 0
b.Parent = stats
local pol = Instance.new("NumberValue")
pol.Name = "Rock"
pol.Value = 0
pol.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered)
for _, v in pairs(game.Players:GetPlayers()) do
onPlayerEntered(v)
end
leaderboard script |