sasod35

殭屍攻擊Zombie Attack Lightux 腳本

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