local Players = game:GetService("Players") local function bind(player) local stats = player:FindFirstChild("leaderstats") if not stats then stats = Instance.new("Folder", player) stats.Name = "leaderstats" end local coins = stats:FindFirstChild("Coins") if not coins then coins = Instance.new("IntValue", stats) coins.Name = "Coins" end local function sync() coins.Value = math.floor(player:GetAttribute("Coins") or 0) end player:GetAttributeChangedSignal("Coins"):Connect(sync) sync() end Players.PlayerAdded:Connect(bind) for _, player in Players:GetPlayers() do bind(player) end