Advertisement
chrisinator66

Untitled

Nov 27th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. -- Instances:
  2. local LifeCount = Instance.new("ScreenGui")
  3. local Main = Instance.new("Frame")
  4. local Title = Instance.new("TextLabel")
  5. local Counter = Instance.new("TextLabel")
  6. local Hide = Instance.new("TextButton")
  7. local Life = game.Players.LocalPlayer.Rebirths.Value
  8. local First = Life
  9. local Second = Life
  10.  
  11. --Properties:
  12. LifeCount.Name = "LifeCount"
  13. LifeCount.Parent = game.CoreGui
  14. Main.Name = "Main"
  15. Main.Parent = LifeCount
  16. Main.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  17. Main.BorderSizePixel = 0
  18. Main.Position = UDim2.new(0.936948299, 0, 0.838407457, 0)
  19. Main.Size = UDim2.new(0, 100, 0, 75)
  20.  
  21. Title.Name = "Title"
  22. Title.Parent = Main
  23. Title.BackgroundColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  24. Title.BorderSizePixel = 0
  25. Title.Position = UDim2.new(0, 0, -0.00927408878, 0)
  26. Title.Size = UDim2.new(0, 100, 0, 25)
  27. Title.Font = Enum.Font.SourceSans
  28. Title.Text = "Life Counter"
  29. Title.TextColor3 = Color3.new(0, 0, 0)
  30. Title.TextSize = 14
  31.  
  32. Counter.Name = "Counter"
  33. Counter.Parent = Main
  34. Counter.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  35. Counter.BorderSizePixel = 0
  36. Counter.Position = UDim2.new(0.0799999982, 0, 0.417392582, 0)
  37. Counter.Size = UDim2.new(0, 85, 0, 36)
  38. Counter.Font = Enum.Font.SourceSans
  39. Counter.Text = "0"
  40. Counter.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  41. Counter.TextSize = 14
  42.  
  43. Hide.Name = "Hide"
  44. Hide.Parent = LifeCount
  45. Hide.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  46. Hide.BorderSizePixel = 0
  47. Hide.Position = UDim2.new(0.937061787, 0, 0.925355136, 0)
  48. Hide.Size = UDim2.new(0, 100, 0, 20)
  49. Hide.Font = Enum.Font.SourceSans
  50. Hide.Text = "Close"
  51. Hide.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  52. Hide.TextSize = 14
  53. -- Scripts:
  54. Hide.MouseButton1Down:connect(function()
  55. if Main.Visible == false then
  56. Hide.Text = "Close"
  57. Main.Visible = true
  58. elseif Main.Visible == true then
  59. Hide.Text = "Open"
  60. Main.Visible = false
  61. end
  62. end)
  63.  
  64.  
  65. game.Players.LocalPlayer.leaderstats.Life.Changed:connect(function(plr)
  66. delay(4, function()
  67. local Second = Life
  68. local CounterValue = Second-First
  69. Counter.Text = CounterValue
  70. print(Second,First)
  71. end)
  72. end)
  73. print(Second,First)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement