Hasli4

RBLX. CreateExpScript

Jan 11th, 2026
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local pirate = script.Parent.PirateType
  2.  
  3. local currentHealth = pirate.Health
  4.  
  5. pirate.HealthChanged:Connect(function(health)
  6.  
  7.  
  8.         if health <= 0 then
  9.  
  10.                 local exp = game.Workspace.Data.Player.Value.leaderstats.Exp
  11.  
  12.                 exp.Value += 1
  13.  
  14.                 script.Enabled = false
  15.  
  16.                 wait(2)
  17.  
  18.                 script.Enabled = true
  19.  
  20.                 script.Parent:Destroy()
  21.  
  22.                
  23.  
  24.         end
  25.  
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment