sasod35

Tower Defense Simulator

Jun 27th, 2023
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.54 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://pastebin.com/raw/vff1bQ9F"))()
  9. local Window = Library.CreateLib("Tower Defense Simulator", "BloodTheme")
  10. local Credits = Window:NewTab("Others")
  11. local Lobby = Window:NewTab("Game")
  12. local Visual = Lobby:NewSection("Visual")
  13. local AutoChain = Lobby:NewSection("AutoAbility")
  14. local turn = false
  15. local CreditsBar = Credits:NewSection("Credits")
  16. CreditsBar:NewLabel("Made by easy#9499 and 3EloHIyChay123123#7087")
  17. CreditsBar:NewLabel("moveable by ammar#2789")
  18. CreditsBar:NewKeybind("Toggle Gui", "", Enum.KeyCode.RightShift, function()
  19. Library:ToggleUI()
  20. end)
  21.  
  22. local Stack = Lobby:NewSection("Stack")
  23. Stack:NewTextBox("TowerNameHere", "Make sure u stand in the position u want to place", function(txt)
  24. local args = {
  25. [1] = "Troops",
  26. [2] = "Place",
  27. [3] = txt,
  28. [4] = {
  29. ["Rotation"] = CFrame.new(0,5,0,0,5,0,0,5,0,0,5,0),
  30. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  31. }
  32. }
  33.  
  34. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  35. end)
  36.  
  37. local Lobbyl = Window:NewTab("Lobby")
  38. local LeaderBoard = Lobbyl:NewSection("Lobby")
  39.  
  40. LeaderBoard:NewButton("Update leader board", "This will update the leader board", function()
  41.  
  42. local A_1 = "Leaderboard"
  43. local A_2 = "Request"
  44. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  45. Event:InvokeServer(A_1, A_2)
  46.  
  47. end)
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. LeaderBoard:NewLabel("You have ".. game.Players.LocalPlayer.Loses.Value.. " loses")
  56. local Board = LeaderBoard:NewLabel("eeee has eeeee")
  57. local Selling = Lobby:NewSection("Selling")
  58.  
  59. Selling:NewButton("Sell all towers", "ok", function()
  60. for index,value in pairs(game.Workspace.Towers:GetChildren()) do
  61. -- Script generated by R2Sv2
  62. -- R2Sv2 developed by Luckyxero
  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. Stack:NewButton("Place weird ace pilot", "This is only work for some map", function()
  99. local A_1 = "Troops"
  100. local A_2 = "Place"
  101. local A_3 = "Ace Pilot"
  102. local A_4 =
  103. {
  104. ["Rotation"] = CFrame.new(0,5,0,0,0,0,0,0,0,0,-90,-90),
  105. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  106. }
  107. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  108. Event:InvokeServer(A_1, A_2, A_3, A_4)
  109. end)
  110. local pl = game.Players:GetChildren()
  111.  
  112. Stack:NewButton("Place weird pursuit", "Same as the ace pilot", function()
  113. local A_1 = "Troops"
  114. local A_2 = "Place"
  115. local A_3 = "Pursuit"
  116. local A_4 =
  117. {
  118. ["Rotation"] = CFrame.new(0,5,0,0,0,0,0,0,0,0,-90,-90),
  119. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  120. }
  121. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  122. Event:InvokeServer(A_1, A_2, A_3, A_4)
  123. end)
  124.  
  125. Stack:NewButton("Place rancutioner", "super high executioner(should use fly script to upgrade)", function()
  126. local A_1 = "Troops"
  127. local A_2 = "Place"
  128. local A_3 = "Executioner"
  129. local A_4 =
  130. {
  131. ["Rotation"] = CFrame.new(0,100,0,0,0,0,0,0,0,0,0,0),
  132. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  133. }
  134. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  135. Event:InvokeServer(A_1, A_2, A_3, A_4)
  136. end)
  137. AutoChain:NewButton("call all gladiator ability", "ok breh", function()
  138. for index,value in pairs(game.Workspace.Towers:GetChildren()) do
  139. if value.Owner.Value == game.Players.LocalPlayer.UserId and value.Replicator:GetAttribute("Type") == "Gladiator" then
  140. local args = { [1] = "Troops", [2] = "Abilities", [3] = "Activate", [4] = { ["Name"] = "Warrior's Call", ["Troop"] = value } }
  141.  
  142. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  143. end
  144. end
  145. end)
  146. AutoChain:NewButton("call all swarmer ability", "ok breh", function()
  147. for index,value in pairs(game.Workspace.Towers:GetChildren()) do
  148. if value.Owner.Value == game.Players.LocalPlayer.UserId and value.Replicator:GetAttribute("Type") == "Swarmer" then
  149. local args = { [1] = "Troops", [2] = "Abilities", [3] = "Activate", [4] = { ["Name"] = "Swarm", ["Troop"] = value } }
  150.  
  151. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  152. end
  153. end
  154. end)
  155. Stack:NewButton("Place weird ace pilot2", "For lay by i guess lol", function()
  156. local A_1 = "Troops"
  157. local A_2 = "Place"
  158. local A_3 = "Ace Pilot"
  159. local A_4 =
  160. {
  161. ["Rotation"] = CFrame.new(0,5,0,0,0,90,-90),
  162. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  163. }
  164. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  165. Event:InvokeServer(A_1, A_2, A_3, A_4)
  166. end)
  167. Stack:NewButton("Place weird pursuit2", "For lay by i guess lol", function()
  168. local A_1 = "Troops"
  169. local A_2 = "Place"
  170. local A_3 = "Pursuit"
  171. local A_4 =
  172. {
  173. ["Rotation"] = CFrame.new(0,5,0,0,0,90,-90),
  174. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  175. }
  176. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  177. Event:InvokeServer(A_1, A_2, A_3, A_4)
  178. end)
  179. local Check = 0
  180. local Skipping = Lobby:NewSection("Skipping")
  181. Skipping:NewKeybind("SkipKey", "Breh", Enum.KeyCode.F, function() local args = { [1] = "Waves", [2] = "Skip" }
  182.  
  183. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args)) end) local CheckEd = false
  184.  
  185. local lolc = false
  186.  
  187.  
  188. local plrs = game.Players:GetChildren()
  189.  
  190.  
  191. AutoChain:NewButton("AutoChain", "by money maker", function()
  192. loadstring(game:HttpGet("https://banbus.cf/scripts/tdsautochain"))()
  193.  
  194. end)
  195. Stack:NewDropdown("StackTower", "Alt of stack tower name", TowersUHave, function(currentOption)
  196. local A_1 = "Troops"
  197. local A_2 = "Place"
  198. local A_3 = currentOption
  199. local A_4 =
  200. {
  201. ["Rotation"] = CFrame.new(0,5,0),
  202. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  203. }
  204. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  205. Event:InvokeServer(A_1, A_2, A_3, A_4)
  206. end)
  207. local plr = game.Players.LocalPlayer
  208. local PlaceAnywhere
  209. Visual:NewButton("Get place anywhere position", "k bro", function()
  210. PlaceAnywhere = game.Players.LocalPlayer.character.HumanoidRootPart.Position
  211. end)
  212. Visual:NewDropdown("Place tower anywhere", "breh", TowersUHave, function(currentOption)
  213. local o = plr.character.HumanoidRootPart.Position
  214. local ok = Vector3.new(o - o)
  215. local A_1 = "Troops"
  216. local A_2 = "Place"
  217. local A_3 = currentOption
  218. local A_4 =
  219. {
  220. ["Rotation"] = CFrame.new(PlaceAnywhere) + Vector3.new(ok),
  221. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  222. }
  223. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  224. Event:InvokeServer(A_1, A_2, A_3, A_4)
  225. end)
  226.  
  227. _G.SpamSkip = false
  228. Skipping:NewToggle("Autoskip", "Haha yes", function(state)
  229. _G.SpamSkip = not _G.SpamSkip
  230. end)
  231. game.ReplicatedStorage.State.Voting.Enabled.Changed:Connect(function()
  232. if game.ReplicatedStorage.State.Voting.Enabled.Value == true then
  233. if _G.SpamSkip == true then
  234. game.ReplicatedStorage.RemoteEvent:FireServer("Waves","Skip")
  235. end
  236. end
  237. end)
  238.  
  239. Selling:NewButton("Sell all Farms", "breh??ssđssd", function()
  240. local wo = game.Workspace.Towers:GetChildren()
  241. for i,v in pairs(wo) do
  242. if v.Owner.Value == game.Players.LocalPlayer.UserId and v.Replicator:GetAttribute("Type") == "Farm" then
  243. local A_1 = "Troops"
  244. local A_2 = "Sell"
  245. local A_3 =
  246. {
  247. ["Troop"] = v
  248. }
  249. local Event = game:GetService("ReplicatedStorage").RemoteFunction
  250. Event:InvokeServer(A_1, A_2, A_3)
  251.  
  252. wait()
  253.  
  254. end
  255. end
  256. end)
  257. local DmCheck = false
  258. local TowersHaha = game.Workspace.Towers:GetChildren()
  259.  
  260. local SpamAbility = false
  261.  
  262. AutoChain:NewToggle("Spam Medic ability", "Breh", function(state)
  263. if state then
  264. DmCheck = true
  265. else
  266. DmCheck = false
  267. end
  268. end)
  269. while wait(1) do
  270. if DmCheck == true then
  271. local args = {
  272. [1] = "Troops",
  273. [2] = "Place",
  274. [3] = "Medic",
  275. [4] = {
  276. ["Rotation"] = CFrame.new(Vector3.new(0, 0, 0), Vector3.new(-0, -0, -1)),
  277. ["Position"] = game.Players.LocalPlayer.character.HumanoidRootPart.Position - Vector3.new(0,5,0)
  278. }
  279. }
  280. local Dmagain = game.Workspace.Towers:GetChildren()
  281. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  282. for i,v in pairs(Dmagain) do
  283. if v.Owner.Value == game.Players.LocalPlayer.UserId and v.Replicator:GetAttribute("Type") == "Medic" then
  284. local args = {
  285. [1] = "Troops",
  286. [2] = "Upgrade",
  287. [3] = "Set",
  288. [4] = {
  289. ["Troop"] = v
  290. }
  291. }
  292.  
  293. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  294. wait(0.1)
  295. local args = {
  296. [1] = "Troops",
  297. [2] = "Upgrade",
  298. [3] = "Set",
  299. [4] = {
  300. ["Troop"] = v
  301. }
  302. }
  303.  
  304. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  305. wait(0.1)
  306. local args = {
  307. [1] = "Troops",
  308. [2] = "Upgrade",
  309. [3] = "Set",
  310. [4] = {
  311. ["Troop"] = v
  312. }
  313. }
  314.  
  315. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  316. wait(0.1)
  317. local args = {
  318. [1] = "Troops",
  319. [2] = "Upgrade",
  320. [3] = "Set",
  321. [4] = {
  322. ["Troop"] = v
  323. }
  324. }
  325.  
  326. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  327. wait(0.1)
  328. local args = {
  329. [1] = "Troops",
  330. [2] = "Upgrade",
  331. [3] = "Set",
  332. [4] = {
  333. ["Troop"] = v
  334. }
  335. }
  336.  
  337. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  338. wait(0.5)
  339. local args = {
  340. [1] = "Troops",
  341. [2] = "Abilities",
  342. [3] = "Activate",
  343. [4] = {
  344. ["Name"] = "Cleansing",
  345. ["Troop"] = v
  346. }
  347. }
  348.  
  349. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  350. wait(0.1)
  351. local args = {
  352. [1] = "Troops",
  353. [2] = "Sell",
  354. [3] = {
  355. ["Troop"] = v
  356. }
  357. }
  358.  
  359. game:GetService("ReplicatedStorage").RemoteFunction:InvokeServer(unpack(args))
  360. end
  361. end
  362. end
  363. end
  364. -- Gui to Lua
  365. -- Version: 3.2
  366.  
  367. -- Instances:
  368.  
  369. local ScreenGui = Instance.new("ScreenGui")
  370. ScreenGui.Name = "lol"
  371. local TextButton = Instance.new("TextButton")
  372.  
  373. --Properties:
  374.  
  375. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  376. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  377.  
  378. TextButton.Parent = ScreenGui
  379. TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  380. TextButton.Position = UDim2.new(0.886780739, 0, 0.493946731, 0)
  381. TextButton.Size = UDim2.new(0, 96, 0, 50)
  382. TextButton.Font = Enum.Font.SourceSans
  383. TextButton.Text = "Toggle gui"
  384. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  385. TextButton.TextSize = 14.000
  386. TextButton.MouseButton1Click:Connect(function()
  387. Library:ToggleUI()
  388. end)
Add Comment
Please, Sign In to add comment