Advertisement
HoangAnh_GaToVi

Two Player Military Tycoon

Aug 14th, 2018
6,241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. --[[
  2. -----------------------------
  3. Controls:
  4.  
  5. f3 to turn on Kill all
  6.  
  7. f4 to stop
  8. -----------------------------
  9. Game:
  10. https://www.roblox.com/games/190749311/8M-Two-Player-Military-Tycoon-v4
  11. -----------------------------
  12. Description:
  13. as long as you have a Glock you will be able to kill all
  14. -----------------------------
  15. Credit:
  16. Original: @Verm brianops16
  17. -----------------------------
  18. --]]
  19.  
  20. function codeB()
  21. local plr = game.Players.LocalPlayer
  22. local plrN = plr.Name
  23. for a,player in pairs(game.Players:GetChildren()) do
  24. if player.Name ~= plrN then
  25. local enemy = game.Workspace:FindFirstChild(player.Name)
  26. local A_1 = game:GetService("Workspace")[enemy.Name].Humanoid
  27. local A_2 = 10
  28. local Event = game:GetService("Players")[plrN].Backpack["Glock 17"].Resource.Events.DamageEvent
  29. Event:FireServer(A_1, A_2)
  30. end
  31. end
  32. end
  33. function codeW()
  34. local plr = game.Players.LocalPlayer
  35. local plrN = plr.Name
  36. for a,player in pairs(game.Players:GetChildren()) do
  37. if player.Name ~= plrN then
  38. local enemy = game.Workspace:FindFirstChild(player.Name)
  39. local A_1 = game:GetService("Workspace")[enemy.Name].Humanoid
  40. local A_2 = 10
  41. local Event = game:GetService("Workspace")[plrN]["Glock 17"].Resource.Events.DamageEvent
  42. Event:FireServer(A_1, A_2)
  43. end
  44. end
  45. end
  46. ----
  47.  
  48. on = 1
  49.  
  50. ----
  51.  
  52. local UIS = game:GetService("UserInputService")
  53. UIS.InputBegan:connect(function(Input)
  54. local KeyCode = Input.KeyCode
  55. if KeyCode == Enum.KeyCode.F3 then
  56. on = 1
  57. wait(.2)
  58. while on == 1 do
  59. game:GetService('RunService').Stepped:wait(0)
  60. local good,bad = pcall(codeB)
  61. if good and on == 1 then
  62. codeB()
  63. else
  64. local good,bad = pcall(codeW)
  65. if good then
  66. codeW()
  67. else
  68. wait()
  69. end
  70. end
  71. end
  72. end
  73. end)
  74. UIS.InputBegan:connect(function(Input)
  75. local KeyCode = Input.KeyCode
  76. if KeyCode == Enum.KeyCode.F4 then
  77. on = 0
  78. end
  79. end)
  80. --Description and controls at the top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement