Advertisement
Cakey3101

Rebirth Handler - ClientScripts! - Speed Sim!

Mar 22nd, 2024
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | Source Code | 0 0
  1. local Players = game:GetService("Players")
  2.  
  3. local Player = Players.LocalPlayer
  4.  
  5. local Buttons = script.Parent.Parent.Buttons
  6. local Rebirths = script.Parent.Parent.Rebirths
  7.  
  8. local OpenButton = Buttons.Frame.Rebirths
  9. local ExitButton = Rebirths.Frame.Exit
  10.  
  11. local Amount = Rebirths.Frame.Amount
  12. local RebirthButton = Rebirths.Frame.Rebirth
  13.  
  14. OpenButton.MouseButton1Click:Connect(function()
  15.     Rebirths.Frame:TweenPosition(UDim2.fromScale(0.5, 0.5), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1)
  16. end)
  17.  
  18. ExitButton.MouseButton1Click:Connect(function()
  19.     Rebirths.Frame:TweenPosition(UDim2.fromScale(2, 2), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1)
  20. end)
  21.  
  22.  
  23. RebirthButton.MouseButton1Click:Connect(function()
  24.     if ((Player.leaderstats.Rebirths.Value * 1000) + 500) * 1.35 <= Player.Points.Value then
  25.         workspace.Remotes.RebirthPlayer:FireServer()
  26.     end
  27. end)
  28.  
  29. while wait(0.1) do
  30.     if ((Player.leaderstats.Rebirths.Value * 1000) + 500) * 1.35 <= Player.Points.Value then
  31.         Amount.Text = "You Have Enough Points To Rebirth!"
  32.     else
  33.         Amount.Text = "You Need "..((Player.leaderstats.Rebirths.Value * 1000) + 500) * 1.35 - Player.Points.Value.." More Points To Rebirth!"
  34.     end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement