Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.settings = {
- ["Difficulty"] = "Insane", --You know what this means lawl
- ["AttackName"] = "Soldier", --What uh 'attacker' you want 2 spawn
- ["SpawnPer"] = 2, --This is how long it will wait till it tries 2 spawn another uh 'attacker'
- }
- _G.Upgrade_settings = {
- ["WaitTillUnitNum"] = 5, --This will not upgrade any 'attackers' untill you have this many units on the field
- ["UpgradePer"] = 10 --This is how long it will wait till it tries 2 upgrade your uh 'attackers' (like every single one)
- }
- _G.Fram_settings = {
- ["On"] = false, --On and off button
- ["FarmName"] = "Farm", --If you wanna spawn farms (outside the map)
- ["SpawnPer"] = 20 --This is how long it will wait till it tries 2 spawn another farm
- }
- local diff = _G.settings.Difficulty
- local name = _G.settings.AttackName
- local perSec = _G.settings.SpawnPer
- local perSec2 = _G.Upgrade_settings.UpgradePer
- local untiNum = _G.Upgrade_settings.WaitTillUnitNum
- local farm = _G.Fram_settings.FarmName
- local farmspawnper = _G.Fram_settings.SpawnPer
- local on = _G.Fram_settings.On
- if game.PlaceId == 3260590327 then
- repeat wait() until game:GetService("Workspace"):FindFirstChild("Elevators")
- for i,v in pairs(game:GetService("Workspace"):FindFirstChild("Elevators").Survival:GetChildren()) do
- if v:IsA("Model") then
- repeat wait() until game:GetService("ReplicatedStorage"):FindFirstChild("RemoteFunction")
- game:GetService("ReplicatedStorage"):FindFirstChild("RemoteFunction"):InvokeServer("Elevators", "Enter", {["Model"] = v})
- end
- end
- end
- if game.PlaceId ~= 3260590327 then
- repeat wait() until game:GetService("ReplicatedStorage"):FindFirstChild("RemoteEvent")
- game:GetService("ReplicatedStorage").RemoteEvent:FireServer("Difficulty", "Vote", diff)
- end
- local spamSkip = coroutine.wrap(function()
- while wait() do
- game:GetService("ReplicatedStorage").RemoteEvent:FireServer("Vote", "Skip")
- end
- end)
- local attack = coroutine.wrap(function()
- while wait(perSec) do
- local meth = math.random(1,5)
- for i,v in pairs(game.workspace:FindFirstChild("Enemies"):GetChildren()) do
- if v:FindFirstChild("HumanoidRootPart") then
- repeat wait() until game:GetService("ReplicatedStorage"):FindFirstChild("RemoteFunction")
- game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer("Towers", "Place", {["Rotation"] = CFrame.new(), ["Name"] = name, ["Position"] = v.HumanoidRootPart.Position + Vector3.new(meth,0,meth)})
- end
- end
- end
- end)
- local test = coroutine.wrap(function()
- while wait(0.5) do
- unit = 0
- for i,v in pairs(game:GetService("Workspace").Towers:GetChildren()) do
- if v:FindFirstChild("Owner") then
- if v.Owner.Value == game.Players.LocalPlayer then
- unit = unit+1
- end
- end
- end
- end
- end)
- local upgrade = coroutine.wrap(function()
- while wait(perSec2) do
- for i,v in pairs(game:GetService("Workspace").Towers:GetChildren()) do
- if v:FindFirstChild("Owner") then
- if v.Owner.Value == game.Players.LocalPlayer then
- if unit >= untiNum then
- game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer("Towers", "Upgrade", "Set", {["Tower"] = v.Owner.Parent})
- end
- end
- end
- end
- end
- end)
- local farms = coroutine.wrap(function()
- while wait(farmspawnper) do
- if on then
- local methv2 = math.random(1,50)
- game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer("Towers", "Place", {["Rotation"] = CFrame.new(), ["Name"] = farm, ["Position"] = Vector3.new(methv2,methv2,methv2)})
- end
- end
- end)
- spamSkip()
- attack()
- upgrade()
- test()
- farms()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement