Advertisement
vendaskOfficial

RebirthButton

Dec 15th, 2018
5,703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. --watch the video to know where to put it
  2. local repStorage = game:GetService("ReplicatedStorage")
  3. local remote = repStorage:FindFirstChild("RebirthClick")
  4.  
  5. local button = script.Parent
  6.  
  7. local debounce = false
  8.  
  9. button.MouseButton1Click:Connect(function()
  10.     local rebirths = game.Players.LocalPlayer.leaderstats:FindFirstChild("Rebirths")
  11.     if not debounce then
  12.         debounce = true
  13.         local playerPoint = rebirths
  14.         remote:FireServer(playerPoint)
  15.         wait(0.01)
  16.         debounce = false
  17.     end
  18. end)
  19.  
  20. repeat
  21.     local rebirths = game.Players.LocalPlayer.leaderstats:FindFirstChild("Rebirths")
  22.     local textButton = script.Parent
  23.     textButton.Text = "Rebirth: ".. tostring(100 * (rebirths.Value + 1)) .." cash required"
  24.     wait(0.01)
  25. until script.Parent == nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement