Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instances:
- local LifeCount = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Counter = Instance.new("TextLabel")
- local Hide = Instance.new("TextButton")
- --Properties:
- LifeCount.Name = "LifeCount"
- LifeCount.Parent = game.CoreGui
- Main.Name = "Main"
- Main.Parent = LifeCount
- Main.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.936948299, 0, 0.838407457, 0)
- Main.Size = UDim2.new(0, 100, 0, 75)
- Title.Name = "Title"
- Title.Parent = Main
- Title.BackgroundColor3 = Color3.new(0.290196, 0.72549, 0.32549)
- Title.BorderSizePixel = 0
- Title.Position = UDim2.new(0, 0, -0.00927408878, 0)
- Title.Size = UDim2.new(0, 100, 0, 25)
- Title.Font = Enum.Font.SourceSans
- Title.Text = "Life Counter"
- Title.TextColor3 = Color3.new(0, 0, 0)
- Title.TextSize = 14
- Counter.Name = "Counter"
- Counter.Parent = Main
- Counter.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
- Counter.BorderSizePixel = 0
- Counter.Position = UDim2.new(0.0799999982, 0, 0.417392582, 0)
- Counter.Size = UDim2.new(0, 85, 0, 36)
- Counter.Font = Enum.Font.SourceSans
- Counter.Text = "0"
- Counter.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
- Counter.TextSize = 14
- Hide.Name = "Hide"
- Hide.Parent = LifeCount
- Hide.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
- Hide.BorderSizePixel = 0
- Hide.Position = UDim2.new(0.937061787, 0, 0.925355136, 0)
- Hide.Size = UDim2.new(0, 100, 0, 20)
- Hide.Font = Enum.Font.SourceSans
- Hide.Text = "Close"
- Hide.TextColor3 = Color3.new(0.290196, 0.72549, 0.32549)
- Hide.TextSize = 14
- -- Scripts:
- Hide.MouseButton1Down:connect(function()
- if Main.Visible == false then
- Hide.Text = "Close"
- Main.Visible = true
- elseif Main.Visible == true then
- Hide.Text = "Open"
- Main.Visible = false
- end
- end)
- _G.First = game.Players.LocalPlayer.leaderstats.Life.Value
- _G.Second = game.Players.LocalPlayer.leaderstats.Life.Value
- Game.Players.LocalPlayer.leaderstats.Life.Changed:connect(function(plr)
- delay(4, function()
- _G.Second = game.Players.LocalPlayer.leaderstats.Life.Value
- Counter.Text = _G.Second-_G.First
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement