Advertisement
chrisinator66

Untitled

Nov 26th, 2018
149
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. --Properties:
  8. LifeCount.Name = "LifeCount"
  9. LifeCount.Parent = game.CoreGui
  10.  
  11. Main.Name = "Main"
  12. Main.Parent = LifeCount
  13. Main.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
  14. Main.BorderSizePixel = 0
  15. Main.Position = UDim2.new(0.936948299, 0, 0.838407457, 0)
  16. Main.Size = UDim2.new(0, 100, 0, 75)
  17.  
  18. Title.Name = "Title"
  19. Title.Parent = Main
  20. Title.BackgroundColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  21. Title.BorderSizePixel = 0
  22. Title.Position = UDim2.new(0, 0, -0.00927408878, 0)
  23. Title.Size = UDim2.new(0, 100, 0, 25)
  24. Title.Font = Enum.Font.SourceSans
  25. Title.Text = "Life Counter"
  26. Title.TextColor3 = Color3.new(0, 0, 0)
  27. Title.TextSize = 14
  28.  
  29. Counter.Name = "Counter"
  30. Counter.Parent = Main
  31. Counter.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  32. Counter.BorderSizePixel = 0
  33. Counter.Position = UDim2.new(0.0799999982, 0, 0.417392582, 0)
  34. Counter.Size = UDim2.new(0, 85, 0, 36)
  35. Counter.Font = Enum.Font.SourceSans
  36. Counter.Text = "0"
  37. Counter.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  38. Counter.TextSize = 14
  39.  
  40. Hide.Name = "Hide"
  41. Hide.Parent = LifeCount
  42. Hide.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
  43. Hide.BorderSizePixel = 0
  44. Hide.Position = UDim2.new(0.937061787, 0, 0.925355136, 0)
  45. Hide.Size = UDim2.new(0, 100, 0, 20)
  46. Hide.Font = Enum.Font.SourceSans
  47. Hide.Text = "Close"
  48. Hide.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
  49. Hide.TextSize = 14
  50. -- Scripts:
  51. Hide.MouseButton1Down:connect(function()
  52. if Main.Visible == false then
  53. Hide.Text = "Close"
  54. Main.Visible = true
  55. elseif Main.Visible == true then
  56. Hide.Text = "Open"
  57. Main.Visible = false
  58. end
  59. end)
  60.  
  61. _G.First = game.Players.LocalPlayer.leaderstats.Life.Value
  62. _G.Second = game.Players.LocalPlayer.leaderstats.Life.Value
  63.  
  64. Game.Players.LocalPlayer.leaderstats.Life.Changed:connect(function(plr)
  65. delay(4, function()
  66. _G.Second = game.Players.LocalPlayer.leaderstats.Life.Value
  67. Counter.Text = _G.Second-_G.First
  68. end)
  69. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement