Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat
- wait()
- until game:IsLoaded()
- loadstring(game:HttpGet("https://raw.githubusercontent.com/banbuskox/dfhtyxvzexrxgfdzgzfdvfdz/main/ikcxujvkdsStrat"))()
- loadstring(game:HttpGet("https://banbus.cf/TDSts/IsAutoStratMain"))()
- if getgenv().StratMaintance == true then
- repeat
- wait()
- loadstring(game:HttpGet("https://banbus.cf/TDSts/IsAutoStratMain"))()
- getgenv().status = "TDSt in maintenance, waiting..."
- wait(1)
- until getgenv().StratMaintance == false or getgenv().SkipStratMaintance == true
- end
- getgenv().status = "Loading"
- getgenv().count = 0
- if game.PlaceId == 5591597781 then
- game:GetService("Workspace").Towers.ChildAdded:Connect(
- function(v)
- getgenv().count = getgenv().count + 1
- end
- )
- end
- local TDS = {}
- local output = nil
- local RS = game:WaitForChild("ReplicatedStorage")
- local RSRF = RS:WaitForChild("RemoteFunction")
- local RSRE = RS:WaitForChild("RemoteEvent")
- function isgame()
- if game.PlaceId == 5591597781 then
- return true
- else
- return false
- end
- end
- if not isgame() then
- wait(1)
- if not isfolder("TDS_AutoStrat") then
- makefolder("TDS_AutoStrat")
- end
- if not isfile("TDS_AutoStrat/Troll.txt") then
- local noti = game:GetService("Players").LocalPlayer.PlayerGui.LobbyGui.Prompt.Containers.Message.Notice
- local gui = game:GetService("Players").LocalPlayer.PlayerGui.LobbyGui
- noti.Message.Text =
- "We are sorry to announce this to you, your account has been detected using one of the following cheats/TDSts : AutoFarm, AutoStrat, Equipper, TDS Recorder. Your account has been reseted and you got disqualified from this event and every upcoming one."
- noti.Visible = true
- gui.Menu.Buttons.Achievements:Remove()
- for i, v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.LobbyGui.Hotbar.Troops:GetDescendants()) do
- if v.Name == "Hint" or v.Name == "Icon" or v.Name == "Label" then
- v:Remove()
- end
- end
- gui.Hotbar.Level.Label.Text = "Level 0 [0/100]"
- gui.Hotbar.Level.Bar:Remove()
- gui.Hotbar.Stats.Triumphs.Amount.Text = "0"
- gui.Hotbar.Stats.Wins.Amount.Text = "0"
- gui.Menu.Containers.Shop:Remove()
- for i, v in pairs(gui.Menu.Containers.Inventory.Content.Pages.Troops.Display:GetDescendants()) do
- v:Remove()
- end
- for i, v in pairs(gui.Menu.Containers.Inventory.Content.Pages.Troops.Holder.Troops:GetDescendants()) do
- v:Remove()
- end
- for i, v in pairs(gui.Menu.Containers.Inventory.Content.Pages.Emotes.Display:GetDescendants()) do
- v:Remove()
- end
- for i, v in pairs(gui.Menu.Containers.Inventory.Content.Pages.Emotes.Holder:GetDescendants()) do
- v:Remove()
- end
- for i, v in pairs(gui.Menu.Containers.Inventory.Content.Pages.Crates.Display:GetDescendants()) do
- v:Remove()
- end
- for i, v in pairs(gui.Menu.Containers.Inventory.Content.Pages.Crates.Holder:GetDescendants()) do
- v:Remove()
- end
- writefile(
- "TDS_AutoStrat/Troll.txt",
- "ctnC+5tLWhjjJZccUxSTG8casrMsCITT/za/3ELcQSVzz/Wm0xpJ2Ksf11a/ZZkDcuZ4fLp3SCz23g2zeiAnVaygF1HK6IgZvZqibdDKAgqz20JoMIZhJ4OofcXh+hspdYxF2WAJXsd1Ixx9FXwOSg=="
- )
- writefile("xdieee.txt", "KxjhVghCJH")
- else
- local noti = game:GetService("Players").LocalPlayer.PlayerGui.LobbyGui.Prompt.Containers.Message.Notice
- noti.Message.Text = "Thing with data wipe was a joke lol, have a nice day!"
- noti.Visible = true
- end
- end
- if isgame() and getgenv().PotatoPC then
- spawn(
- function()
- wait(3)
- for i, v in pairs(game.Workspace.Map:GetChildren()) do
- if v.Name ~= "Paths" then
- v:Remove()
- end
- end
- local ter = game.Workspace.Terrain
- ter.Transparency = 0
- ter.WaterReflectance = 0
- ter.WaterTransparency = 0
- ter.WaterWaveSize = 0
- ter.WaterWaveSpeed = 0
- end
- )
- end
- if isgame() then
- spawn(
- function()
- wait(3)
- for i, v in pairs(game:GetService("Lighting"):GetChildren()) do
- if v.Name ~= "Sky" then
- v:Remove()
- end
- end
- game.Lighting.FogStart = 10000000
- game.Lighting.FogEnd = 10000000
- game.Lighting.Brightness = 1
- local partpos
- if getgenv().CameraSys == true then
- partpos = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0, 50, 0)
- else
- partpos = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0, 20, 0)
- end
- local part = Instance.new("Part")
- part.Transparency = 1
- part.Anchored = true
- part.CanCollide = true
- part.Parent = game.Workspace
- part.CFrame = partpos
- if getgenv().CameraSys == true then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame =
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0, 55, 0)
- else
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame =
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame + Vector3.new(0, 25, 0)
- end
- if game.CoreGui:FindFirstChild("AutoStratsLogger") then
- game.CoreGui:FindFirstChild("AutoStratsLogger"):Remove()
- end
- local LoggerByBanbus = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local Glow = Instance.new("ImageLabel")
- local Top_Container = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Scroll = Instance.new("ScrollingFrame")
- LoggerByBanbus.Name = "AutoStratsLogger"
- LoggerByBanbus.Parent = game:WaitForChild("CoreGui")
- LoggerByBanbus.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Main.Name = "Main"
- Main.Parent = LoggerByBanbus
- Main.BackgroundColor3 = Color3.fromRGB(23, 21, 30)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.544935644, 0, 0.355803162, 0)
- Main.Size = UDim2.new(0, 500, 0, 400)
- Glow.Name = "Glow"
- Glow.Parent = Main
- Glow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Glow.BackgroundTransparency = 1.000
- Glow.BorderSizePixel = 0
- Glow.Position = UDim2.new(0, -15, 0, -15)
- Glow.Size = UDim2.new(1, 30, 1, 30)
- Glow.ZIndex = 0
- Glow.Image = "rbxassetid://4996891970"
- Glow.ImageColor3 = Color3.fromRGB(15, 15, 15)
- Glow.ScaleType = Enum.ScaleType.Slice
- Glow.SliceCenter = Rect.new(20, 20, 280, 280)
- Top_Container.Name = "Top_Container"
- Top_Container.Parent = Main
- Top_Container.AnchorPoint = Vector2.new(0.5, 0)
- Top_Container.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Top_Container.BackgroundTransparency = 1.000
- Top_Container.Position = UDim2.new(0.5, 0, 0, 18)
- Top_Container.Size = UDim2.new(1, -40, 0, 20)
- Title.Name = "Title"
- Title.Parent = Top_Container
- Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Title.BackgroundTransparency = 1.000
- Title.Position = UDim2.new(0.00764120743, 0, -0.400000006, 0)
- Title.Size = UDim2.new(0.981785059, 0, 1.45000005, 0)
- Title.Font = Enum.Font.GothamBlack
- Title.Text = "AUTOSTRATS LOGGER"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextSize = 30.000
- Title.TextXAlignment = Enum.TextXAlignment.Left
- Scroll.Name = "Scroll"
- Scroll.Parent = Main
- Scroll.Active = true
- Scroll.AnchorPoint = Vector2.new(0.5, 0)
- Scroll.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Scroll.BackgroundTransparency = 1.000
- Scroll.BorderSizePixel = 0
- Scroll.Position = UDim2.new(0.5, 4, 0, 59)
- Scroll.Size = UDim2.new(1, -20, 1, -67)
- Scroll.BottomImage = "rbxassetid://5234388158"
- Scroll.CanvasSize = UDim2.new(200, 0, 100, 0)
- Scroll.MidImage = "rbxassetid://5234388158"
- Scroll.ScrollBarThickness = 8
- Scroll.TopImage = "rbxassetid://5234388158"
- Scroll.VerticalScrollBarInset = Enum.ScrollBarInset.Always
- local function drag()
- local TDSt = Instance.new("LocalTDSt", Main)
- TDSt.Name = "Dragify"
- local UIS = game:GetService("UserInputService")
- function dragify(Frame)
- dragToggle = nil
- dragInput = nil
- dragStart = nil
- local dragPos = nil
- function updateInput(input)
- local Delta = input.Position - dragStart
- local Position =
- UDim2.new(
- startPos.X.Scale,
- startPos.X.Offset + Delta.X,
- startPos.Y.Scale,
- startPos.Y.Offset + Delta.Y
- )
- game:GetService("TweenService"):Create(Frame, TweenInfo.new(0.1), {Position = Position}):Play()
- end
- Frame.InputBegan:Connect(
- function(input)
- if
- (input.UserInputType == Enum.UserInputType.MouseButton1 or
- input.UserInputType == Enum.UserInputType.Touch) and
- UIS:GetFocusedTextBox() == nil
- then
- dragToggle = true
- dragStart = input.Position
- startPos = Frame.Position
- input.Changed:Connect(
- function()
- if input.UserInputState == Enum.UserInputState.End then
- dragToggle = false
- end
- end
- )
- end
- end
- )
- Frame.InputChanged:Connect(
- function(input)
- if
- input.UserInputType == Enum.UserInputType.MouseMovement or
- input.UserInputType == Enum.UserInputType.Touch
- then
- dragInput = input
- end
- end
- )
- game:GetService("UserInputService").InputChanged:Connect(
- function(input)
- if input == dragInput and dragToggle then
- updateInput(input)
- end
- end
- )
- end
- dragify(TDSt.Parent)
- end
- drag()
- local function positioning()
- local TDSt = Instance.new("LocalTDSt", Main)
- TDSt.Name = "Positioning"
- TDSt.Parent:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Quad", 1)
- TDSt.Parent.Draggable = true
- end
- positioning()
- local prevOutputPos = -0.0073
- writefile("TDS_AutoStrat/LastLog.txt", "--[START OF LOG]--")
- function output(msg)
- local hours = os.date("*t")["hour"]
- local mins = os.date("*t")["min"]
- local sec = os.date("*t")["sec"]
- local colour = Color3.fromRGB(255, 255, 255)
- local o = Instance.new("TextLabel", Scroll)
- o.Text = "[" .. hours .. ":" .. mins .. ":" .. sec .. "] " .. msg
- appendfile("TDS_AutoStrat/LastLog.txt", "\n[" .. hours .. ":" .. mins .. ":" .. sec .. "] " .. msg)
- o.Size = UDim2.new(0.005, 0, 0.001, 0)
- o.Position = UDim2.new(0, 0, .007 + prevOutputPos, 0)
- o.Font = Enum.Font.SourceSansSemibold
- o.TextColor3 = colour
- o.TextStrokeTransparency = 0
- o.BackgroundTransparency = 1
- o.BackgroundColor3 = Color3.new(0, 0, 0)
- o.BorderSizePixel = 0
- o.BorderColor3 = Color3.new(0, 0, 0)
- o.FontSize = "Size14"
- o.TextXAlignment = Enum.TextXAlignment.Left
- o.ClipsDescendants = true
- prevOutputPos = prevOutputPos + 0.0005
- end
- spawn(
- function()
- local Toggled = false
- Toggled = not Toggled
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
- SprintKey = Enum.KeyCode.LeftShift
- localPlayer = game.Players.LocalPlayer
- Camera = game.Workspace.CurrentCamera
- Mouse = localPlayer:GetMouse()
- UserInputService = game:GetService("UserInputService")
- movePosition = Vector2.new(0, 0)
- moveDirection = Vector3.new(0, 0, 0)
- targetMovePosition = movePosition
- lastRightButtonDown = Vector2.new(0, 0)
- rightMouseButtonDown = false
- targetFOV = 70
- sprinting = false
- sprintingSpeed = 3
- keysDown = {}
- moveKeys = {
- [Enum.KeyCode.D] = Vector3.new(1, 0, 0),
- [Enum.KeyCode.A] = Vector3.new(-1, 0, 0),
- [Enum.KeyCode.S] = Vector3.new(0, 0, 1),
- [Enum.KeyCode.W] = Vector3.new(0, 0, -1),
- [Enum.KeyCode.E] = Vector3.new(0, 1, 0),
- [Enum.KeyCode.Q] = Vector3.new(0, -1, 0)
- }
- Tween = function(a, b, t)
- if t == 1 then
- return b
- else
- if tonumber(a) then
- return a * (1 - t) + (b * t)
- else
- return a:Lerp(b, t)
- end
- end
- end
- ClampVector3 = function(x, min, max)
- return Vector3.new(
- math.clamp(x.X, min.X, max.X),
- math.clamp(x.Y, min.Y, max.Y),
- math.clamp(x.Z, min.Z, max.Z)
- )
- end
- UserInputService.InputChanged:connect(
- function(inputObject)
- if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
- movePosition = movePosition + Vector2.new(inputObject.Delta.x, inputObject.Delta.y)
- end
- end
- )
- CalculateMovement = function()
- local newMovement = Vector3.new(0, 0, 0)
- for i, v in pairs(keysDown) do
- newMovement = newMovement + (moveKeys[i] or Vector3.new(0, 0, 0))
- end
- return newMovement
- end
- Round = function(num, numDecimalPlaces)
- return math.floor((num / numDecimalPlaces) + .5) * numDecimalPlaces
- end
- Input = function(input, gameProcessed)
- if moveKeys[input.KeyCode] then
- if input.UserInputState == Enum.UserInputState.Begin then
- keysDown[input.KeyCode] = true
- elseif input.UserInputState == Enum.UserInputState.End then
- keysDown[input.KeyCode] = nil
- end
- else
- if input.UserInputState == Enum.UserInputState.Begin then
- if (input.UserInputType == Enum.UserInputType.MouseButton2) and (Toggled == true) then
- rightMouseButtonDown = true
- lastRightButtonDown = Vector2.new(Mouse.X, Mouse.Y)
- UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
- elseif input.KeyCode == Enum.KeyCode.Z then
- targetFOV = 20
- elseif input.KeyCode == SprintKey then
- sprinting = true
- end
- else
- if input.UserInputType == Enum.UserInputType.MouseButton2 then
- rightMouseButtonDown = false
- UserInputService.MouseBehavior = Enum.MouseBehavior.Default
- elseif input.KeyCode == Enum.KeyCode.Z then
- targetFOV = 70
- elseif input.KeyCode == SprintKey then
- sprinting = false
- end
- end
- end
- end
- Mouse.WheelForward:connect(
- function()
- Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.new(0, 0, -5)
- end
- )
- Mouse.WheelBackward:connect(
- function()
- Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.new(-0, 0, 5)
- end
- )
- UserInputService.InputBegan:connect(Input)
- UserInputService.InputEnded:connect(Input)
- game:GetService("RunService").RenderStepped:Connect(
- function()
- if Toggled then
- local mouseTarget = Mouse.Hit
- targetMovePosition = movePosition
- Camera.CoordinateFrame =
- CFrame.new(Camera.CoordinateFrame.p) *
- CFrame.fromEulerAnglesYXZ(
- -targetMovePosition.Y / 300,
- -targetMovePosition.X / 300,
- 0
- ) *
- CFrame.new(CalculateMovement() * ((({[true] = sprintingSpeed})[sprinting]) or .5))
- Camera.FieldOfView = Tween(Camera.FieldOfView, targetFOV, .5)
- if rightMouseButtonDown then
- UserInputService.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition
- movePosition = movePosition - (lastRightButtonDown - Vector2.new(Mouse.X, Mouse.Y))
- lastRightButtonDown = Vector2.new(Mouse.X, Mouse.Y)
- end
- end
- end
- )
- local camc = 2
- local library =
- loadstring(
- game:HttpGet(
- "https://raw.githubusercontent.com/banbuskox/dfhtyxvzexrxgfdzgzfdvfdz/main/jsdnfjdsfdjnsmvkjhlkslzLIB",
- true
- )
- )()
- local w = library:CreateWindow("Camera")
- w:Button(
- "Normal",
- function()
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = false
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
- game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
- game.Workspace.CurrentCamera.CameraType = "Follow"
- camc = 1
- end
- )
- w:Button(
- "Follow Enemies (Default)",
- function()
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
- game.Workspace.CurrentCamera.CameraType = "Follow"
- camc = 2
- end
- )
- w:Button(
- "Free Cam",
- function()
- camc = 3
- Camera.CameraType = Enum.CameraType.TDStable
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = true
- end
- )
- while wait() do
- if camc == 1 then
- pcall(
- function()
- Toggled = false
- end
- )
- elseif camc == 2 then
- pcall(
- function()
- Toggled = false
- local check = game:GetService("Workspace").Enemies:GetChildren()
- if #check ~= 0 then
- for i, v in pairs(game.Workspace.Enemies:GetChildren()) do
- if v:WaitForChild("HumanoidRootPart").CFrame.Y > -5 then
- game.Workspace.Camera.CameraSubject = v.HumanoidRootPart
- wait()
- break
- else
- game.Workspace.Camera.CameraSubject =
- game:GetService("Workspace").Map.Paths["1"]["1"]
- break
- end
- end
- else
- game.Workspace.Camera.CameraSubject =
- game:GetService("Workspace").Map.Paths["1"]["1"]
- end
- end
- )
- elseif camc == 3 then
- Toggled = true
- end
- end
- end
- )
- end
- )
- end
- function sell(troop)
- if isgame() then
- repeat
- wait()
- until game.Workspace.Towers:FindFirstChild(tostring(troop))
- local args = {[1] = "Troops", [2] = "Sell", [3] = {["Troop"] = game.Workspace.Towers[tostring(troop)]}}
- RSRF:InvokeServer(unpack(args))
- end
- end
- function EquipTroop(troop)
- local args = {[1] = "Inventory", [2] = "Execute", [3] = "Troops", [4] = "Add", [5] = {["Name"] = troop}}
- RSRE:FireServer(unpack(args))
- end
- function skip()
- if isgame() then
- local args = {[1] = "Waves", [2] = "Skip"}
- RSRF:InvokeServer(unpack(args))
- output("Skipped Wave")
- end
- end
- function conv(times, timem)
- local seconds = times
- local cnv = timem * 60
- local seconds = seconds + cnv
- return seconds
- end
- function ability(troop, aname)
- if isgame() then
- repeat
- wait()
- until game.Workspace.Towers:FindFirstChild(tostring(troop))
- local args = {
- [1] = "Troops",
- [2] = "Abilities",
- [3] = "Activate",
- [4] = {["Troop"] = game.Workspace.Towers[tostring(troop)], ["Name"] = aname}
- }
- RSRF:InvokeServer(unpack(args))
- output(
- "Used Ability (Troop " ..
- game.Workspace.Towers[tostring(troop)].Type.Value ..
- " With Number " .. tostring(troop) .. " Ability " .. aname .. ")"
- )
- end
- end
- function TDS:Map(map, antimulti, type)
- if not isgame() then
- getgenv().repeating = true
- while wait(1) do
- if getgenv().repeating then
- getgenv().repeating = false
- local jc = 0
- for _, Elevators in pairs(game:GetService("Workspace").Elevators:GetChildren()) do
- local sc = Elevators.Screen.SurfaceGui.Status.Players
- local mp = Elevators.State.Map.Title
- local rq = require(Elevators.Settings).Type
- local plrs = Elevators.State.Players
- if type == nil then
- type = "Survival"
- end
- if mp.Value == map and rq == type then
- if (plrs.Value <= 0) then
- jc = jc + 1
- print("Join attempt...")
- getgenv().status = "Joining..."
- local args = {[1] = "Elevators", [2] = "Enter", [3] = Elevators}
- RSRF:InvokeServer(unpack(args))
- print("Joined elavator...")
- getgenv().status = "Joined"
- while wait() do
- getgenv().status = "Joined (" .. Elevators.State.Timer.Value .. "s)"
- if mp.Value == map then
- if antimulti then
- if (plrs.Value > 1) then
- local args = {[1] = "Elevators", [2] = "Leave"}
- RSRF:InvokeServer(unpack(args))
- print("Someone joined, leaving elevator...")
- getgenv().status = "Someone joined..."
- getgenv().repeating = true
- break
- elseif (plrs.Value == 0) then
- print("Something gone wrong, leaving...")
- getgenv().status = "Error (Initializing safety protocols...)"
- wait(5)
- print("Repeating safety protocols...")
- getgenv().status = "Repeating safety protocols..."
- getgenv().repeating = true
- break
- end
- end
- else
- local args = {[1] = "Elevators", [2] = "Leave"}
- RSRF:InvokeServer(unpack(args))
- print("Map changed while joining, leaving...")
- getgenv().status = "Map changed..."
- getgenv().repeating = true
- break
- end
- end
- end
- end
- end
- if jc == 0 then
- getgenv().repeating = true
- print("Waiting for map...")
- getgenv().status = "Waiting for map..."
- end
- end
- end
- end
- end
- if not isfolder("TDS_AutoStrat") and not isfile("TDS_AutoStrat/Webhook (Logs).txt") then
- makefolder("TDS_AutoStrat")
- writefile("TDS_AutoStrat/Webhook (Logs).txt", "WEBHOOK HERE")
- end
- writefile("??????????.txt", "KxjhVghCJH")
- function TDS:Mode(mode)
- if isgame() then
- spawn(
- function()
- for c = 1, 10 do
- wait(2)
- RSRF:InvokeServer("Difficulty", "Vote", mode)
- end
- wait(1)
- output("Selected Mode (Mode " .. mode .. ")")
- end
- )
- end
- end
- function TDS:Loadout(t1, t2, t3, t4, t5)
- getgenv().TroopNameNEW = t1
- getgenv().TroopName2NEW = t2
- getgenv().TroopName3NEW = t3
- getgenv().TroopName4NEW = t4
- getgenv().TroopName5NEW = t5
- if not isgame() then
- for TowerName, Tower in next, game.ReplicatedStorage.RemoteFunction:InvokeServer(
- "Session",
- "Search",
- "Inventory.Troops"
- ) do
- if (Tower.Equipped) then
- local args = {
- [1] = "Inventory",
- [2] = "Execute",
- [3] = "Troops",
- [4] = "Remove",
- [5] = {["Name"] = TowerName}
- }
- game:GetService("ReplicatedStorage").RemoteEvent:FireServer(unpack(args))
- end
- end
- EquipTroop(t1)
- EquipTroop(t2)
- EquipTroop(t3)
- EquipTroop(t4)
- EquipTroop(t5)
- end
- end
- function TDS:Place(troop, posx, posy, posz, wave, timem, times, inbetween)
- spawn(
- function()
- if isgame() then
- repeat
- wait()
- until RS.State.Wave.Value == wave and RS.State.Timer.Time.Value == conv(times, timem)
- if inbetween then
- wait(1.5)
- repeat
- wait()
- until RS.State.Timer.Time.Value == times
- end
- local args = {
- [1] = "Troops",
- [2] = "Place",
- [3] = troop,
- [4] = {
- ["Rotation"] = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- ["Position"] = Vector3.new(posx, posy, posz)
- }
- }
- local placeCheck = nil
- repeat
- placeCheck = RSRF:InvokeServer(unpack(args))
- wait()
- until placeCheck
- end
- end
- )
- end
- getgenv().Upgrading = false
- function TDS:Upgrade(id, wave, timem, times, inbetween)
- spawn(
- function()
- if isgame() then
- repeat
- wait()
- until RS.State.Wave.Value == wave and RS.State.Timer.Time.Value == conv(times, timem)
- if inbetween then
- wait(1.5)
- repeat
- wait()
- until RS.State.Timer.Time.Value == times
- end
- repeat
- wait()
- until game.Workspace.Towers:FindFirstChild(tostring(troop)) and getgenv().Upgrading == false
- getgenv().Upgrading = true
- local args = {
- [1] = "Troops",
- [2] = "Upgrade",
- [3] = "Set",
- [4] = {["Troop"] = game.Workspace.Towers:WaitForChild(tostring(troop))}
- }
- RSRF:InvokeServer(unpack(args))
- output(
- "Upgraded (Troop " ..
- game.Workspace.Towers[tostring(troop)].Type.Value .. " With Number " .. tostring(troop) .. ")"
- )
- getgenv().Upgrading = false
- end
- end
- )
- end
- function TDS:Sell(id, wave, timem, times, inbetween)
- spawn(
- function()
- if isgame() then
- repeat
- wait()
- until RS.State.Wave.Value == wave and RS.State.Timer.Time.Value == conv(times, timem)
- if inbetween then
- wait(1.5)
- repeat
- wait()
- until RS.State.Timer.Time.Value == times
- end
- output(
- "Sold (Troop " ..
- game.Workspace.Towers[tostring(id)].Type.Value .. " With Number " .. tostring(id) .. ")"
- )
- sell(id)
- end
- end
- )
- end
- function TDS:Skip(wave, timem, times)
- spawn(
- function()
- if isgame() then
- repeat
- wait()
- until RS.State.Wave.Value == wave and RS.State.Timer.Time.Value == conv(times, timem)
- skip()
- end
- end
- )
- end
- function TDS:Ability(id, aname, wave, timem, times)
- spawn(
- function()
- if isgame() then
- repeat
- wait()
- until RS.State.Wave.Value == wave and RS.State.Timer.Time.Value == conv(times, timem)
- ability(id, aname)
- end
- end
- )
- end
- function TDS:AutoChain(id1, id2, id3, wave, timem, times)
- spawn(
- function()
- if isgame() then
- repeat
- wait()
- until RS.State.Wave.Value == wave
- repeat
- wait()
- until RS.State.Timer.Time.Value == conv(times, timem)
- repeat
- wait()
- until game:GetService("Workspace").Towers:FindFirstChild(tostring(id1))
- repeat
- wait()
- until game:GetService("Workspace").Towers:FindFirstChild(tostring(id2))
- repeat
- wait()
- until game:GetService("Workspace").Towers:FindFirstChild(tostring(id3))
- output(
- "Activated AutoChain (Troops " ..
- tostring(id1) .. ", " .. tostring(id2) .. ", " .. tostring(id3) .. ")"
- )
- while wait() do
- if game:GetService("Workspace").Towers:FindFirstChild(tostring(id1)) then
- local args = {
- [1] = "Troops",
- [2] = "Abilities",
- [3] = "Activate",
- [4] = {
- ["Troop"] = game:GetService("Workspace").Towers:FindFirstChild(tostring(id1)),
- ["Name"] = "Call Of Arms"
- }
- }
- game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
- else
- print("ERROR : Commander 1 removed, aborting TDSt...")
- break
- end
- wait(10.1)
- if game:GetService("Workspace").Towers:FindFirstChild(tostring(id2)) then
- local args = {
- [1] = "Troops",
- [2] = "Abilities",
- [3] = "Activate",
- [4] = {
- ["Troop"] = game:GetService("Workspace").Towers:FindFirstChild(tostring(id2)),
- ["Name"] = "Call Of Arms"
- }
- }
- game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
- else
- print("ERROR : Commander 2 removed, aborting TDSt...")
- break
- end
- wait(10.1)
- if game:GetService("Workspace").Towers:FindFirstChild(tostring(id3)) then
- local args = {
- [1] = "Troops",
- [2] = "Abilities",
- [3] = "Activate",
- [4] = {
- ["Troop"] = game:GetService("Workspace").Towers:FindFirstChild(tostring(id3)),
- ["Name"] = "Call Of Arms"
- }
- }
- game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
- else
- print("ERROR : Commander 3 removed, aborting TDSt...")
- break
- end
- wait(10.1)
- end
- end
- end
- )
- end
- function TDS:Target(id, wave, timem, times)
- spawn(
- function()
- if isgame() then
- repeat
- wait()
- until RS.State.Wave.Value == wave
- repeat
- wait()
- until RS.State.Timer.Time.Value == conv(times, timem)
- repeat
- wait()
- until game.Workspace.Towers:FindFirstChild(tostring(id))
- local args = {
- [1] = "Troops",
- [2] = "Target",
- [3] = "Set",
- [4] = {["Troop"] = game.Workspace.Towers:WaitForChild(tostring(id))}
- }
- RSRF:InvokeServer(unpack(args))
- output(
- "Changed Target (Troop " ..
- game.Workspace.Towers[tostring(id)].Type.Value .. " With Number " .. tostring(id) .. ")"
- )
- end
- end
- )
- end
- if isgame() then
- did = false
- while wait() do
- for i, v in pairs(game.CoreGui:GetDescendants()) do
- if v:IsA("TextLabel") and v.Text == "Camera" then
- v.Parent.Position = UDim2.new(0, 220, 0, 0)
- did = true
- break
- end
- end
- if did then
- break
- end
- end
- end
- return TDS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement