Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. function onKeyPress1(actionName, userInputState, inputObject)
  2. if userInputState == Enum.UserInputState.Begin then
  3. for i,v in pairs(workspace.DungeonTemp.Wave1:GetChildren()) do
  4. v.Humanoid.Health = 0
  5. end
  6. end
  7. end
  8. game.ContextActionService:BindAction("keyPress1", onKeyPress1, false, Enum.KeyCode.R) -- change "R" to whatever you'd like
  9.  
  10. function onKeyPress2(actionName, userInputState, inputObject)
  11. if userInputState == Enum.UserInputState.Begin then
  12. for i,v in pairs(workspace.DungeonTemp.Wave2:GetChildren()) do
  13. v.Humanoid.Health = 0
  14. end
  15. end
  16. end
  17. game.ContextActionService:BindAction("keyPress2", onKeyPress2, false, Enum.KeyCode.R) -- change "R" to whatever you'd like
  18.  
  19. function onKeyPress3(actionName, userInputState, inputObject)
  20. if userInputState == Enum.UserInputState.Begin then
  21. for i,v in pairs(workspace.DungeonTemp.Wave3:GetChildren()) do
  22. v.Humanoid.Health = 0
  23. end
  24. end
  25. end
  26. game.ContextActionService:BindAction("keyPress3", onKeyPress3, false, Enum.KeyCode.R) -- change "R" to whatever you'd like
  27.  
  28. function onKeyPress4(actionName, userInputState, inputObject)
  29. if userInputState == Enum.UserInputState.Begin then
  30. for i,v in pairs(workspace.DungeonTemp.Wave4:GetChildren()) do
  31. v.Humanoid.Health = 0
  32. end
  33. end
  34. end
  35. game.ContextActionService:BindAction("keyPress4", onKeyPress4, false, Enum.KeyCode.R) -- change "R" to whatever you'd like
  36.  
  37. function onKeyPress5(actionName, userInputState, inputObject)
  38. if userInputState == Enum.UserInputState.Begin then
  39. for i,v in pairs(workspace.DungeonTemp.Wave5:GetChildren()) do
  40. v.Humanoid.Health = 0
  41. end
  42. end
  43. end
  44. game.ContextActionService:BindAction("keyPress5", onKeyPress5, false, Enum.KeyCode.R) -- change "R" to whatever you'd like
  45.  
  46. function onKeyPress6(actionName, userInputState, inputObject)
  47. if userInputState == Enum.UserInputState.Begin then
  48. for i,v in pairs(workspace.DungeonTemp.Wave6:GetChildren()) do
  49. v.Humanoid.Health = 0
  50. end
  51. end
  52. end
  53. game.ContextActionService:BindAction("keyPress6", onKeyPress6, false, Enum.KeyCode.R) -- change "R" to whatever you'd like
  54.  
  55. function onKeyPress7(actionName, userInputState, inputObject)
  56. if userInputState == Enum.UserInputState.Begin then
  57. for i,v in pairs(workspace.DungeonTemp.Wave7:GetChildren()) do
  58. v.Humanoid.Health = 0
  59. end
  60. end
  61. end
  62. game.ContextActionService:BindAction("keyPress7", onKeyPress7, false, Enum.KeyCode.R) -- change "R" to whatever you'd like
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement