Advertisement
BjeffeHund

Tower shit

Feb 1st, 2020
3,485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. _G.settings = {
  2. ["Difficulty"] = "Insane", --You know what this means lawl
  3. ["AttackName"] = "Soldier", --What uh 'attacker' you want 2 spawn
  4. ["SpawnPer"] = 2, --This is how long it will wait till it tries 2 spawn another uh 'attacker'
  5. }
  6.  
  7. _G.Upgrade_settings = {
  8. ["WaitTillUnitNum"] = 5, --This will not upgrade any 'attackers' untill you have this many units on the field
  9. ["UpgradePer"] = 10 --This is how long it will wait till it tries 2 upgrade your uh 'attackers' (like every single one)
  10. }
  11.  
  12. _G.Fram_settings = {
  13. ["On"] = true, --On and off button
  14. ["FarmName"] = "Farm", --If you wanna spawn farms (outside the map)
  15. ["SpawnPer"] = 20 --This is how long it will wait till it tries 2 spawn another farm
  16. }
  17.  
  18. local shit = {}
  19. local diff = _G.settings.Difficulty
  20. local name = _G.settings.AttackName
  21. local perSec = _G.settings.SpawnPer
  22. local perSec2 = _G.Upgrade_settings.UpgradePer
  23. local untiNum = _G.Upgrade_settings.WaitTillUnitNum
  24. local farm = _G.Fram_settings.FarmName
  25. local farmspawnper = _G.Fram_settings.SpawnPer
  26. local on = _G.Fram_settings.On
  27. if game.PlaceId == 3260590327 then
  28. repeat wait() until game:GetService("Workspace"):FindFirstChild("Elevators")
  29. wait(3)
  30. for i,v in pairs(game:GetService("Workspace"):FindFirstChild("Elevators").Survival:GetChildren()) do
  31. if v:IsA("Model") then
  32. table.insert(shit, v)
  33. end
  34. end
  35. repeat wait() until game:GetService("ReplicatedStorage"):FindFirstChild("RemoteFunction")
  36. game:GetService("ReplicatedStorage"):FindFirstChild("RemoteFunction"):InvokeServer("Elevators", "Enter", {["Model"] = shit[math.random(1,#shit)]})
  37. print(shit[math.random(1,#shit)])
  38. end
  39. if game.PlaceId ~= 3260590327 then
  40. repeat wait() until game:GetService("ReplicatedStorage"):FindFirstChild("RemoteEvent")
  41. game:GetService("ReplicatedStorage").RemoteEvent:FireServer("Difficulty", "Vote", diff)
  42. local spamSkip = coroutine.wrap(function()
  43. while wait() do
  44. game:GetService("ReplicatedStorage").RemoteEvent:FireServer("Vote", "Skip")
  45. end
  46. end)
  47. local attack = coroutine.wrap(function()
  48. while wait(perSec) do
  49. local meth = math.random(1,5)
  50. for i,v in pairs(game.workspace:FindFirstChild("Enemies"):GetChildren()) do
  51. if v:FindFirstChild("HumanoidRootPart") then
  52. repeat wait() until game:GetService("ReplicatedStorage"):FindFirstChild("RemoteFunction")
  53. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer("Towers", "Place", {["Rotation"] = CFrame.new(), ["Name"] = name, ["Position"] = v.HumanoidRootPart.Position + Vector3.new(meth,0,meth)})
  54. end
  55. end
  56. end
  57. end)
  58. local test = coroutine.wrap(function()
  59. while wait(0.5) do
  60. unit = 0
  61. for i,v in pairs(game:GetService("Workspace").Towers:GetChildren()) do
  62. if v:FindFirstChild("Owner") then
  63. if v.Owner.Value == game.Players.LocalPlayer then
  64. unit = unit+1
  65. end
  66. end
  67. end
  68. end
  69. end)
  70. local upgrade = coroutine.wrap(function()
  71. while wait(perSec2) do
  72. for i,v in pairs(game:GetService("Workspace").Towers:GetChildren()) do
  73. if v:FindFirstChild("Owner") then
  74. if v.Owner.Value == game.Players.LocalPlayer then
  75. if unit >= untiNum then
  76. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer("Towers", "Upgrade", "Set", {["Tower"] = v.Owner.Parent})
  77. end
  78. end
  79. end
  80. end
  81. end
  82. end)
  83. local farms = coroutine.wrap(function()
  84. while wait(farmspawnper) do
  85. if on then
  86. local methv2 = math.random(1,50)
  87. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer("Towers", "Place", {["Rotation"] = CFrame.new(), ["Name"] = farm, ["Position"] = Vector3.new(methv2,methv2,methv2)})
  88. end
  89. end
  90. end)
  91. spamSkip()
  92. attack()
  93. upgrade()
  94. test()
  95. farms()
  96. end
  97. game:GetService("Players").LocalPlayer.Idled:connect(function()
  98. game:GetService("VirtualUser"):Button2Down(Vector2.new())
  99. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement