chrisinator66

Untitled

Nov 27th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.55 KB | None | 0 0
  1. -- Objects
  2.  
  3. local LifeCount = Instance.new("ScreenGui")
  4. local Main = Instance.new("Frame")
  5. local Title = Instance.new("TextLabel")
  6. local Counter = Instance.new("TextLabel")
  7. local LivesTitle = Instance.new("TextLabel")
  8. local Rebirths = Instance.new("TextLabel")
  9. local RebirthCount = Instance.new("TextLabel")
  10. local TimeCount = Instance.new("TextLabel")
  11. local Time = Instance.new("TextLabel")
  12. local Hide = Instance.new("TextButton")
  13. local Life = game.Players.LocalPlayer.Rebirths.Value
  14. local First = Life
  15. local Second = Life
  16. local RebirthValue = 0
  17. local Timer = 0
  18.  
  19. -- Properties
  20.  
  21. LifeCount.Name = "LifeCount"
  22. LifeCount.Parent = game.CoreGui
  23.  
  24. Main.Name = "Main"
  25. Main.Parent = LifeCount
  26. Main.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  27. Main.BackgroundTransparency = 1
  28. Main.BorderSizePixel = 0
  29. Main.Position = UDim2.new(0.936948299, 0, 0.772833645, 0)
  30. Main.Size = UDim2.new(0, 100, 0, 150)
  31.  
  32. Title.Name = "Title"
  33. Title.Parent = Main
  34. Title.BackgroundColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  35. Title.BorderSizePixel = 0
  36. Title.Position = UDim2.new(0, 0, -0.00927408878, 0)
  37. Title.Size = UDim2.new(0, 100, 0, 25)
  38. Title.Font = Enum.Font.SourceSans
  39. Title.Text = "Life Counter"
  40. Title.TextColor3 = Color3.new(0, 0, 0)
  41. Title.TextSize = 12
  42.  
  43. Counter.Name = "Counter"
  44. Counter.Parent = Main
  45. Counter.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  46. Counter.BorderSizePixel = 0
  47. Counter.Position = UDim2.new(0.439999998, 0, 0.157392576, 0)
  48. Counter.Size = UDim2.new(0, 56, 0, 36)
  49. Counter.Font = Enum.Font.SourceSans
  50. Counter.Text = "0"
  51. Counter.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  52. Counter.TextSize = 12
  53.  
  54. LivesTitle.Name = "LivesTitle"
  55. LivesTitle.Parent = Main
  56. LivesTitle.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  57. LivesTitle.BorderSizePixel = 0
  58. LivesTitle.Position = UDim2.new(0, 0, 0.157392576, 0)
  59. LivesTitle.Size = UDim2.new(0, 44, 0, 36)
  60. LivesTitle.Font = Enum.Font.SourceSans
  61. LivesTitle.Text = "Lives"
  62. LivesTitle.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  63. LivesTitle.TextSize = 12
  64.  
  65. Rebirths.Name = "Rebirths"
  66. Rebirths.Parent = Main
  67. Rebirths.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  68. Rebirths.BorderSizePixel = 0
  69. Rebirths.Position = UDim2.new(0, 0, 0.37739259, 0)
  70. Rebirths.Size = UDim2.new(0, 44, 0, 36)
  71. Rebirths.Font = Enum.Font.SourceSans
  72. Rebirths.Text = "Rebirths"
  73. Rebirths.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  74. Rebirths.TextSize = 12
  75.  
  76. RebirthCount.Name = "RebirthCount"
  77. RebirthCount.Parent = Main
  78. RebirthCount.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  79. RebirthCount.BorderSizePixel = 0
  80. RebirthCount.Position = UDim2.new(0.439999998, 0, 0.37739259, 0)
  81. RebirthCount.Size = UDim2.new(0, 56, 0, 36)
  82. RebirthCount.Font = Enum.Font.SourceSans
  83. RebirthCount.Text = "0"
  84. RebirthCount.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  85. RebirthCount.TextSize = 12
  86.  
  87. TimeCount.Name = "TimeCount"
  88. TimeCount.Parent = Main
  89. TimeCount.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  90. TimeCount.BorderSizePixel = 0
  91. TimeCount.Position = UDim2.new(0.439999998, 0, 0.6173926, 0)
  92. TimeCount.Size = UDim2.new(0, 56, 0, 36)
  93. TimeCount.Font = Enum.Font.SourceSans
  94. TimeCount.Text = "0"
  95. TimeCount.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  96. TimeCount.TextSize = 12
  97.  
  98. Time.Name = "Time"
  99. Time.Parent = Main
  100. Time.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  101. Time.BorderSizePixel = 0
  102. Time.Position = UDim2.new(0, 0, 0.6173926, 0)
  103. Time.Size = UDim2.new(0, 44, 0, 36)
  104. Time.Font = Enum.Font.SourceSans
  105. Time.Text = "Time"
  106. Time.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  107. Time.TextSize = 12
  108.  
  109. Hide.Name = "Hide"
  110. Hide.Parent = LifeCount
  111. Hide.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  112. Hide.BorderSizePixel = 0
  113. Hide.Position = UDim2.new(0.937061846, 0, 0.923429549, 0)
  114. Hide.Size = UDim2.new(0, 100, 0, 22)
  115. Hide.Font = Enum.Font.SourceSans
  116. Hide.Text = "Close"
  117. Hide.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  118. Hide.TextSize = 14
  119.  
  120. -- Scripts:
  121. Hide.MouseButton1Down:connect(function()
  122. if Main.Visible == false then
  123. Hide.Text = "Close"
  124. Main.Visible = true
  125. elseif Main.Visible == true then
  126. Hide.Text = "Open"
  127. Main.Visible = false
  128. end
  129. end)
  130.  
  131. while wait(60) do
  132. Timer = Timer+1
  133. TimeCount.Text = Timer.." Minutes"
  134. end
  135.  
  136. local i = 0
  137. game.Players.LocalPlayer.leaderstats.Life.Changed:connect(function(plr)
  138. delay(4, function()
  139. local Second = game.Players.LocalPlayer.Rebirths.Value
  140. local CounterValue = Second-First
  141. i=i+1
  142. RebirthCount.Text = i
  143. Counter.Text = CounterValue
  144. end)
  145. end)
Add Comment
Please, Sign In to add comment