Advertisement
SmokeDelsin

dtn erhxjyt

May 22nd, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. local box = script.Parent
  2.  
  3.  
  4. local debounce = false
  5.  
  6. local everything = {model}
  7. local names = {model}
  8.  
  9. local children = game.Workspace.Cars:children()
  10. for i=1,#children do
  11. if (children[i].Name == "Humanoid") then
  12. table.insert(everything, children[i]:clone())
  13. table.insert(names, children[i].Name)
  14. end
  15. end
  16.  
  17.  
  18. function regen()
  19. for i=1,#everything do
  20. new_thing = everything[i]:clone()
  21. new_thing.Parent = game.Workspace.Cars
  22. new_thing:makeJoints()
  23. end
  24. end
  25.  
  26. function onTouched(hit)
  27. local humanoid = hit.Parent:findFirstChild("Humanoid") -- OK were done!
  28. if humanoid~=nil and debounce == false then
  29. debounce = true
  30.  
  31. script.Parent.BrickColor = BrickColor.new(21)
  32. game.Workspace.Valuen.Value = game.Workspace.Valuen.Value +1
  33.  
  34. regen()
  35. wait(5)
  36.  
  37.  
  38. script.Parent.BrickColor = BrickColor.new(28)
  39.  
  40.  
  41. debounce = false
  42. end
  43. end
  44.  
  45.  
  46. script.Parent.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement