Advertisement
mr2meows

infinite health door in roblox

Mar 19th, 2023 (edited)
942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.42 KB | None | 0 0
  1. local mdl = Instance.new("Model")
  2. mdl.Name = "Infinite Health Door"
  3. mdl.Parent = workspace
  4. local snd = Instance.new("Sound")
  5. snd.SoundId = "rbxassetid://305633397"
  6. local ihd = Instance.new("Part")
  7. snd.Parent = ihd
  8. ihd.Parent = mdl
  9. ihd.Material = "CorrodedMetal"
  10. ihd.Anchored = true
  11. ihd.Size = Vector3.new(7,9,2)
  12. ihd.Position = Vector3.new(29,4.5,-45)
  13. ihd.Rotation = Vector3.new(0,15,0)
  14. local part1 = Instance.new("Part")
  15. part1.Material = "DiamondPlate"
  16. part1.Parent = mdl
  17. part1.Size = Vector3.new(1,9,2)
  18. part1.Position = Vector3.new(24,4.5,-45)
  19. part1.Anchored = true
  20. local part2 = part1:Clone()
  21. part2.Parent = mdl
  22. part2.Position = Vector3.new(33,4.5,-46)
  23. local hitbox = Instance.new("Part")
  24. hitbox.Parent = mdl
  25. hitbox.Anchored = true
  26. hitbox.CanCollide = false
  27. hitbox.Size = Vector3.new(2,9,2)
  28. hitbox.Position = Vector3.new(25,4.5,-44)
  29. hitbox.Transparency = 1
  30. function touch(part)
  31.     if part.Parent.Humanoid then
  32.         part.Parent.Humanoid:TakeDamage(part.Parent.Humanoid.MaxHealth * 0.05)
  33.         wait()
  34.         part.Parent.Humanoid.MaxHealth = part.Parent.Humanoid.MaxHealth + 1
  35.         part.Parent.Humanoid.Health = part.Parent.Humanoid.MaxHealth
  36.     end
  37. end
  38. hitbox.Touched:Connect(touch)
  39. function amog()
  40.     snd:Destroy()
  41. end
  42. snd.Ended:Connect(amog)
  43. snd:Play()
  44. while wait() do
  45.     ihd.Rotation = Vector3.new(0,14,0)
  46.     hitbox.Size = Vector3.new(0,0,0)
  47.     wait()
  48.     ihd.Rotation = Vector3.new(0,15,0)
  49.     hitbox.Size = Vector3.new(2,9,2)
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement