Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local PirateStore = game:GetService("DataStoreService"):GetDataStore("DataStore")
- player = script.Parent.Parent
- repeat wait() until player.Character
- Power = Instance.new("IntValue", player)
- Power.Name = "Power"
- if PirateStore:GetAsync("Power:" ..player.Name) ~= nil then
- Player.Power.Value = PirateStore:GetAsync("Power:" ..player.Name)
- end
- Power.Changed:connect(function(SavePower) wait() PirateStore:SetAsync("Power:" ..player.Name, Power.Value) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement