Advertisement
Cakey3101

Updated Rebirth Handler - Client Script!

Apr 18th, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.64 KB | Source Code | 0 0
  1. local Players = game:GetService("Players")
  2. local Lighting = game:GetService("Lighting")
  3.  
  4. local BlurEffect = Lighting.Blur
  5.  
  6. local Player = Players.LocalPlayer
  7.  
  8. local DevProductsGUI = script.Parent.Parent.DevProducts
  9. local Islands = script.Parent.Parent.Islands
  10. local Left = script.Parent.Parent.Left
  11.  
  12. local Buttons = script.Parent.Parent.Left
  13. local Rebirths = script.Parent.Parent.Rebirths
  14.  
  15. local OpenButton = Buttons.Frame.Rebirths
  16. local ExitButton = Rebirths.Frame.Exit
  17.  
  18. local Amount = Rebirths.Frame.Amount
  19. local RebirthButton = Rebirths.Frame.Rebirth
  20.  
  21. OpenButton.MouseButton1Click:Connect(function()
  22.     Rebirths.Frame:TweenPosition(UDim2.fromScale(0.5, 0.5), Enum.EasingDirection.In, Enum.EasingStyle.Quad, 1)
  23.     wait(0.25)
  24.     BlurEffect.Enabled = true
  25.     DevProductsGUI.Enabled = false
  26.     Islands.Enabled = false
  27.     Left.Enabled = false
  28. end)
  29.  
  30. ExitButton.MouseButton1Click:Connect(function()
  31.     Rebirths.Frame:TweenPosition(UDim2.fromScale(-2, -2), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 1)
  32.     wait(0.25)
  33.     BlurEffect.Enabled = false
  34.     DevProductsGUI.Enabled = true
  35.     Islands.Enabled = true
  36.     Left.Enabled = true
  37. end)
  38.  
  39.  
  40. RebirthButton.MouseButton1Click:Connect(function()
  41.     if ((Player.leaderstats.Rebirths.Value * 1000) + 500) * 1.35 <= Player.Points.Value then
  42.         workspace.Remotes.RebirthPlayer:FireServer()
  43.     end
  44. end)
  45.  
  46. while wait(0.1) do
  47.     if ((Player.leaderstats.Rebirths.Value * 1000) + 500) * 1.35 <= Player.Points.Value then
  48.         Amount.Text = "You Have Enough Points To Rebirth!"
  49.     else
  50.         Amount.Text = "You Need "..((Player.leaderstats.Rebirths.Value * 1000) + 500) * 1.35 - Player.Points.Value.." More Points To Rebirth!"
  51.     end
  52. end
Tags: lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement