Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Lives = Player:WaitForChild("SystemFolder").Lives
- local PlayerGui = Player:WaitForChild("PlayerGui")
- local TextDisplay = script.Parent.TextDisplay
- local Character = Player.Character or Player.CharacterAdded:Wait()
- local Humanoid = Character:WaitForChild("Humanoid")
- local function LivesChangingDisplay()
- TextDisplay.Text = "Lives: "..Lives.Value
- end
- LivesChangingDisplay()
- Lives.Changed:Connect(LivesChangingDisplay)
- Humanoid.Died:Connect(function()
- game.ReplicatedStorage.Events.DiedFired:FireServer()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement