Advertisement
Error_IDK_Script

Aimbot

Jul 1st, 2021
84,629
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. -- Made by Error_IDK
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local ScreenGui = Instance.new("ScreenGui")
  7. local Aimbot = Instance.new("Frame")
  8. local Title = Instance.new("TextLabel")
  9. local Toggle = Instance.new("TextButton")
  10.  
  11. --Properties:
  12.  
  13. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  14. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  15.  
  16. Aimbot.Name = "Aimbot"
  17. Aimbot.Parent = ScreenGui
  18. Aimbot.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  19. Aimbot.Position = UDim2.new(0.0599842146, 0, 0.358722359, 0)
  20. Aimbot.Size = UDim2.new(0, 126, 0, 152)
  21.  
  22. Title.Name = "Title"
  23. Title.Parent = Aimbot
  24. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  25. Title.Size = UDim2.new(0, 126, 0, 50)
  26. Title.Font = Enum.Font.SourceSans
  27. Title.Text = "Aimbot (Made by Error_IDK)"
  28. Title.TextColor3 = Color3.fromRGB(0, 0, 0)
  29. Title.TextSize = 13.300
  30.  
  31. Toggle.Name = "Toggle"
  32. Toggle.Parent = Aimbot
  33. Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  34. Toggle.BorderSizePixel = 0
  35. Toggle.Position = UDim2.new(0, 0, 0.473684222, 0)
  36. Toggle.Size = UDim2.new(0, 126, 0, 50)
  37. Toggle.Font = Enum.Font.SourceSans
  38. Toggle.Text = "Off"
  39. Toggle.TextColor3 = Color3.fromRGB(255, 0, 0)
  40. Toggle.TextSize = 40.000
  41.  
  42. -- Scripts:
  43.  
  44. local function PNHLOYF_fake_script() -- Toggle.LocalScript
  45. local script = Instance.new('LocalScript', Toggle)
  46.  
  47. _G.aimbot = false
  48. local camera = game.Workspace.CurrentCamera
  49. local localplayer = game:GetService("Players").LocalPlayer
  50.  
  51. script.Parent.MouseButton1Click:Connect(function()
  52. if _G.aimbot == false then
  53. _G.aimbot = true
  54. script.Parent.TextColor3 = Color3.fromRGB(0,170,0)
  55. script.Parent.Text = "On"
  56. function closestplayer()
  57. local dist = math.huge -- math.huge means a really large number, 1M+.
  58. local target = nil --- nil means no value
  59. for i,v in pairs (game:GetService("Players"):GetPlayers()) do
  60. if v ~= localplayer then
  61. if v.Character and v.Character:FindFirstChild("Head") and _G.aimbot and v.Character.Humanoid.Health > 0 then --- creating the checks
  62. local magnitude = (v.Character.Head.Position - localplayer.Character.Head.Position).magnitude
  63. if magnitude < dist then
  64. dist = magnitude
  65. target = v
  66. end
  67.  
  68. end
  69. end
  70. end
  71. return target
  72. end
  73.  
  74. else
  75. _G.aimbot = false
  76. script.Parent.TextColor3 = Color3.fromRGB(255,0,0)
  77. script.Parent.Text = "Off"
  78. end
  79. end)
  80.  
  81. local settings = {
  82. keybind = Enum.UserInputType.MouseButton2
  83. }
  84.  
  85. local UIS = game:GetService("UserInputService")
  86. local aiming = false --- this toggle will make it so we lock on to the person when we press our keybind
  87.  
  88. UIS.InputBegan:Connect(function(inp)
  89. if inp.UserInputType == settings.keybind then
  90. aiming = true
  91. end
  92. end)
  93.  
  94. UIS.InputEnded:Connect(function(inp)
  95. if inp.UserInputType == settings.keybind then ---- when we stop pressing the keybind it would unlock off the player
  96. aiming = false
  97. end
  98. end)
  99.  
  100. game:GetService("RunService").RenderStepped:Connect(function()
  101. if aiming then
  102. camera.CFrame = CFrame.new(camera.CFrame.Position,closestplayer().Character.Head.Position) -- locks into the HEAD
  103. end
  104. end)
  105. end
  106. coroutine.wrap(PNHLOYF_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement