Advertisement
ExodiaForce

npc triggerbot

Nov 9th, 2024 (edited)
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. local on = true
  2. local holdingrmb = false
  3. local currenttarget = nil
  4. local whitelistedname = ""
  5. local rep = game.Players.LocalPlayer:GetAttribute("Reputation")
  6. local ui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
  7. ui.IgnoreGuiInset = true
  8. local t = Instance.new("TextLabel",ui)
  9. t.Size = UDim2.fromOffset(60,25)
  10. t.Position = UDim2.fromScale(0.5,0.525)
  11. t.AnchorPoint = Vector2.new(0.5,0.5)
  12. t.TextColor3 = Color3.new(1,1,1)
  13. t.TextScaled = true
  14. t.BackgroundTransparency=0.8
  15. t.TextTransparency = 0.25
  16. t.BackgroundColor3 = Color3.new(0,0,0)
  17. local t2 = Instance.new("TextLabel",ui)
  18. t2.Size = UDim2.fromOffset(60,25)
  19. t2.Position = UDim2.fromScale(0.5,0.54)
  20. t2.AnchorPoint = Vector2.new(0.5,0.5)
  21. t2.TextColor3 = Color3.new(1,1,1)
  22. t2.TextScaled = true
  23. t2.BackgroundTransparency=0.8
  24. t2.TextTransparency = 0.25
  25. t2.BackgroundColor3 = Color3.new(0,0,0)
  26.  
  27. if rep > 0 then
  28. whitelistedname = "Rebel"
  29. elseif rep < 0 then
  30. whitelistedname = "Vulture"
  31. else
  32. whitelistedname = "Blah Blah just some random name nothing will have"
  33. end
  34. game.UserInputService.InputBegan:Connect(function(i)
  35. if i.KeyCode == Enum.KeyCode.RightAlt then
  36. ui.Enabled = not ui.Enabled
  37. end
  38. if i.UserInputType == Enum.UserInputType.MouseButton2 then
  39. holdingrmb = true
  40. end
  41. if i.KeyCode == Enum.KeyCode.RightBracket then
  42. on = not on
  43. print("Triggerbot Status: "..tostring(on))
  44. end
  45. if i.KeyCode == Enum.KeyCode.R then
  46. currenttarget = nil
  47. end
  48. end)
  49. game.UserInputService.InputEnded:Connect(function(i)
  50. if i.UserInputType == Enum.UserInputType.MouseButton2 then
  51. holdingrmb = false
  52. end
  53. end)
  54. game:GetService("RunService").RenderStepped:Connect(function()
  55. if not holdingrmb then currenttarget = nil end
  56. t.Text = tostring(on)
  57. if currenttarget == nil then
  58. t2.Text = "No Target"
  59. else
  60. t2.Text = currenttarget.Name
  61. end
  62. if on then
  63. local m = game.Players.LocalPlayer:GetMouse()
  64. local h = m.Target
  65. if h then
  66. local m = h:FindFirstAncestorOfClass("Model")
  67. if m then
  68. if m:FindFirstChildOfClass("Humanoid") and not game.Players:FindFirstChild(m.Name) and not m:FindFirstAncestor("Other") and not string.find(m.Name,whitelistedname) and not string.find(m.Name,"Broker") and not string.find(m.Name,"Merchant") then
  69. if m:FindFirstChildOfClass("Humanoid").Health > 0 then
  70. currenttarget = m
  71.  
  72. end
  73. end
  74. end
  75. end
  76. end
  77. if currenttarget ~= nil and on and holdingrmb then
  78. workspace.CurrentCamera.CFrame = CFrame.lookAt(workspace.CurrentCamera.CFrame.Position,currenttarget:FindFirstChild("Head").Position)
  79. mouse1click()
  80. if currenttarget.Humanoid.Health <= 0 then
  81. currenttarget = nil
  82. end
  83. else
  84. currenttarget = nil
  85. end
  86. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement