Advertisement
Friaza

Untitled

Jul 7th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. local PirateStore = game:GetService("DataStoreService"):GetDataStore("DataStore")
  2. player = script.Parent.Parent
  3. repeat wait() until player.Character
  4. Power = Instance.new("IntValue", player)
  5. Power.Name = "Power"
  6. if PirateStore:GetAsync("Power:" ..player.Name) ~= nil then
  7. Player.Power.Value = PirateStore:GetAsync("Power:" ..player.Name)
  8. end
  9. Power.Changed:connect(function(SavePower) wait() PirateStore:SetAsync("Power:" ..player.Name, Power.Value) end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement