Viktorkarlsson01

Zombie Attack

Sep 10th, 2020
3,878
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.57 KB | None | 0 0
  1. -- Made by TeamPoison --
  2. -- V3rmillion: T3aMp0isoN --
  3. -- Discord: Brother Omar#9562 --
  4.  
  5. local ZombieAttackGUI = Instance.new("ScreenGui")
  6. local Main = Instance.new("Frame")
  7. local TextLabel = Instance.new("TextLabel")
  8. local TextLabel_2 = Instance.new("TextLabel")
  9. local Frame = Instance.new("Frame")
  10. local TextLabel_3 = Instance.new("TextLabel")
  11. local ConsoleFrame = Instance.new("Frame")
  12. local Console = Instance.new("TextLabel")
  13. local Frame_2 = Instance.new("Frame")
  14. local TextLabel_4 = Instance.new("TextLabel")
  15. local Frame_3 = Instance.new("Frame")
  16. local TextLabel_5 = Instance.new("TextLabel")
  17. local Frame_4 = Instance.new("Frame")
  18. local TextLabel_6 = Instance.new("TextLabel")
  19. local KillPlatform = Instance.new("TextButton")
  20. local StealKills = Instance.new("TextButton")
  21. local AutoFarm = Instance.new("TextButton")
  22. local NoRecoil = Instance.new("TextButton")
  23. local Guns = Instance.new("TextButton")
  24. local Knifes = Instance.new("TextButton")
  25. local Fly = Instance.new("TextButton")
  26. local Noclip = Instance.new("TextButton")
  27. local Gravity = Instance.new("TextButton")
  28. local Speed = Instance.new("TextButton")
  29. local Jump = Instance.new("TextButton")
  30. local Btools = Instance.new("TextButton")
  31.  
  32. ZombieAttackGUI.Name = "Zombie Attack GUI"
  33. ZombieAttackGUI.Parent = game.CoreGui
  34. ZombieAttackGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  35.  
  36. Main.Name = "Main"
  37. Main.Parent = ZombieAttackGUI
  38. Main.BackgroundColor3 = Color3.new(0.247059, 0, 0.372549)
  39. Main.BackgroundTransparency = 0.15000000596046
  40. Main.BorderSizePixel = 0
  41. Main.Position = UDim2.new(0.794708014, 0, 0, 0)
  42. Main.Size = UDim2.new(0.191605836, 0, 1, 0)
  43.  
  44. TextLabel.Parent = Main
  45. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  46. TextLabel.BackgroundTransparency = 1
  47. TextLabel.BorderSizePixel = 0
  48. TextLabel.Position = UDim2.new(0.0768115819, 0, 0.068296887, 0)
  49. TextLabel.Size = UDim2.new(0.842857122, 0, 0.0322580636, 0)
  50. TextLabel.Font = Enum.Font.SourceSansSemibold
  51. TextLabel.Text = "Made by T3aMp0isoN on v3rm"
  52. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  53. TextLabel.TextScaled = true
  54. TextLabel.TextSize = 14
  55. TextLabel.TextWrapped = true
  56.  
  57. TextLabel_2.Parent = Main
  58. TextLabel_2.BackgroundColor3 = Color3.new(1, 1, 1)
  59. TextLabel_2.BackgroundTransparency = 1
  60. TextLabel_2.BorderSizePixel = 0
  61. TextLabel_2.Position = UDim2.new(0.0434782468, 0, 0.0118953418, 0)
  62. TextLabel_2.Size = UDim2.new(0.90476191, 0, 0.0569259971, 0)
  63. TextLabel_2.Font = Enum.Font.SourceSansSemibold
  64. TextLabel_2.Text = "Zombie Attack Menu"
  65. TextLabel_2.TextColor3 = Color3.new(1, 1, 1)
  66. TextLabel_2.TextScaled = true
  67. TextLabel_2.TextSize = 14
  68. TextLabel_2.TextWrapped = true
  69.  
  70. Frame.Parent = Main
  71. Frame.BackgroundColor3 = Color3.new(0.0156863, 0.0156863, 0.0156863)
  72. Frame.BackgroundTransparency = 0.5
  73. Frame.BorderSizePixel = 0
  74. Frame.Position = UDim2.new(0, 0, 0.111954458, 0)
  75. Frame.Size = UDim2.new(1, 0, 0.0417457297, 0)
  76.  
  77. TextLabel_3.Parent = Frame
  78. TextLabel_3.BackgroundColor3 = Color3.new(1, 1, 1)
  79. TextLabel_3.BackgroundTransparency = 1
  80. TextLabel_3.BorderSizePixel = 0
  81. TextLabel_3.Position = UDim2.new(0.0434782468, 0, 0.181818187, 0)
  82. TextLabel_3.Size = UDim2.new(0.90476191, 0, 0.590909064, 0)
  83. TextLabel_3.Font = Enum.Font.SourceSansSemibold
  84. TextLabel_3.Text = "Console"
  85. TextLabel_3.TextColor3 = Color3.new(1, 1, 1)
  86. TextLabel_3.TextScaled = true
  87. TextLabel_3.TextSize = 14
  88. TextLabel_3.TextWrapped = true
  89. TextLabel_3.TextXAlignment = Enum.TextXAlignment.Left
  90.  
  91. ConsoleFrame.Name = "ConsoleFrame"
  92. ConsoleFrame.Parent = Main
  93. ConsoleFrame.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863)
  94. ConsoleFrame.BackgroundTransparency = 0.5
  95. ConsoleFrame.BorderSizePixel = 0
  96. ConsoleFrame.Position = UDim2.new(0, 0, 0.153700188, 0)
  97. ConsoleFrame.Size = UDim2.new(1, 0, 0.0967741907, 0)
  98.  
  99. Console.Name = "Console"
  100. Console.Parent = ConsoleFrame
  101. Console.BackgroundColor3 = Color3.new(1, 1, 1)
  102. Console.BackgroundTransparency = 1
  103. Console.BorderSizePixel = 0
  104. Console.Position = UDim2.new(0.0387163423, 0, 0.117647059, 0)
  105. Console.Size = UDim2.new(0.909523785, 0, 0.764705896, 0)
  106. Console.Font = Enum.Font.SourceSans
  107. Console.Text = "Status: Ready to use\n\n"
  108. Console.TextColor3 = Color3.new(0.333333, 1, 0)
  109. Console.TextScaled = true
  110. Console.TextSize = 14
  111. Console.TextWrapped = true
  112. Console.TextXAlignment = Enum.TextXAlignment.Left
  113. Console.TextYAlignment = Enum.TextYAlignment.Top
  114.  
  115. Frame_2.Parent = Main
  116. Frame_2.BackgroundColor3 = Color3.new(0.0156863, 0.0156863, 0.0156863)
  117. Frame_2.BackgroundTransparency = 0.5
  118. Frame_2.BorderSizePixel = 0
  119. Frame_2.Position = UDim2.new(0, 0, 0.250474393, 0)
  120. Frame_2.Size = UDim2.new(0.995238066, 0, 0.0417457297, 0)
  121.  
  122. TextLabel_4.Parent = Frame_2
  123. TextLabel_4.BackgroundColor3 = Color3.new(1, 1, 1)
  124. TextLabel_4.BackgroundTransparency = 1
  125. TextLabel_4.BorderSizePixel = 0
  126. TextLabel_4.Position = UDim2.new(0.0482401513, 0, 0.181818187, 0)
  127. TextLabel_4.Size = UDim2.new(0.904306233, 0, 0.590909064, 0)
  128. TextLabel_4.Font = Enum.Font.SourceSansSemibold
  129. TextLabel_4.Text = "Main Mods"
  130. TextLabel_4.TextColor3 = Color3.new(1, 1, 1)
  131. TextLabel_4.TextScaled = true
  132. TextLabel_4.TextSize = 14
  133. TextLabel_4.TextWrapped = true
  134. TextLabel_4.TextXAlignment = Enum.TextXAlignment.Left
  135.  
  136. Frame_3.Parent = Main
  137. Frame_3.BackgroundColor3 = Color3.new(0.0156863, 0.0156863, 0.0156863)
  138. Frame_3.BackgroundTransparency = 0.5
  139. Frame_3.BorderSizePixel = 0
  140. Frame_3.Position = UDim2.new(0, 0, 0.455407977, 0)
  141. Frame_3.Size = UDim2.new(1, 0, 0.0417457297, 0)
  142.  
  143. TextLabel_5.Parent = Frame_3
  144. TextLabel_5.BackgroundColor3 = Color3.new(1, 1, 1)
  145. TextLabel_5.BackgroundTransparency = 1
  146. TextLabel_5.BorderSizePixel = 0
  147. TextLabel_5.Position = UDim2.new(0.0434782468, 0, 0.181818187, 0)
  148. TextLabel_5.Size = UDim2.new(0.90476191, 0, 0.590909064, 0)
  149. TextLabel_5.Font = Enum.Font.SourceSansSemibold
  150. TextLabel_5.Text = "Weapon Mods"
  151. TextLabel_5.TextColor3 = Color3.new(1, 1, 1)
  152. TextLabel_5.TextScaled = true
  153. TextLabel_5.TextSize = 14
  154. TextLabel_5.TextWrapped = true
  155. TextLabel_5.TextXAlignment = Enum.TextXAlignment.Left
  156.  
  157. Frame_4.Parent = Main
  158. Frame_4.BackgroundColor3 = Color3.new(0.0156863, 0.0156863, 0.0156863)
  159. Frame_4.BackgroundTransparency = 0.5
  160. Frame_4.BorderSizePixel = 0
  161. Frame_4.Position = UDim2.new(0, 0, 0.65464896, 0)
  162. Frame_4.Size = UDim2.new(0.995238066, 0, 0.0417457297, 0)
  163.  
  164. TextLabel_6.Parent = Frame_4
  165. TextLabel_6.BackgroundColor3 = Color3.new(1, 1, 1)
  166. TextLabel_6.BackgroundTransparency = 1
  167. TextLabel_6.BorderSizePixel = 0
  168. TextLabel_6.Position = UDim2.new(0.0482401513, 0, 0.18181771, 0)
  169. TextLabel_6.Size = UDim2.new(0.909090936, 0, 0.590909064, 0)
  170. TextLabel_6.Font = Enum.Font.SourceSansSemibold
  171. TextLabel_6.Text = "Local Player Mods"
  172. TextLabel_6.TextColor3 = Color3.new(1, 1, 1)
  173. TextLabel_6.TextScaled = true
  174. TextLabel_6.TextSize = 14
  175. TextLabel_6.TextWrapped = true
  176. TextLabel_6.TextXAlignment = Enum.TextXAlignment.Left
  177.  
  178. KillPlatform.Name = "KillPlatform"
  179. KillPlatform.Parent = Main
  180. KillPlatform.BackgroundColor3 = Color3.new(1, 1, 1)
  181. KillPlatform.BackgroundTransparency = 1
  182. KillPlatform.Position = UDim2.new(0.0434782468, 0, 0.309297919, 0)
  183. KillPlatform.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  184. KillPlatform.Font = Enum.Font.SourceSansSemibold
  185. KillPlatform.Text = "Kill Platform "
  186. KillPlatform.TextColor3 = Color3.new(1, 1, 1)
  187. KillPlatform.TextScaled = true
  188. KillPlatform.TextSize = 14
  189. KillPlatform.TextWrapped = true
  190. KillPlatform.TextXAlignment = Enum.TextXAlignment.Left
  191.  
  192. StealKills.Name = "StealKills"
  193. StealKills.Parent = Main
  194. StealKills.BackgroundColor3 = Color3.new(1, 1, 1)
  195. StealKills.BackgroundTransparency = 1
  196. StealKills.Position = UDim2.new(0.0434782468, 0, 0.354838729, 0)
  197. StealKills.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  198. StealKills.Font = Enum.Font.SourceSansSemibold
  199. StealKills.Text = "Steal Kills"
  200. StealKills.TextColor3 = Color3.new(1, 1, 1)
  201. StealKills.TextScaled = true
  202. StealKills.TextSize = 14
  203. StealKills.TextWrapped = true
  204. StealKills.TextXAlignment = Enum.TextXAlignment.Left
  205.  
  206. AutoFarm.Name = "AutoFarm"
  207. AutoFarm.Parent = Main
  208. AutoFarm.BackgroundColor3 = Color3.new(1, 1, 1)
  209. AutoFarm.BackgroundTransparency = 1
  210. AutoFarm.Position = UDim2.new(0.0434782468, 0, 0.400379539, 0)
  211. AutoFarm.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  212. AutoFarm.Font = Enum.Font.SourceSansSemibold
  213. AutoFarm.Text = "Auto Farm"
  214. AutoFarm.TextColor3 = Color3.new(1, 1, 1)
  215. AutoFarm.TextScaled = true
  216. AutoFarm.TextSize = 14
  217. AutoFarm.TextWrapped = true
  218. AutoFarm.TextXAlignment = Enum.TextXAlignment.Left
  219.  
  220. NoRecoil.Name = "NoRecoil"
  221. NoRecoil.Parent = Main
  222. NoRecoil.BackgroundColor3 = Color3.new(1, 1, 1)
  223. NoRecoil.BackgroundTransparency = 1
  224. NoRecoil.Position = UDim2.new(0.0434782468, 0, 0.510436416, 0)
  225. NoRecoil.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  226. NoRecoil.Font = Enum.Font.SourceSansSemibold
  227. NoRecoil.Text = "No Recoil"
  228. NoRecoil.TextColor3 = Color3.new(1, 1, 1)
  229. NoRecoil.TextScaled = true
  230. NoRecoil.TextSize = 14
  231. NoRecoil.TextWrapped = true
  232. NoRecoil.TextXAlignment = Enum.TextXAlignment.Left
  233.  
  234. Guns.Name = "Guns"
  235. Guns.Parent = Main
  236. Guns.BackgroundColor3 = Color3.new(1, 1, 1)
  237. Guns.BackgroundTransparency = 1
  238. Guns.Position = UDim2.new(0.0434782468, 0, 0.555977225, 0)
  239. Guns.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  240. Guns.Font = Enum.Font.SourceSansSemibold
  241. Guns.Text = "Equip All Guns"
  242. Guns.TextColor3 = Color3.new(1, 1, 1)
  243. Guns.TextScaled = true
  244. Guns.TextSize = 14
  245. Guns.TextWrapped = true
  246. Guns.TextXAlignment = Enum.TextXAlignment.Left
  247.  
  248. Knifes.Name = "Knifes"
  249. Knifes.Parent = Main
  250. Knifes.BackgroundColor3 = Color3.new(1, 1, 1)
  251. Knifes.BackgroundTransparency = 1
  252. Knifes.Position = UDim2.new(0.0434782468, 0, 0.603415549, 0)
  253. Knifes.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  254. Knifes.Font = Enum.Font.SourceSansSemibold
  255. Knifes.Text = "Equip All Knifes "
  256. Knifes.TextColor3 = Color3.new(1, 1, 1)
  257. Knifes.TextScaled = true
  258. Knifes.TextSize = 14
  259. Knifes.TextWrapped = true
  260. Knifes.TextXAlignment = Enum.TextXAlignment.Left
  261.  
  262. Fly.Name = "Fly"
  263. Fly.Parent = Main
  264. Fly.BackgroundColor3 = Color3.new(1, 1, 1)
  265. Fly.BackgroundTransparency = 1
  266. Fly.Position = UDim2.new(0.0434782468, 0, 0.709677398, 0)
  267. Fly.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  268. Fly.Font = Enum.Font.SourceSansSemibold
  269. Fly.Text = "Toggle Flying Mode"
  270. Fly.TextColor3 = Color3.new(1, 1, 1)
  271. Fly.TextScaled = true
  272. Fly.TextSize = 14
  273. Fly.TextWrapped = true
  274. Fly.TextXAlignment = Enum.TextXAlignment.Left
  275.  
  276. Noclip.Name = "Noclip"
  277. Noclip.Parent = Main
  278. Noclip.BackgroundColor3 = Color3.new(1, 1, 1)
  279. Noclip.BackgroundTransparency = 1
  280. Noclip.Position = UDim2.new(0.0434782468, 0, 0.755218208, 0)
  281. Noclip.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  282. Noclip.Font = Enum.Font.SourceSansSemibold
  283. Noclip.Text = "Toggle NoClip"
  284. Noclip.TextColor3 = Color3.new(1, 1, 1)
  285. Noclip.TextScaled = true
  286. Noclip.TextSize = 14
  287. Noclip.TextWrapped = true
  288. Noclip.TextXAlignment = Enum.TextXAlignment.Left
  289.  
  290. Gravity.Name = "Gravity"
  291. Gravity.Parent = Main
  292. Gravity.BackgroundColor3 = Color3.new(1, 1, 1)
  293. Gravity.BackgroundTransparency = 1
  294. Gravity.Position = UDim2.new(0.0387163423, 0, 0.802656531, 0)
  295. Gravity.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  296. Gravity.Font = Enum.Font.SourceSansSemibold
  297. Gravity.Text = "Low Gravity"
  298. Gravity.TextColor3 = Color3.new(1, 1, 1)
  299. Gravity.TextScaled = true
  300. Gravity.TextSize = 14
  301. Gravity.TextWrapped = true
  302. Gravity.TextXAlignment = Enum.TextXAlignment.Left
  303.  
  304. Speed.Name = "Speed"
  305. Speed.Parent = Main
  306. Speed.BackgroundColor3 = Color3.new(1, 1, 1)
  307. Speed.BackgroundTransparency = 1
  308. Speed.Position = UDim2.new(0.0387163423, 0, 0.851992369, 0)
  309. Speed.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  310. Speed.Font = Enum.Font.SourceSansSemibold
  311. Speed.Text = "Super Speed"
  312. Speed.TextColor3 = Color3.new(1, 1, 1)
  313. Speed.TextScaled = true
  314. Speed.TextSize = 14
  315. Speed.TextWrapped = true
  316. Speed.TextXAlignment = Enum.TextXAlignment.Left
  317.  
  318. Jump.Name = "Jump"
  319. Jump.Parent = Main
  320. Jump.BackgroundColor3 = Color3.new(1, 1, 1)
  321. Jump.BackgroundTransparency = 1
  322. Jump.Position = UDim2.new(0.0434782468, 0, 0.899430692, 0)
  323. Jump.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  324. Jump.Font = Enum.Font.SourceSansSemibold
  325. Jump.Text = "Super Jump"
  326. Jump.TextColor3 = Color3.new(1, 1, 1)
  327. Jump.TextScaled = true
  328. Jump.TextSize = 14
  329. Jump.TextWrapped = true
  330. Jump.TextXAlignment = Enum.TextXAlignment.Left
  331.  
  332. Btools.Name = "Btools"
  333. Btools.Parent = Main
  334. Btools.BackgroundColor3 = Color3.new(1, 1, 1)
  335. Btools.BackgroundTransparency = 1
  336. Btools.Position = UDim2.new(0.0434782468, 0, 0.946869016, 0)
  337. Btools.Size = UDim2.new(0.90476191, 0, 0.034155596, 0)
  338. Btools.Font = Enum.Font.SourceSansSemibold
  339. Btools.Text = "B-Tools"
  340. Btools.TextColor3 = Color3.new(1, 1, 1)
  341. Btools.TextScaled = true
  342. Btools.TextSize = 14
  343. Btools.TextWrapped = true
  344. Btools.TextXAlignment = Enum.TextXAlignment.Left
  345. -- scripts
  346. Fly.MouseButton1Click:Connect(function()
  347. Console.Text = ("Press E to activate and deactivate flying mode\n\n ")
  348. wait(0.2)
  349. loadstring(game:HttpGet(('https://pastebin.com/raw/7rXZ9VNc'),true))()
  350. wait(5)
  351. Console.Text = ("Status: Ready To Use\n\n")
  352. end)
  353.  
  354. Noclip.MouseButton1Click:connect(function()
  355. if Console.Text == "Toggle NoClip" then
  356. noclip = true
  357. Console.Text = "Toggle NoClip: On"
  358. Console.TextColor3 = Color3.new(0,185,0)
  359. game:GetService('RunService').Stepped:connect(function()
  360. if noclip then
  361. game.Players.LocalPlayer.Character.Humanoid:ChangeState(11)
  362. end
  363. end)
  364. elseif Console.Text == "Toggle NoClip: On" then
  365. noclip = false
  366. Console.Text = "Toggle NoClip: Off"
  367. Console.TextColor3 = Color3.new(170,0,0)
  368. elseif Console.Text == "Toggle NoClip: On" then
  369. noclip = true
  370. Console.Text = "Toggle NoClip: On"
  371. Console.TextColor3 = Color3.new(0,185,0)
  372. end
  373. end)
  374.  
  375. Knifes.MouseButton1Click:connect(function()
  376. for _,Thing in pairs(game.ReplicatedStorage.Knives:GetChildren()) do
  377. if Thing:IsA("Tool") then
  378. Thing.Parent = game.Players.LocalPlayer.Backpack
  379. end
  380. end
  381. end)
  382.  
  383. Guns.MouseButton1Click:connect(function()
  384. for _,Thing in pairs(game.ReplicatedStorage.Guns:GetChildren()) do
  385. if Thing:IsA("Tool") then
  386. Thing.Parent = game.Players.LocalPlayer.Backpack
  387. end
  388. end
  389. end)
  390.  
  391. KillPlatform.MouseButton1Click:connect(function()
  392. plr = game:service'Players'.LocalPlayer
  393. char = plr.Character
  394. root = char.HumanoidRootPart
  395. iszombie = false
  396.  
  397. platform = Instance.new('Part', workspace)
  398. platform.Size = Vector3.new(100,0,100)
  399. platform.Anchored = true
  400. platform.Position = Vector3.new(555,555,555)
  401. root.CFrame = platform.CFrame * CFrame.new(0,4,0)
  402.  
  403. if workspace:FindFirstChild(plr.Name) then
  404. iszombie = false
  405. warn'You are not a zombie!'
  406. else
  407. iszombie = true
  408. warn'You are a zombie!'
  409. end
  410.  
  411. wait(.5)
  412.  
  413. if not iszombie then
  414. for _, a in pairs(workspace.enemies:children()) do
  415. for _, b in pairs(a:children()) do
  416. if b:IsA'Part' then
  417. b.Anchored = true
  418. b.CFrame = root.CFrame * CFrame.new(2,0,2)
  419. end
  420. end
  421. end
  422. elseif iszombie then
  423. for _, a in pairs(game:service'Players':GetPlayers()) do
  424. if a.Character then
  425. for _, b in pairs(a.Character:children()) do
  426. if b:IsA'Part' and a.Name ~= plr.Name then
  427. b.Anchored = true
  428. b.CFrame = root.CFrame * CFrame.new(2,0,2)
  429. end
  430. end
  431. end
  432. end
  433. end
  434. end)
  435.  
  436. Speed.MouseButton1Click:connect(function()
  437. plr = game:service'Players'.LocalPlayer
  438. char = plr.Character
  439. hum = char:FindFirstChildOfClass'Humanoid'
  440.  
  441. hum.WalkSpeed = 60
  442.  
  443. end)
  444.  
  445. Jump.MouseButton1Click:connect(function()
  446. plr = game:service'Players'.LocalPlayer
  447. char = plr.Character
  448. hum = char:FindFirstChildOfClass'Humanoid'
  449.  
  450. hum.JumpPower = 100
  451. end)
  452.  
  453. AutoFarm.MouseButton1Click:connect(function()
  454. local groundDistance = 8
  455. local Player = game:GetService("Players").LocalPlayer
  456. local function getNearest()
  457. local nearest, dist = nil, 99999
  458. for _,v in pairs(game.Workspace.BossFolder:GetChildren()) do
  459. if(v:FindFirstChild("Head")~=nil)then
  460. local m =(Player.Character.Head.Position-v.Head.Position).magnitude
  461. if(m<dist)then
  462. dist = m
  463. nearest = v
  464. end
  465. end
  466. end
  467. for _,v in pairs(game.Workspace.enemies:GetChildren()) do
  468. if(v:FindFirstChild("Head")~=nil)then
  469. local m =(Player.Character.Head.Position-v.Head.Position).magnitude
  470. if(m<dist)then
  471. dist = m
  472. nearest = v
  473. end
  474. end
  475. end
  476. return nearest
  477. end
  478. _G.farm2 = true
  479. Player.Chatted:Connect(function(m)
  480. if(m==";autofarm false")then
  481. _G.farm2 = false
  482. elseif(m==";autofarm true")then
  483. _G.farm2 = true
  484. end
  485. end)
  486. _G.globalTarget = nil
  487. game:GetService("RunService").RenderStepped:Connect(function()
  488. if(_G.farm2==true)then
  489. local target = getNearest()
  490. if(target~=nil)then
  491. game:GetService("Workspace").CurrentCamera.CFrame = CFrame.new(game:GetService("Workspace").CurrentCamera.CFrame.p, target.Head.Position)
  492. Player.Character.HumanoidRootPart.CFrame = (target.HumanoidRootPart.CFrame * CFrame.new(0, groundDistance, 9))
  493. _G.globalTarget = target
  494. end
  495. end
  496. end)
  497. spawn(function()
  498. while wait() do
  499. game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  500. game.Players.LocalPlayer.Character.Torso.Velocity = Vector3.new(0,0,0)
  501. end
  502. end)
  503. while wait() do
  504. if(_G.farm2==true and _G.globalTarget~=nil and _G.globalTarget:FindFirstChild("Head") and Player.Character:FindFirstChildOfClass("Tool"))then
  505. local target = _G.globalTarget
  506. game.ReplicatedStorage.Gun:FireServer({["Normal"] = Vector3.new(0, 0, 0), ["Direction"] = target.Head.Position, ["Name"] = Player.Character:FindFirstChildOfClass("Tool").Name, ["Hit"] = target.Head, ["Origin"] = target.Head.Position, ["Pos"] = target.Head.Position,})
  507. wait()
  508. end
  509. end
  510. end)
  511.  
  512. Btools.MouseButton1Click:connect(function()
  513. loadstring(game:HttpGet("https://pastebin.com/raw/T0qaXjAR", true))()
  514. end)
  515.  
  516. Gravity.MouseButton1Click:connect(function()
  517. game.Workspace.Gravity = 5
  518. end)
Add Comment
Please, Sign In to add comment