Advertisement
SAOI

Zombie Attack

Jan 11th, 2022
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.21 KB | None | 0 0
  1.  
  2. -- MADE BY SAOIDER
  3. -- PLEASE SUBSCRIBE
  4. --NOTE ALL SCRIPTS ARE NOT MINE
  5. --CREDIT TO ALL SCRIPT OWNERS
  6. local ScreenGui = Instance.new("ScreenGui")
  7. local OpenF = Instance.new("Frame")
  8. local OpenB = Instance.new("TextButton")
  9. local MainF = Instance.new("Frame")
  10. local Title = Instance.new("TextLabel")
  11. local AutoFarm = Instance.new("TextButton")
  12. local Noclip = Instance.new("TextButton")
  13. local WalkSpeed = Instance.new("TextButton")
  14. local Close = Instance.new("TextButton")
  15.  
  16.  
  17. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  18. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  19. ScreenGui.Parent = game.CoreGui
  20.  
  21. OpenF.Name = "OpenF"
  22. OpenF.Parent = ScreenGui
  23. OpenF.Active = true
  24. OpenF.BackgroundColor3 = Color3.new(0, 0, 0)
  25. OpenF.BackgroundTransparency = 0.40000000596046
  26. OpenF.Position = UDim2.new(0.92768085, 0, 0.626178563, 0)
  27. OpenF.Size = UDim2.new(0, 98, 0, 28)
  28.  
  29. OpenB.Name = "OpenB"
  30. OpenB.Parent = OpenF
  31. OpenB.BackgroundColor3 = Color3.new(1, 1, 1)
  32. OpenB.BackgroundTransparency = 1
  33. OpenB.Position = UDim2.new(0.0102040814, 0, 0.0357142873, 0)
  34. OpenB.Size = UDim2.new(0, 103, 0, 25)
  35. OpenB.Font = Enum.Font.Gotham
  36. OpenB.Text = "Open"
  37. OpenB.TextColor3 = Color3.new(1, 1, 1)
  38. OpenB.TextSize = 14
  39. OpenB.MouseButton1Click:connect(function()
  40. OpenF.Visible = false
  41. MainF.Visible = true
  42. end)
  43.  
  44. MainF.Name = "MainF"
  45. MainF.Parent = ScreenGui
  46. MainF.Active = true
  47. MainF.BackgroundColor3 = Color3.new(0, 0, 0)
  48. MainF.BackgroundTransparency = 0.40000000596046
  49. MainF.Position = UDim2.new(0.369627506, 0, 0.30831641, 0)
  50. MainF.Size = UDim2.new(0, 170, 0, 224)
  51. MainF.Draggable = True
  52.  
  53. Title.Name = "Title"
  54. Title.Parent = MainF
  55. Title.Active = true
  56. Title.BackgroundColor3 = Color3.new(0, 0, 0)
  57. Title.BackgroundTransparency = 0.40000000596046
  58. Title.Size = UDim2.new(0, 170, 0, 30)
  59. Title.Font = Enum.Font.GothamBold
  60. Title.Text = "Attack On Zombies"
  61. Title.TextColor3 = Color3.new(1, 1, 1)
  62. Title.TextSize = 14
  63.  
  64. AutoFarm.Name = "AutoFarm"
  65. AutoFarm.Parent = MainF
  66. AutoFarm.BackgroundColor3 = Color3.new(0, 0, 0)
  67. AutoFarm.BackgroundTransparency = 0.40000000596046
  68. AutoFarm.Position = UDim2.new(0.0588235334, 0, 0.214285731, 0)
  69. AutoFarm.Size = UDim2.new(0, 150, 0, 26)
  70. AutoFarm.Font = Enum.Font.Gotham
  71. AutoFarm.Text = "Auto Farm"
  72. AutoFarm.TextColor3 = Color3.new(1, 1, 1)
  73. AutoFarm.TextSize = 14
  74. AutoFarm.MouseButton1Click:connect(function()
  75.     local groundDistance = 0
  76. local Player = game:GetService("Players").LocalPlayer
  77. local function getNearest()
  78. local nearest, dist = nil, 99999
  79. for _,v in pairs(game.Workspace.BossFolder:GetChildren()) do
  80. if(v:FindFirstChild("Head")~=nil)then
  81. local m =(Player.Character.Head.Position-v.Head.Position).magnitude
  82. if(m<dist)then
  83. dist = m
  84. nearest = v
  85. end
  86. end
  87. end
  88. for _,v in pairs(game.Workspace.enemies:GetChildren()) do
  89. if(v:FindFirstChild("Head")~=nil)then
  90. local m =(Player.Character.Head.Position-v.Head.Position).magnitude
  91. if(m<dist)then
  92. dist = m
  93. nearest = v
  94. end
  95. end
  96. end
  97. return nearest
  98. end
  99. _G.farm2 = true
  100. Player.Chatted:Connect(function(m)
  101. if(m==";autofarm false")then
  102. _G.farm2 = false
  103. elseif(m==";autofarm true")then
  104. _G.farm2 = true
  105. end
  106. end)
  107. _G.globalTarget = nil
  108. game:GetService("RunService").RenderStepped:Connect(function()
  109. if(_G.farm2==true)then
  110. local target = getNearest()
  111. if(target~=nil)then
  112. game:GetService("Workspace").CurrentCamera.CFrame = CFrame.new(game:GetService("Workspace").CurrentCamera.CFrame.p, target.Head.Position)
  113. Player.Character.HumanoidRootPart.CFrame = (target.HumanoidRootPart.CFrame * CFrame.new(0, groundDistance, 9))
  114. _G.globalTarget = target
  115. end
  116. end
  117. end)
  118. spawn(function()
  119. while wait() do
  120. game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  121. game.Players.LocalPlayer.Character.Torso.Velocity = Vector3.new(0,0,0)
  122. end
  123. end)
  124. while wait() do
  125. if(_G.farm2==true and _G.globalTarget~=nil and _G.globalTarget:FindFirstChild("Head") and Player.Character:FindFirstChildOfClass("Tool"))then
  126. local target = _G.globalTarget
  127. 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,})
  128. wait()
  129. end
  130. end
  131. end)
  132.  
  133. Noclip.Name = "Noclip"
  134. Noclip.Parent = MainF
  135. Noclip.BackgroundColor3 = Color3.new(0, 0, 0)
  136. Noclip.BackgroundTransparency = 0.40000000596046
  137. Noclip.Position = UDim2.new(0.0588235334, 0, 0.504464269, 0)
  138. Noclip.Size = UDim2.new(0, 150, 0, 26)
  139. Noclip.Font = Enum.Font.Gotham
  140. Noclip.Text = "Noclip [\"n\"]"
  141. Noclip.TextColor3 = Color3.new(1, 1, 1)
  142. Noclip.TextSize = 14
  143. Noclip.MouseButton1Click:connect(function()
  144.     local plr = game:service'Players'.LocalPlayer
  145. local char = plr.Character
  146. local hum = char:FindFirstChildOfClass'Humanoid'
  147. local mouse = plr:GetMouse()
  148. on = false
  149.  
  150. mouse.KeyDown:connect(function(key)
  151.     if key == "n" then
  152.         if not on then
  153.             on = true
  154.         elseif on then
  155.             on = false
  156.         end
  157.     end
  158. end)
  159.  
  160. while wait() do
  161.     if char then
  162.         hum = char:FindFirstChildOfClass'Humanoid'
  163.     end
  164.     if on then
  165.         hum:ChangeState(11)
  166.     end
  167. end
  168.  
  169. end)
  170.  
  171. WalkSpeed.Name = "AutoEquip"
  172. WalkSpeed.Parent = MainF
  173. WalkSpeed.BackgroundColor3 = Color3.new(0, 0, 0)
  174. WalkSpeed.BackgroundTransparency = 0.40000000596046
  175. WalkSpeed.Position = UDim2.new(0.0588235334, 0, 0.8125, 0)
  176. WalkSpeed.Size = UDim2.new(0, 150, 0, 26)
  177. WalkSpeed.Font = Enum.Font.Gotham
  178. WalkSpeed.Text = "AutoEquip"
  179. WalkSpeed.TextColor3 = Color3.new(1, 1, 1)
  180. WalkSpeed.TextSize = 14
  181. WalkSpeed.MouseButton1Click:connect(function()
  182.     Weapon = "Pistol"
  183. while wait() do
  184. pcall(function()
  185. game.Players.LocalPlayer.Character.Humanoid:EquipTool(game:GetService("Players").LocalPlayer.Backpack:FindFirstChild(Weapon))
  186. end)
  187. end
  188. end)
  189.  
  190.  
  191.  
  192. Close.Name = "Close"
  193. Close.Parent = MainF
  194. Close.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
  195. Close.BackgroundTransparency = 1
  196. Close.Position = UDim2.new(0.841176391, 0, -0.0223214328, 0)
  197. Close.Size = UDim2.new(0, 27, 0, 39)
  198. Close.Font = Enum.Font.SourceSans
  199. Close.Text = "X"
  200. Close.TextColor3 = Color3.new(1, 0, 0.0156863)
  201. Close.TextSize = 48
  202. Close.MouseButton1Click:connect(function()
  203.     MainF.Visible = false
  204.     OpenF.Visible = true
  205. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement