Advertisement
Guest User

New Gui For Zombie Attack! "Attack On Zombies""

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