Advertisement
Olaylok

Tower Defense Simulator Script

Nov 24th, 2022 (edited)
9,483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.89 KB | None | 0 0
  1. local TowersUHave = {}
  2. for i,v in next, game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer("Session", "Search", "Inventory.Troops") do
  3.     if v.Equipped then
  4.         table.insert(TowersUHave, i)
  5.     end
  6. end
  7. wait(1)
  8. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  9. local Window = Library.CreateLib("Script for TDS", "Midnight")
  10. local Credits = Window:NewTab("Others")
  11.  
  12. local Lobby = Window:NewTab("AutoAbility")
  13. local AutoChain = Lobby:NewSection("AutoAbility")
  14. AutoChain:NewToggle("Spam Medic ability", "Breh", function(state)
  15.     if state then
  16.         DmCheck = true
  17.     else
  18.         DmCheck = false
  19.     end
  20. end)
  21. local Lobby = Window:NewTab("CamMode")
  22. local turn = false
  23. local CamMode = Lobby:NewSection("Camera Modes")
  24.  
  25. CamMode:NewButton("Free Cam(r)", "Free Camera mode", function()
  26.     loadstring(game:HttpGet("https://pastebin.com/raw/v3Vxf5E1"))()
  27. end)
  28.  
  29. local Lobby = Window:NewTab("Scripts")
  30. local CamMode = Lobby:NewSection("Scripts")
  31. CamMode:NewButton("AutoFarm(level 1)", "AutoFarm", function()
  32.     loadstring(game:HttpGet("https://pastebin.com/raw/6gYhUJw4"))()
  33. end)
  34. CamMode:NewButton("AutoFarm(need Cowboy,dj)", "AutoFarm", function()
  35.     loadstring(game:HttpGet("https://pastebin.com/raw/UhD5Vf7g"))()
  36. end)
  37.  
  38.  
  39. local Lobby = Window:NewTab("Stack")
  40. local turn = false
  41. local CreditsBar = Credits:NewSection("info")
  42. CreditsBar:NewLabel("lumik#3479 : owner script")
  43. CreditsBar:NewLabel("When using AutoChain And Spam Medic , it can kick")
  44.  
  45. local Stack = Lobby:NewSection("Stack")
  46. Stack:NewTextBox("TowerNameHere", "Make sure u stand in the position u want to place", function(txt)
  47.     local args = {
  48.         [1] = "Troops",
  49.         [2] = "Place",
  50.         [3] = txt,
  51.         [4] = {
  52.             ["Rotation"] = CFrame.new(0,5,0,0,5,0,0,5,0,0,5,0),
  53.             ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  54.         }
  55.     }
  56.  
  57.     game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  58. end)
  59. local Lobby = Window:NewTab("Selling")
  60. local Selling = Lobby:NewSection("Selling")
  61. Selling:NewButton("Sell all towers", "ok", function()
  62.     for index,value in pairs(game.Workspace.Towers:GetChildren()) do
  63.  
  64.         local A_1 = "Troops"
  65.         local A_2 = "Sell"
  66.         local A_3 =
  67.             {
  68.                 ["Troop"] = value
  69.             }
  70.         local Event = game:GetService("ReplicatedStorage").RemoteFunction
  71.         Event:InvokeServer(A_1, A_2, A_3)
  72.  
  73.     end
  74.     wait()
  75. end)
  76.  
  77.  
  78. Selling:NewTextBox("SellAllTowersName", "ok", function(txt)
  79.     for index,value in pairs(game.Workspace.Towers:GetChildren()) do
  80.         if value.Replicator:GetAttribute("Type") == txt then
  81.  
  82.  
  83.  
  84.             local A_1 = "Troops"
  85.             local A_2 = "Sell"
  86.             local A_3 =
  87.                 {
  88.                     ["Troop"] = value
  89.                 }
  90.             local Event = game:GetService("ReplicatedStorage").RemoteFunction
  91.             Event:InvokeServer(A_1, A_2, A_3)
  92.         end
  93.         wait()
  94.     end
  95.  
  96.  
  97. end)
  98.  
  99. Selling:NewButton("Sell all Farms", "breh??ssđssd", function()
  100. local wo = game.Workspace.Towers:GetChildren()
  101. for i,v in pairs(wo) do
  102. if v.Owner.Value == game.Players.LocalPlayer and v.Replicator:GetAttribute("Type") == "Farm" then
  103.         local A_1 = "Troops"
  104.             local A_2 = "Sell"
  105.             local A_3 =
  106.                 {
  107.                     ["Troop"] = v
  108.                 }
  109.             local Event = game:GetService("ReplicatedStorage").RemoteFunction
  110.             Event:InvokeServer(A_1, A_2, A_3)
  111.        
  112.         wait()
  113.    
  114. end
  115. end
  116. end)
  117. local DmCheck = false
  118.  
  119. local Lobby = Window:NewTab("Skipping")
  120. local Check = 0 local Skipping = Lobby:NewSection("Skipping") Skipping:NewKeybind("SkipKey", "Breh", Enum.KeyCode.F, function() local args = { [1] = "Waves", [2] = "Skip" }
  121.  
  122. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args)) end) local CheckEd = false
  123.  
  124. local lolc = false
  125.  
  126. local Lobby = Window:NewTab("Spam")
  127. local Check = 0 local Skipping = Lobby:NewSection("Spam") Skipping:NewKeybind("SpamKey", "Bruh", Enum.KeyCode.T, function() local args = { [1] = "Waves", [2] = "Skip" }
  128.  
  129. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args)) end) local CheckEd = false
  130.  
  131. local lolc = false
  132.  
  133. local Lobby = Window:NewTab("Player")
  134. local Check = 0 local Player = Lobby:NewSection("Player")
  135.  
  136.  
  137. Player:NewSlider("JumpPower", "lol", 500, 0, function(s) -- 500 (MaxValue) | 0 (MinValue)
  138.     game.Players.LocalPlayer.Character.Humanoid.JumpPower = s
  139. end)
  140.  
  141. Player:NewSlider("WalkSpeed", "lol", 500, 0, function(s) -- 500 (MaxValue) | 0 (MinValue)
  142.    -- This walkspeed script is the same as others , but does not change to default speed when you reset. ENJOY !    
  143. _G.HackedWalkSpeed = s
  144.  
  145. local Plrs = game:GetService("Players")
  146.  
  147. local MyPlr = Plrs.LocalPlayer
  148. local MyChar = MyPlr.Character
  149.  
  150. if MyChar then
  151. local Hum = MyChar.Humanoid
  152. Hum.Changed:connect(function()
  153. Hum.WalkSpeed = _G.HackedWalkSpeed
  154. end)
  155. Hum.WalkSpeed = _G.HackedWalkSpeed
  156. end
  157.  
  158. MyPlr.CharacterAdded:connect(function(Char)
  159. MyChar = Char
  160. repeat wait() until Char:FindFirstChild("Humanoid")
  161. local Hum = Char.Humanoid
  162. Hum.Changed:connect(function()
  163. Hum.WalkSpeed = _G.HackedWalkSpeed
  164. end)
  165. Hum.WalkSpeed = _G.HackedWalkSpeed
  166. end)
  167.  
  168. -- end of script :)
  169. end)
  170.  
  171. AutoChain:NewButton("AutoChain", "Make sure u have at least 3 lv 2 plus commanders", function()
  172.  
  173. while true do
  174. for index,value in pairs(game.Workspace.Towers:GetChildren()) do if value.Owner.Value == game.Players.LocalPlayer and value.Replicator:GetAttribute("Type") == "Commander" then local args = { [1] = "Troops", [2] = "Abilities", [3] = "Activate", [4] = { ["Name"] = "Call Of Arms", ["Troop"] = value } }
  175.  
  176.                     game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  177.                     wait(10.1)
  178.              end
  179.              end
  180.  
  181. end
  182.  
  183.    end)
  184. Stack:NewDropdown("StackTower", "Alt of stack tower name", TowersUHave, function(currentOption)
  185.     local A_1 = "Troops"
  186.         local A_2 = "Place"
  187.         local A_3 = currentOption
  188.         local A_4 =
  189.             {
  190.                 ["Rotation"] = CFrame.new(0,5,0),
  191.                 ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  192.             }
  193.         local Event = game:GetService("ReplicatedStorage").RemoteFunction
  194.         Event:InvokeServer(A_1, A_2, A_3, A_4)
  195. end)
  196.  
  197. local ok = game.Players.LocalPlayer.PlayerGui.GameGui.Health.Wave
  198. Selling:NewButton("Sell all Farms", "breh??ssđssd", function()
  199. local wo = game.Workspace.Towers:GetChildren()
  200. for i,v in pairs(wo) do
  201. if v.Owner.Value == game.Players.LocalPlayer and v.Replicator:GetAttribute("Type") == "Farm" then
  202.         local A_1 = "Troops"
  203.             local A_2 = "Sell"
  204.             local A_3 =
  205.                 {
  206.                     ["Troop"] = v
  207.                 }
  208.             local Event = game:GetService("ReplicatedStorage").RemoteFunction
  209.             Event:InvokeServer(A_1, A_2, A_3)
  210.        
  211.         wait()
  212.    
  213. end
  214. end
  215. end)
  216. local DmCheck = false
  217.  
  218. AutoChain:NewToggle("Spam Medic ability", "Breh", function(state)
  219.     if state then
  220.         DmCheck = true
  221.     else
  222.         DmCheck = false
  223.     end
  224. end)
  225. while wait(1) do
  226. if DmCheck == true then
  227. local args = {
  228.     [1] = "Troops",
  229.     [2] = "Place",
  230.     [3] = "Medic",
  231.     [4] = {
  232.         ["Rotation"] = CFrame.new(Vector3.new(0, 0, 0), Vector3.new(-0, -0, -1)),
  233.         ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  234.     }
  235. }
  236. local Dmagain = game.Workspace.Towers:GetChildren()
  237. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  238. for i,v in pairs(Dmagain) do
  239. if v.Owner.Value == game.Players.LocalPlayer and v.Replicator:GetAttribute("Type") == "Medic" then
  240. local args = {
  241.     [1] = "Troops",
  242.     [2] = "Upgrade",
  243.     [3] = "Set",
  244.     [4] = {
  245.         ["Troop"] = v
  246.     }
  247. }
  248.  
  249. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  250. local args = {
  251.     [1] = "Troops",
  252.     [2] = "Upgrade",
  253.     [3] = "Set",
  254.     [4] = {
  255.         ["Troop"] = v
  256.     }
  257. }
  258.  
  259. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  260. local args = {
  261.     [1] = "Troops",
  262.     [2] = "Upgrade",
  263.     [3] = "Set",
  264.     [4] = {
  265.         ["Troop"] = v
  266.     }
  267. }
  268.  
  269. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  270. local args = {
  271.     [1] = "Troops",
  272.     [2] = "Upgrade",
  273.     [3] = "Set",
  274.     [4] = {
  275.         ["Troop"] = v
  276.     }
  277. }
  278.  
  279. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  280. local args = {
  281.     [1] = "Troops",
  282.     [2] = "Upgrade",
  283.     [3] = "Set",
  284.     [4] = {
  285.         ["Troop"] = v
  286.     }
  287. }
  288.  
  289. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  290. wait(0.5)
  291. local args = {
  292.     [1] = "Troops",
  293.     [2] = "Abilities",
  294.     [3] = "Activate",
  295.     [4] = {
  296.         ["Name"] = "Cleansing",
  297.         ["Troop"] = v
  298.     }
  299. }
  300.  
  301. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  302. wait(0.1)
  303. local args = {
  304.     [1] = "Troops",
  305.     [2] = "Sell",
  306.     [3] = {
  307.         ["Troop"] = v
  308.     }
  309. }
  310.  
  311. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  312. end
  313. end
  314. end
  315. end
  316.  
  317. LeaderBoard:NewButton("ButtonText", "ButtonInfo", function()
  318.     print("Clicked")
  319. end)
  320.  
  321.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement