Advertisement
james0003

Roblox build and survive script [auto kill. auto walls, auto farm]

Jul 11th, 2021
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.95 KB | None | 0 0
  1. --[[
  2. ~ Description ~
  3.  
  4. This is a pretty powerful script I've made, you can edit some stuff at the top here (like the wall size/shape)
  5. along with the distance of the kill aura.
  6.  
  7. This was a really fun script to make all in all so :D cheers
  8. --------------------------------
  9. ~ Game ~
  10.  
  11. https://www.roblox.com/games/3056526277/Build-Survive#!/game-instances
  12. --------------------------------
  13. ~ Credit ~
  14.  
  15. Gui - brianops1
  16.  
  17. Scripter(s) - briansop1
  18. --]]
  19.  
  20. x = -252
  21. y = -8 --starting floor is -8
  22. z = 48 --Change this (by increments of 4) to change where the location of the wall is
  23. amount = 10
  24. WT = .01
  25.  
  26. _G.AuraDist = 75
  27.  
  28. KPLocation = 2 -- 1 is the closest to the mobs spawn (for loot to still drop), 4 is the farthest (closest to building area)
  29.  
  30. _G.KEY = "LeftAlt" -- for the tp to mouse keybind
  31. _G.KEY1 = "H" -- for the Noclip keybind
  32.  
  33. function define()
  34. plr = game:GetService('Players').LocalPlayer
  35. Root = plr.Character:FindFirstChild("HumanoidRootPart")
  36. UIS = game:GetService("UserInputService")
  37. mouse = plr:GetMouse()
  38. end
  39. print('loading')
  40. repeat
  41. wait()
  42. until pcall(define)
  43. local ScreenGui = Instance.new("ScreenGui")
  44. local MainFrame = Instance.new("Frame")
  45. local PreBuilt = Instance.new("Frame")
  46. local EB1 = Instance.new("TextButton")
  47. local Toplabel = Instance.new("TextLabel")
  48. local EB2 = Instance.new("TextButton")
  49. local EB3 = Instance.new("TextButton")
  50. local EB4 = Instance.new("TextButton")
  51. local EB5 = Instance.new("TextButton")
  52. local EB6 = Instance.new("TextButton")
  53. local Bottomlabel = Instance.new("TextLabel")
  54. local Game = Instance.new("TextLabel")
  55. local Minimize = Instance.new("TextButton")
  56. local Close = Instance.new("TextButton")
  57. local Credits = Instance.new("TextLabel")
  58. local B1 = Instance.new("TextButton")
  59. local B2 = Instance.new("TextButton")
  60. local B5 = Instance.new("TextButton")
  61. local B8 = Instance.new("TextButton")
  62. local B6 = Instance.new("TextButton")
  63. local B4 = Instance.new("TextButton")
  64. local B7 = Instance.new("TextButton")
  65. local B3 = Instance.new("TextButton")
  66. local BuiltInButton = Instance.new("TextButton")
  67. local Background = Instance.new("ImageLabel")
  68. ---------------------Gui Variables----------------------
  69. ScreenGui.Parent = game.CoreGui
  70. MainFrame.Name = "MainFrame"
  71. MainFrame.Parent = ScreenGui
  72. MainFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  73. MainFrame.BorderColor3 = Color3.new(1, 0.835294, 0.172549)
  74. MainFrame.BorderSizePixel = 2
  75. MainFrame.Position = UDim2.new(0, 270, 0, 101)
  76. MainFrame.Size = UDim2.new(0, 278, 0, 279)
  77. MainFrame.Selectable = true
  78. MainFrame.Active = true
  79. MainFrame.Draggable = true
  80. PreBuilt.Name = "PreBuilt"
  81. PreBuilt.Parent = MainFrame
  82. PreBuilt.BackgroundColor3 = Color3.new(0.972549, 0.764706, 0.129412)
  83. PreBuilt.BorderSizePixel = 0
  84. PreBuilt.Position = UDim2.new(0, 287, 0, 17)
  85. PreBuilt.Size = UDim2.new(0, 186, 0, 246)
  86. PreBuilt.Visible = false
  87. EB1.Name = "EB1"
  88. EB1.Parent = PreBuilt
  89. EB1.BackgroundColor3 = Color3.new(1, 1, 1)
  90. EB1.BackgroundTransparency = 0.30000001192093
  91. EB1.BorderSizePixel = 0
  92. EB1.Position = UDim2.new(0, 0, 0.117886186, 0)
  93. EB1.Size = UDim2.new(0, 186, 0, 25)
  94. EB1.Font = Enum.Font.SourceSans
  95. EB1.Text = ""
  96. EB1.TextColor3 = Color3.new(0, 0, 0)
  97. EB1.TextSize = 13
  98. Toplabel.Name = "Toplabel"
  99. Toplabel.Parent = PreBuilt
  100. Toplabel.BackgroundColor3 = Color3.new(1, 1, 1)
  101. Toplabel.BackgroundTransparency = 0.20000000298023
  102. Toplabel.BorderSizePixel = 0
  103. Toplabel.Position = UDim2.new(0, 0, -0.008130081, 0)
  104. Toplabel.Size = UDim2.new(0, 186, 0, 25)
  105. Toplabel.Font = Enum.Font.SourceSans
  106. Toplabel.Text = "Built In Scripts"
  107. Toplabel.TextColor3 = Color3.new(0, 0, 0)
  108. Toplabel.TextSize = 14
  109. Toplabel.TextWrapped = true
  110. EB2.Name = "EB2"
  111. EB2.Parent = PreBuilt
  112. EB2.BackgroundColor3 = Color3.new(1, 1, 1)
  113. EB2.BackgroundTransparency = 0.30000001192093
  114. EB2.BorderSizePixel = 0
  115. EB2.Position = UDim2.new(0, 0, 0.243902445, 0)
  116. EB2.Size = UDim2.new(0, 186, 0, 25)
  117. EB2.Font = Enum.Font.SourceSans
  118. EB2.Text = ""
  119. EB2.TextColor3 = Color3.new(0, 0, 0)
  120. EB2.TextSize = 13
  121. EB3.Name = "EB3"
  122. EB3.Parent = PreBuilt
  123. EB3.BackgroundColor3 = Color3.new(1, 1, 1)
  124. EB3.BackgroundTransparency = 0.30000001192093
  125. EB3.BorderSizePixel = 0
  126. EB3.Position = UDim2.new(0, 0, 0, 91)
  127. EB3.Size = UDim2.new(0, 186, 0, 25)
  128. EB3.Font = Enum.Font.SourceSans
  129. EB3.Text = ""
  130. EB3.TextColor3 = Color3.new(0, 0, 0)
  131. EB3.TextSize = 13
  132. EB4.Name = "EB4"
  133. EB4.Parent = PreBuilt
  134. EB4.BackgroundColor3 = Color3.new(1, 1, 1)
  135. EB4.BackgroundTransparency = 0.30000001192093
  136. EB4.BorderSizePixel = 0
  137. EB4.Position = UDim2.new(0, 0, 0.495934963, 0)
  138. EB4.Size = UDim2.new(0, 186, 0, 25)
  139. EB4.Font = Enum.Font.SourceSans
  140. EB4.Text = ""
  141. EB4.TextColor3 = Color3.new(0, 0, 0)
  142. EB4.TextSize = 13
  143. EB5.Name = "EB5"
  144. EB5.Parent = PreBuilt
  145. EB5.BackgroundColor3 = Color3.new(1, 1, 1)
  146. EB5.BackgroundTransparency = 0.30000001192093
  147. EB5.BorderSizePixel = 0
  148. EB5.Position = UDim2.new(0, 0, 0, 153)
  149. EB5.Size = UDim2.new(0, 186, 0, 25)
  150. EB5.Font = Enum.Font.SourceSans
  151. EB5.Text = ""
  152. EB5.TextColor3 = Color3.new(0, 0, 0)
  153. EB5.TextSize = 13
  154. EB6.Name = "EB6"
  155. EB6.Parent = PreBuilt
  156. EB6.BackgroundColor3 = Color3.new(1, 1, 1)
  157. EB6.BackgroundTransparency = 0.30000001192093
  158. EB6.BorderSizePixel = 0
  159. EB6.Position = UDim2.new(0, 0, 0.747967541, 0)
  160. EB6.Size = UDim2.new(0, 186, 0, 25)
  161. EB6.Font = Enum.Font.SourceSans
  162. EB6.Text = ""
  163. EB6.TextColor3 = Color3.new(0, 0, 0)
  164. EB6.TextSize = 13
  165. Bottomlabel.Name = "Bottomlabel"
  166. Bottomlabel.Parent = PreBuilt
  167. Bottomlabel.BackgroundColor3 = Color3.new(1, 1, 1)
  168. Bottomlabel.BackgroundTransparency = 0.20000000298023
  169. Bottomlabel.BorderSizePixel = 0
  170. Bottomlabel.Position = UDim2.new(0, 0, 0.898373961, 0)
  171. Bottomlabel.Size = UDim2.new(0, 186, 0, 25)
  172. Bottomlabel.Font = Enum.Font.SourceSans
  173. Bottomlabel.Text = "Good Scripts to have eh?"
  174. Bottomlabel.TextColor3 = Color3.new(0, 0, 0)
  175. Bottomlabel.TextSize = 13
  176. Game.Name = "Game"
  177. Game.Parent = MainFrame
  178. Game.BackgroundColor3 = Color3.new(1, 1, 1)
  179. Game.BackgroundTransparency = 0.20000000298023
  180. Game.BorderColor3 = Color3.new(1, 1, 1)
  181. Game.BorderSizePixel = 0
  182. Game.Position = UDim2.new(0, 0,0, -2)
  183. Game.Size = UDim2.new(0, 227, 0, 25)
  184. Game.ZIndex = 2
  185. Game.Font = Enum.Font.SourceSans
  186. Game.Text = "Game Name Is Supposed to Be Here"
  187. Game.TextColor3 = Color3.new(0, 0, 0)
  188. Game.TextSize = 13
  189. Game.TextWrapped = true
  190. Minimize.Name = "Minimize"
  191. Minimize.Parent = MainFrame
  192. Minimize.BackgroundColor3 = Color3.new(1, 1, 1)
  193. Minimize.BackgroundTransparency = 0.20000000298023
  194. Minimize.BorderSizePixel = 0
  195. Minimize.Position = UDim2.new(0, 227,0, -2)
  196. Minimize.Size = UDim2.new(0, 25, 0, 25)
  197. Minimize.ZIndex = 2
  198. Minimize.Font = Enum.Font.SourceSans
  199. Minimize.Text = "-"
  200. Minimize.TextColor3 = Color3.new(0, 0, 0)
  201. Minimize.TextSize = 24
  202. Close.Name = "Close"
  203. Close.Parent = MainFrame
  204. Close.BackgroundColor3 = Color3.new(1, 1, 1)
  205. Close.BackgroundTransparency = 0.20000000298023
  206. Close.BorderSizePixel = 0
  207. Close.Position = UDim2.new(0, 251, 0, -2)
  208. Close.Size = UDim2.new(0, 28, 0, 25)
  209. Close.ZIndex = 2
  210. Close.Font = Enum.Font.SourceSans
  211. Close.Text = "x"
  212. Close.TextColor3 = Color3.new(0, 0, 0)
  213. Close.TextSize = 16
  214. Credits.Name = "Credits"
  215. Credits.Parent = MainFrame
  216. Credits.BackgroundColor3 = Color3.new(1, 1, 1)
  217. Credits.BackgroundTransparency = 0.20000000298023
  218. Credits.BorderColor3 = Color3.new(1, 1, 1)
  219. Credits.BorderSizePixel = 0
  220. Credits.Position = UDim2.new(-0.00359712238, 0, 0.9048931, 0)
  221. Credits.Size = UDim2.new(0, 278, 0, 28)
  222. Credits.ZIndex = 2
  223. Credits.Font = Enum.Font.SourceSans
  224. Credits.Text = "Gui ~ brianops1 | Scripter(s) ~ "
  225. Credits.TextColor3 = Color3.new(0, 0, 0)
  226. Credits.TextSize = 13
  227. Credits.TextWrapped = true
  228. B1.Name = "B1"
  229. B1.Parent = MainFrame
  230. B1.BackgroundColor3 = Color3.new(1, 1, 1)
  231. B1.BackgroundTransparency = 0.20000000298023
  232. B1.BorderColor3 = Color3.new(1, 1, 1)
  233. B1.Position = UDim2.new(0.0242086351, 0, 0.218306571, 0)
  234. B1.Size = UDim2.new(0, 125, 0, 40)
  235. B1.ZIndex = 2
  236. B1.Font = Enum.Font.SourceSans
  237. B1.Text = ""
  238. B1.TextColor3 = Color3.new(0, 0, 0)
  239. B1.TextSize = 13
  240. B1.TextWrapped = true
  241. B2.Name = "B2"
  242. B2.Parent = MainFrame
  243. B2.BackgroundColor3 = Color3.new(1, 1, 1)
  244. B2.BackgroundTransparency = 0.20000000298023
  245. B2.BorderColor3 = Color3.new(1, 1, 1)
  246. B2.Position = UDim2.new(0, 144, 0, 60)
  247. B2.Size = UDim2.new(0, 125, 0, 41)
  248. B2.ZIndex = 2
  249. B2.Font = Enum.Font.SourceSans
  250. B2.Text = ""
  251. B2.TextColor3 = Color3.new(0, 0, 0)
  252. B2.TextSize = 13
  253. B2.TextWrapped = true
  254. B5.Name = "B5"
  255. B5.Parent = MainFrame
  256. B5.BackgroundColor3 = Color3.new(1, 1, 1)
  257. B5.BackgroundTransparency = 0.20000000298023
  258. B5.BorderColor3 = Color3.new(1, 1, 1)
  259. B5.Position = UDim2.new(0.0251798555, 0, 0.559432089, 0)
  260. B5.Size = UDim2.new(0, 125, 0, 40)
  261. B5.ZIndex = 2
  262. B5.Font = Enum.Font.SourceSans
  263. B5.Text = ""
  264. B5.TextColor3 = Color3.new(0, 0, 0)
  265. B5.TextSize = 13
  266. B5.TextWrapped = true
  267. B8.Name = "B8"
  268. B8.Parent = MainFrame
  269. B8.BackgroundColor3 = Color3.new(1, 1, 1)
  270. B8.BackgroundTransparency = 0.20000000298023
  271. B8.BorderColor3 = Color3.new(1, 1, 1)
  272. B8.Position = UDim2.new(0, 144, 0, 204)
  273. B8.Size = UDim2.new(0, 125, 0, 40)
  274. B8.ZIndex = 2
  275. B8.Font = Enum.Font.SourceSans
  276. B8.Text = ""
  277. B8.TextColor3 = Color3.new(0, 0, 0)
  278. B8.TextSize = 13
  279. B8.TextWrapped = true
  280. B6.Name = "B6"
  281. B6.Parent = MainFrame
  282. B6.BackgroundColor3 = Color3.new(1, 1, 1)
  283. B6.BackgroundTransparency = 0.20000000298023
  284. B6.BorderColor3 = Color3.new(1, 1, 1)
  285. B6.Position = UDim2.new(0.517985642, 0, 0.557863712, 0)
  286. B6.Size = UDim2.new(0, 125, 0, 40)
  287. B6.ZIndex = 2
  288. B6.Font = Enum.Font.SourceSans
  289. B6.Text = ""
  290. B6.TextColor3 = Color3.new(0, 0, 0)
  291. B6.TextSize = 13
  292. B6.TextWrapped = true
  293. B4.Name = "B4"
  294. B4.Parent = MainFrame
  295. B4.BackgroundColor3 = Color3.new(1, 1, 1)
  296. B4.BackgroundTransparency = 0.20000000298023
  297. B4.BorderColor3 = Color3.new(1, 1, 1)
  298. B4.Position = UDim2.new(0, 144, 0, 109)
  299. B4.Size = UDim2.new(0, 125, 0, 40)
  300. B4.ZIndex = 2
  301. B4.Font = Enum.Font.SourceSans
  302. B4.Text = ""
  303. B4.TextColor3 = Color3.new(0, 0, 0)
  304. B4.TextSize = 13
  305. B4.TextWrapped = true
  306. B7.Name = "B7"
  307. B7.Parent = MainFrame
  308. B7.BackgroundColor3 = Color3.new(1, 1, 1)
  309. B7.BackgroundTransparency = 0.20000000298023
  310. B7.BorderColor3 = Color3.new(1, 1, 1)
  311. B7.Position = UDim2.new(0.0251798555, 0, 0.731607914, 0)
  312. B7.Size = UDim2.new(0, 125, 0, 40)
  313. B7.ZIndex = 2
  314. B7.Font = Enum.Font.SourceSans
  315. B7.Text = ""
  316. B7.TextColor3 = Color3.new(0, 0, 0)
  317. B7.TextSize = 13
  318. B7.TextWrapped = true
  319. B3.Name = "B3"
  320. B3.Parent = MainFrame
  321. B3.BackgroundColor3 = Color3.new(1, 1, 1)
  322. B3.BackgroundTransparency = 0.20000000298023
  323. B3.BorderColor3 = Color3.new(1, 1, 1)
  324. B3.Position = UDim2.new(0.0251798555, 0, 0.392196536, 0)
  325. B3.Size = UDim2.new(0, 125, 0, 40)
  326. B3.ZIndex = 2
  327. B3.Font = Enum.Font.SourceSans
  328. B3.Text = ""
  329. B3.TextColor3 = Color3.new(0, 0, 0)
  330. B3.TextSize = 13
  331. B3.TextWrapped = true
  332. BuiltInButton.Name = "BuiltInButton"
  333. BuiltInButton.Parent = MainFrame
  334. BuiltInButton.BackgroundColor3 = Color3.new(1, 1, 1)
  335. BuiltInButton.BackgroundTransparency = 0.20000000298023
  336. BuiltInButton.BorderSizePixel = 0
  337. BuiltInButton.Position = UDim2.new(0.0242086723, 0, 0.112921163, 0)
  338. BuiltInButton.Size = UDim2.new(0, 262, 0, 22)
  339. BuiltInButton.ZIndex = 2
  340. BuiltInButton.Font = Enum.Font.SourceSans
  341. BuiltInButton.Text = "Toggle Built-In Gui Scripts"
  342. BuiltInButton.TextColor3 = Color3.new(0, 0, 0)
  343. BuiltInButton.TextSize = 13
  344. BuiltInButton.TextWrapped = true
  345. Background.Name = "Background"
  346. Background.Parent = MainFrame
  347. Background.BackgroundColor3 = Color3.new(1, 1, 1)
  348. Background.BorderSizePixel = 0
  349. Background.LayoutOrder = 1
  350. Background.Size = UDim2.new(0, 277, 0, 281)
  351. Background.Image = "rbxassetid://325122566"
  352. B1.BorderSizePixel = 0
  353. B2.BorderSizePixel = 0
  354. B3.BorderSizePixel = 0
  355. B4.BorderSizePixel = 0
  356. B5.BorderSizePixel = 0
  357. B6.BorderSizePixel = 0
  358. B7.BorderSizePixel = 0
  359. B8.BorderSizePixel = 0
  360. _G.noclip = false
  361. ------------------PreBuilt Scripts-----------------------
  362. EB1.Text = "Dex"
  363. EB2.Text = "R2S"
  364. EB3.Text = "Noclip (Default H)"
  365. EB4.Text = "Tp to mouse (Default LeftAlt)"
  366. EB5.Text = "Print/Copy Vector3 position"
  367. EB6.Text = "Baseplate (click again to tp back)"
  368.  
  369. EB1.MouseButton1Click:connect(function()
  370. loadstring(game:GetObjects('rbxassetid://2180084478')[1].Source)()
  371. end)
  372. EB2.MouseButton1Click:connect(function()
  373. loadstring(game:HttpGet(('https://pastebin.com/raw/c12tidMB'),true))()
  374. end)
  375. EB3.MouseButton1Click:connect(function()
  376. UIS.InputBegan:connect(function(Input)
  377. plr = game:GetService('Players').LocalPlayer
  378. UIS = game:GetService("UserInputService")
  379. mouse = plr:GetMouse()
  380. local KeyCode = Input.KeyCode
  381. if KeyCode == Enum.KeyCode[_G.KEY1] and _G.noclip == false then
  382. _G.noclip = true
  383. while _G.noclip do
  384. plr.Character.Humanoid:ChangeState(11)
  385. game:GetService('RunService').Stepped:wait()
  386. end
  387. elseif KeyCode == Enum.KeyCode[_G.KEY1] and _G.noclip then
  388. _G.noclip = false
  389. end
  390. end)
  391. end)
  392. EB4.MouseButton1Click:connect(function()
  393. UIS.InputBegan:connect(function(Input)
  394. plr = game:GetService('Players').LocalPlayer
  395. UIS = game:GetService("UserInputService")
  396. mouse = plr:GetMouse()
  397. local KeyCode = Input.KeyCode
  398. if KeyCode == Enum.KeyCode[_G.KEY] then
  399. local hum = plr.Character.HumanoidRootPart
  400. if mouse.Target then
  401. hum.CFrame = CFrame.new(mouse.Hit.x, mouse.Hit.y + 4, mouse.Hit.z)
  402. end
  403. end
  404. end)
  405. end)
  406. EB5.MouseButton1Click:connect(function()
  407. x = loc(Root.CFrame.x)
  408. y = loc(Root.CFrame.y)
  409. z = loc(Root.CFrame.z)
  410. print('-----------------')
  411. print('Your x value is '.. x)
  412. print('Your y value is '.. y)
  413. print('Your z value is '.. z)
  414. pcall(copy,x,y,z)
  415. end)
  416. EB6.MouseButton1Click:connect(function()
  417. local check = game.Workspace:FindFirstChild("BRIAN'S PLATFORM")
  418. if check then
  419. Root.CFrame = _G.StartingPosition
  420. check:Destroy()
  421. else
  422. _G.StartingPosition = Root.CFrame
  423. local P = Instance.new("Part", workspace)
  424. P.Anchored = true
  425. P.CFrame = Root.CFrame * CFrame.new(0, 5500, 0)
  426. P.Name = "BRIAN'S PLATFORM"
  427. P.Size = Vector3.new(80, 1, 80)
  428. Root.CFrame = P.CFrame * CFrame.new(0,5,0)
  429. end
  430. end)
  431.  
  432. ---------------------Functions---------------------------
  433. function VarOff()
  434. _G.on1 = 0
  435. _G.on2 = 0
  436. _G.on3 = 0
  437. _G.on4 = 0
  438. _G.on5 = 0
  439. _G.on6 = 0
  440. _G.on7 = 0
  441. _G.on8 = 0
  442. end
  443. function loc(cframe)
  444. local location = string.find(cframe, ".", 1, true)
  445. if location == nil then
  446. return cframe
  447. end
  448. return string.sub(cframe, 1, location + 1)
  449. end
  450. function copy(x,y,z)
  451. setclipboard(x .. ", " .. y .. ", " .. z)
  452. end
  453. VarOff()
  454. m = 0
  455. Minimize.MouseButton1Click:connect(function()
  456. if m == 0 then
  457. m = 1
  458. opennn = PreBuilt.Visible
  459. B1.Visible = false
  460. B2.Visible = false
  461. B3.Visible = false
  462. B4.Visible = false
  463. B5.Visible = false
  464. B6.Visible = false
  465. B7.Visible = false
  466. B8.Visible = false
  467. BuiltInButton.Visible = false
  468. Credits.Visible = false
  469. PreBuilt.Visible = false
  470. Background.Size = UDim2.new(0,278,0,25)
  471. MainFrame.Size = UDim2.new(0,278,0,25)
  472. else
  473. m = 0
  474. B1.Visible = true
  475. B2.Visible = true
  476. B3.Visible = true
  477. B4.Visible = true
  478. B5.Visible = true
  479. B6.Visible = true
  480. B7.Visible = true
  481. B8.Visible = true
  482. BuiltInButton.Visible = true
  483. Credits.Visible = true
  484. PreBuilt.Visible = opennn
  485. Background.Size = UDim2.new(0,278,0,281)
  486. MainFrame.Size = UDim2.new(0,278,0,279)
  487. end
  488. end)
  489. Close.MouseButton1Click:connect(function()
  490. VarOff()
  491. ScreenGui:Destroy()
  492. end)
  493. builtin = 0
  494. BuiltInButton.MouseButton1Click:connect(function()
  495. if builtin == 0 then
  496. builtin = 1
  497. PreBuilt.Visible = true
  498. else
  499. builtin = 0
  500. PreBuilt.Visible = false
  501. end
  502. end)
  503. function ON(button)
  504. if button.Name == "B1" then
  505. _G.on1 = 1
  506. elseif button.Name == "B2" then
  507. _G.on2 = 1
  508. elseif button.Name == "B3" then
  509. _G.on3 = 1
  510. elseif button.Name == "B4" then
  511. _G.on4 = 1
  512. elseif button.Name == "B5" then
  513. _G.on5 = 1
  514. elseif button.Name == "B6" then
  515. _G.on6 = 1
  516. elseif button.Name == "B7" then
  517. _G.on7 = 1
  518. elseif button.Name == "B8" then
  519. _G.on8 = 1
  520. end
  521. button.BorderSizePixel = 2
  522. button.BorderColor3 = Color3.fromRGB(0, 0, 0)
  523. end
  524. function OFF(button)
  525. if button.Name == "B1" then
  526. _G.on1 = 0
  527. elseif button.Name == "B2" then
  528. _G.on2 = 0
  529. elseif button.Name == "B3" then
  530. _G.on3 = 0
  531. elseif button.Name == "B4" then
  532. _G.on4 = 0
  533. elseif button.Name == "B5" then
  534. _G.on5 = 0
  535. elseif button.Name == "B6" then
  536. _G.on6 = 0
  537. elseif button.Name == "B7" then
  538. _G.on7 = 0
  539. elseif button.Name == "B8" then
  540. _G.on8 = 0
  541. end
  542. button.BorderSizePixel = 0
  543. button.BorderColor3 = Color3.fromRGB(255, 255, 255)
  544. end
  545. function DMG(amt,obj)
  546. hit = false
  547. for i,v in pairs(game:GetService("Workspace")["__THINGS"]["Monsters"]:GetChildren()) do
  548. if v == obj and not hit then
  549. local A_1 =
  550. {
  551. [1] =
  552. {
  553. [1] =
  554. {
  555. [1] =
  556. {
  557. [1] = obj,
  558. [2] = amt
  559. },
  560. [2] =
  561. {
  562. [1] = obj,
  563. [2] = amt
  564. }
  565. }
  566. },
  567. [2] =
  568. {
  569. [1] = false
  570. }
  571. }
  572. local Event = game:GetService("Workspace")["__THINGS"]["__REMOTES"].mobdodamage
  573. Event:FireServer(A_1)
  574. hit = true
  575. end
  576. end
  577. end
  578. function isin(obj,tbl)
  579. for a = 1,#tbl do
  580. if obj == tbl[a] then
  581. return true
  582. end
  583. end
  584. return false
  585. end
  586. function place(M,x,y,z)
  587. local A_1 =
  588. {
  589. [1] =
  590. {
  591. [1] = CFrame.new(x, y, z, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  592. [2] = M,
  593. [3] = game:GetService("Workspace"):FindFirstChildOfClass("Part",true)
  594. },
  595. [2] =
  596. {
  597. [1] = false,
  598. [2] = false,
  599. [3] = false
  600. }
  601. }
  602. local Event = game:GetService("Workspace")["__THINGS"]["__REMOTES"].placeblock
  603. Event:FireServer(A_1)
  604. end
  605. function collect(id)
  606. local A_1 =
  607. {
  608. [1] =
  609. {
  610. [1] =
  611. {
  612. [1] = id
  613. }
  614. },
  615. [2] =
  616. {
  617. [1] = false
  618. }
  619. }
  620. local Event = game:GetService("Workspace")["__THINGS"]["__REMOTES"].redeemdrop
  621. Event:FireServer(A_1)
  622. end
  623. ---------------------Main Code---------------------------
  624.  
  625. Game.Text = "Build and survive" -- Game name here
  626.  
  627. Credits.Text = Credits.Text .. "brianops1" --Scripter(s) name(s) here
  628.  
  629.  
  630. B1.Text = "Kill All Monsters (and pickup loot)" --Script Names go here
  631. B2.Text = "Kill Aura and autopickup loot"
  632. B3.Text = "Kill Part"
  633. B4.Text = "Wood Wall"
  634. B5.Text = "Brick Wall"
  635. B6.Text = "Metal Wall"
  636. B7.Text = "Fire Wall (wip)"
  637. B8.Text = "Obsidian Wall (wip)"
  638.  
  639.  
  640. B1.MouseButton1Click:connect(function()
  641. if _G.on1 == 1 then
  642. OFF(B1)
  643. else
  644. ON(B1)
  645. game:GetService('RunService').Stepped:wait()
  646. for i,v in pairs(game:GetService("Workspace")["__THINGS"].Monsters:GetChildren()) do
  647. if v and v.ClassName == "Model" then
  648. if v.Name == "RougeBot" then
  649. pcall(DMG,85,v)
  650. elseif v.Name == "Robot" then
  651. pcall(DMG,80,v)
  652. elseif v.Name == "Zombie" then
  653. pcall(DMG,100,v)
  654. elseif v.Name == "Skeleton" then
  655. pcall(DMG,80,v)
  656. elseif v.Name == "Tank" then
  657. pcall(DMG,675,v)
  658. else
  659. pcall(DMG,100,v)
  660. end
  661. end
  662. end
  663. wait(.5)
  664. for i,v in pairs(game:GetService("Workspace")["__DEBRIS"]["MonsterDrops"]:GetChildren()) do
  665. local ID = v:FindFirstChild("UID")
  666. if ID then
  667. pcall(collect,ID.Value)
  668. end
  669. end
  670. OFF(B1)
  671. end
  672. end)
  673.  
  674. B2.MouseButton1Click:connect(function()
  675. if _G.on2 == 1 then
  676. OFF(B2)
  677. else
  678. ON(B2)
  679. game:GetService('RunService').Stepped:wait()
  680. while _G.on2 == 1 do
  681. for i,v in pairs(game:GetService("Workspace")["__THINGS"].Monsters:GetChildren()) do
  682. if v and v.ClassName == "Model" then
  683. local part = v:FindFirstChild("HumanoidRootPart")
  684. if part then
  685. define()
  686. local m = (Root.Position - part.Position).magnitude
  687. if v.Name == "RougeBot" and m < _G.AuraDist then
  688. pcall(DMG,85,v)
  689. elseif v.Name == "Robot" and m < _G.AuraDist then
  690. pcall(DMG,80,v)
  691. elseif v.Name == "Zombie" and m < _G.AuraDist then
  692. pcall(DMG,100,v)
  693. elseif v.Name == "Skeleton" and m < _G.AuraDist then
  694. pcall(DMG,80,v)
  695. elseif v.Name == "Tank" and m < _G.AuraDist then
  696. pcall(DMG,675,v)
  697. elseif m < _G.AuraDist then
  698. pcall(DMG,100,v)
  699. end
  700. end
  701. end
  702. end
  703. game:GetService('RunService').Stepped:wait()
  704. for i,v in pairs(game:GetService("Workspace")["__DEBRIS"]["MonsterDrops"]:GetChildren()) do
  705. local ID = v:FindFirstChild("UID")
  706. if ID then
  707. pcall(collect,ID.Value)
  708. end
  709. end
  710. wait()
  711. end
  712. OFF(B2)
  713. end
  714. end)
  715.  
  716. B3.MouseButton1Click:connect(function()
  717. if _G.on3 == 1 then
  718. OFF(B3)
  719. else
  720. ON(B3)
  721. game:GetService('RunService').Stepped:wait()
  722. local search = game.Workspace:FindFirstChild("DeathPart")
  723. if search then
  724. search:Destroy()
  725. end
  726. local DeathP = Instance.new("Part",workspace)
  727. DeathP.Size = Vector3.new(400,8,10)
  728. if KPLocation == 1 then
  729. DeathP.Position = Vector3.new(-70, 5.5, -144)
  730. elseif KPLocation == 2 then
  731. DeathP.Position = Vector3.new(-70, 5.5, -85.2)
  732. elseif KPLocation == 3 then
  733. DeathP.Position = Vector3.new(-70, -1.5, -23.9)
  734. elseif KPLocation == 4 then
  735. DeathP.Position = Vector3.new(-70, -8, 35.8)
  736. end
  737. DeathP.Name = "DeathPart"
  738. DeathP.Color = Color3.fromRGB(0,0,0)
  739. DeathP.Anchored = true
  740. DeathP.Transparency = .75
  741. mobs = {}
  742. while _G.on3 == 1 do
  743. wait()
  744. tbl = DeathP:GetTouchingParts()
  745. if #tbl > 0 then
  746. for i = 1,#tbl do
  747. if tbl[i].Parent ~= "Coin" and tbl[i].Parent ~= "Star" and tbl[i].Parent ~= "Heart" and isin(tbl[i].Parent,mobs) == false then
  748. table.insert(mobs,tbl[i].Parent)
  749. elseif tbl[i].Parent == "Coin" or tbl[i].Parent == "Star" or tbl[i].Parent == "Heart" then
  750. local ID = tbl[i]:FindFirstChild("UID")
  751. if ID then
  752. pcall(collect,ID.Value)
  753. end
  754. end
  755. end
  756. for i = 1,#mobs do
  757. pcall(DMG,675,mobs[1])
  758. table.remove(mobs,1)
  759. end
  760. end
  761. end
  762. local search = game.Workspace:FindFirstChild("DeathPart")
  763. if search then
  764. search:Destroy()
  765. end
  766. OFF(B3)
  767. end
  768. end)
  769.  
  770. B4.MouseButton1Click:connect(function()
  771. if _G.on4 == 1 then
  772. OFF(B4)
  773. else
  774. ON(B4)
  775. game:GetService('RunService').Stepped:wait()
  776. newz = z
  777. for a = 1,amount do
  778. if _G.on4 == 1 then
  779. newx = x
  780. newy = y
  781. newz = newz + 4
  782. for i = 1, 90 do
  783. if _G.on4 == 1 then
  784. wait(WT)
  785. newx = newx + 4
  786. place("Wood",newx,y,newz)
  787. newy = y + 4
  788. place("Wood",newx,newy,newz)
  789. end
  790. end
  791. end
  792. end
  793. for i,v in pairs(game:GetService("Workspace")["__DEBRIS"]:GetChildren()) do
  794. if v.Name == "Part" and v.ClassName == "Part" then
  795. v:Destroy()
  796. end
  797. end
  798. OFF(B4)
  799. end
  800. end)
  801.  
  802. B5.MouseButton1Click:connect(function()
  803. if _G.on5 == 1 then
  804. OFF(B5)
  805. else
  806. ON(B5)
  807. game:GetService('RunService').Stepped:wait()
  808. newz = z
  809. for a = 1,amount do
  810. if _G.on5 == 1 then
  811. newx = x
  812. newy = y
  813. newz = newz + 4
  814. for i = 1, 90 do
  815. if _G.on5 == 1 then
  816. wait(WT)
  817. newx = newx + 4
  818. place("Brick",newx,y,newz)
  819. newy = y + 4
  820. place("Brick",newx,newy,newz)
  821. end
  822. end
  823. end
  824. end
  825. for i,v in pairs(game:GetService("Workspace")["__DEBRIS"]:GetChildren()) do
  826. if v.Name == "Part" and v.ClassName == "Part" then
  827. v:Destroy()
  828. end
  829. end
  830. OFF(B5)
  831. end
  832. end)
  833.  
  834. B6.MouseButton1Click:connect(function()
  835. if _G.on6 == 1 then
  836. OFF(B6)
  837. else
  838. ON(B6)
  839. game:GetService('RunService').Stepped:wait()
  840. newz = z
  841. for a = 1,amount do
  842. if _G.on6 == 1 then
  843. newx = x
  844. newy = y
  845. newz = newz + 4
  846. for i = 1, 90 do
  847. if _G.on6 == 1 then
  848. wait(WT)
  849. newx = newx + 4
  850. place("Metal",newx,y,newz)
  851. newy = y + 4
  852. place("Metal",newx,newy,newz)
  853. end
  854. end
  855. end
  856. end
  857. for i,v in pairs(game:GetService("Workspace")["__DEBRIS"]:GetChildren()) do
  858. if v.Name == "Part" and v.ClassName == "Part" then
  859. v:Destroy()
  860. end
  861. end
  862. OFF(B6)
  863. end
  864. end)
  865.  
  866. B7.MouseButton1Click:connect(function()
  867. if _G.on7 == 1 then
  868. OFF(B7)
  869. else
  870. ON(B7)
  871. game:GetService('RunService').Stepped:wait()
  872. newz = z
  873. for a = 1,amount do
  874. if _G.on6 == 1 then
  875. newx = x
  876. newy = y
  877. newz = newz + 4
  878. for i = 1, 90 do
  879. if _G.on6 == 1 then
  880. wait(WT)
  881. newx = newx + 4
  882. place("Firebrick",newx,y,newz)
  883. newy = y + 4
  884. place("Firebrick",newx,newy,newz)
  885. end
  886. end
  887. end
  888. end
  889. for i,v in pairs(game:GetService("Workspace")["__DEBRIS"]:GetChildren()) do
  890. if v.Name == "Part" and v.ClassName == "Part" then
  891. v:Destroy()
  892. end
  893. end
  894. OFF(B7)
  895. end
  896. end)
  897.  
  898. B8.MouseButton1Click:connect(function()
  899. if _G.on8 == 1 then
  900. OFF(B8)
  901. else
  902. ON(B8)
  903. game:GetService('RunService').Stepped:wait()
  904. newz = z
  905. for a = 1,amount do
  906. if _G.on6 == 1 then
  907. newx = x
  908. newy = y
  909. newz = newz + 4
  910. for i = 1, 90 do
  911. if _G.on6 == 1 then
  912. wait(WT)
  913. newx = newx + 4
  914. place("Obsidian",newx,y,newz)
  915. newy = y + 4
  916. place("Obsidian",newx,newy,newz)
  917. end
  918. end
  919. end
  920. end
  921. for i,v in pairs(game:GetService("Workspace")["__DEBRIS"]:GetChildren()) do
  922. if v.Name == "Part" and v.ClassName == "Part" then
  923. v:Destroy()
  924. end
  925. end
  926. OFF(B8)
  927. end
  928. end)
  929.  
  930.  
  931. print('loaded')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement