Advertisement
Sungmingamerpro13

Add 1+ Extra Life (Script) (Story Game)

Apr 1st, 2025
802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.54 KB | None | 0 0
  1. local Number = 0
  2. local MaxNumber = 1
  3.  
  4. script.Parent.Touched:Connect(function(Hit)
  5.     if Hit.Parent:FindFirstChild("Humanoid") then
  6.         local Character = Hit.Parent
  7.         local player = game.Players:GetPlayerFromCharacter(Character)
  8.  
  9.         if not player:WaitForChild("Lives").Value and player.Lives.Value > Number then
  10.             print(player.Name.."'s Lives: "..player.Lives.Value)
  11.            
  12.             player.Lives.Value += 1
  13.         elseif player:WaitForChild("Lives").Value and player.Lives.Value == MaxNumber then
  14.             print("You Now Have An Extra Life!")
  15.         end
  16.     end
  17. end)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement