Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:Connect(function(gracz)
- local kasa = Bank:GetAsync(gracz.UserId) or 0
- local tablicaNaSerwerze = Instance.new("Folder", game.ServerStorage)
- tablicaNaSerwerze.Name = gracz.Name
- local kasaNaSerwerze = Instance.new("NumberValue", tablicaNaSerwerze)
- kasaNaSerwerze.Name = "Kasa"
- kasaNaSerwerze.Value = kasa
- local tablicaLokalnie = Instance.new("Folder", gracz)
- tablicaLokalnie.Name = "leaderstats"
- local kasaLokalnie = Instance.new("NumberValue", tablicaLokalnie)
- kasaLokalnie.Name = "Kasa"
- kasaLokalnie.Value = kasa
- for i, przycisk in pairs(przyciski:GetChildren()) do
- nowyPrzycisk(przycisk)
- end
- gracz:LoadCharacter()
- kasaNaSerwerze.Changed:Connect(function(liczba)
- kasaLokalnie.Value = liczba
- end)
- while true do
- Bank:SetAsync(gracz.UserId, kasaNaSerwerze.Value)
- print("Kasa zapisana!")
- wait(10)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement