Advertisement
Guest User

Roblox aimbot GUI

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