Advertisement
Guest User

Original

a guest
Jul 20th, 2018
825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. model = script.Parent.Parent--Indicates that the script interacts with the model the button is grouped with.
  2.  
  3.  
  4.  
  5.  
  6. backup = model:clone()
  7. enabled = true
  8.  
  9.  
  10. function regenerate()
  11. model:remove()
  12.  
  13.  
  14. wait(1)--
  15.  
  16.  
  17. model = backup:clone()
  18. model.Parent = game.Workspace
  19. model:makeJoints()
  20.  
  21.  
  22. script.Disabled = true
  23. script.Parent.BrickColor = BrickColor.new(26)--Black
  24. wait(1)--Change this number to change the time in between regenerations via the button, in seconds..
  25. script.Parent.BrickColor = BrickColor.new(104)--Purple
  26. script.Disabled = false
  27. end
  28.  
  29.  
  30. function onHit(hit)
  31. if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
  32. regenerate()
  33. end
  34. end
  35.  
  36.  
  37. script.Parent.Touched:connect(onHit)
  38.  
  39.  
  40. --Remember To read EVERYTHING on this button that includes the top >_> Edit it only for Pros.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement