Advertisement
captintalkalot1

aimbot for strucid

Feb 17th, 2022
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.56 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local MainGUI = Instance.new("Frame")
  3. local title = Instance.new("TextLabel")
  4. local credit = Instance.new("TextLabel")
  5. local aimbot = Instance.new("TextButton")
  6. local close = Instance.new("TextButton")
  7. local rules = Instance.new("TextLabel")
  8. local Frame = Instance.new("Frame")
  9. local open = Instance.new("TextButton")
  10. --Properties:
  11. ScreenGui.Parent = game.CoreGui
  12. MainGUI.Draggable = true
  13.  
  14. MainGUI.Name = "MainGUI"
  15. MainGUI.Parent = ScreenGui
  16. MainGUI.BackgroundColor3 = Color3.new(0.282353, 0.282353, 0.282353)
  17. MainGUI.BackgroundTransparency = 0.20000000298023
  18. MainGUI.BorderSizePixel = 0
  19. MainGUI.Position = UDim2.new(0.0944822654, 0, 0.380835354, 0)
  20. MainGUI.Size = UDim2.new(0, 194, 0, 209)
  21. MainGUI.Visible = false
  22.  
  23. title.Name = "title"
  24. title.Parent = MainGUI
  25. title.BackgroundColor3 = Color3.new(1, 0, 0)
  26. title.BorderSizePixel = 0
  27. title.Position = UDim2.new(-0.0463917516, 0, -0.0973782763, 0)
  28. title.Size = UDim2.new(0, 212, 0, 34)
  29. title.Font = Enum.Font.ArialBold
  30. title.Text = "Strucid Aimbot"
  31. title.TextColor3 = Color3.new(0, 0, 0)
  32. title.TextScaled = true
  33. title.TextSize = 14
  34. title.TextWrapped = true
  35.  
  36. credit.Name = "credit"
  37. credit.Parent = MainGUI
  38. credit.BackgroundColor3 = Color3.new(1, 0, 0)
  39. credit.BorderSizePixel = 0
  40. credit.Position = UDim2.new(-0.0463917516, 0, 0.966292143, 0)
  41. credit.Size = UDim2.new(0, 212, 0, 34)
  42. credit.Font = Enum.Font.GothamBold
  43. credit.Text = "Made By Vexus"
  44. credit.TextColor3 = Color3.new(0, 0, 0)
  45. credit.TextScaled = true
  46. credit.TextSize = 14
  47. credit.TextWrapped = true
  48.  
  49. aimbot.Name = "aimbot"
  50. aimbot.Parent = MainGUI
  51. aimbot.BackgroundColor3 = Color3.new(1, 0, 0)
  52. aimbot.BorderSizePixel = 0
  53. aimbot.Position = UDim2.new(0.12371134, 0, 0.411483258, 0)
  54. aimbot.Size = UDim2.new(0, 146, 0, 37)
  55. aimbot.Font = Enum.Font.SourceSansBold
  56. aimbot.Text = "AIMBOT"
  57. aimbot.TextColor3 = Color3.new(0, 0, 0)
  58. aimbot.TextScaled = true
  59. aimbot.TextSize = 14
  60. aimbot.TextWrapped = true
  61. aimbot.MouseButton1Down:connect(function()
  62. local IgnorePlayersNamed = {NAME=true} -- Name = true or false
  63. --[[
  64. [J] - To go down the list.
  65. [U] - To go up the list.
  66. [H] - To toggle that item in the list.
  67. [RMB] - To aim at your target using the current settings. (THIS UPDATES IN LIVE TIME SO YOU DON'T HAVE TO STOP AIMING FOR IT TO TAKE EFFECT)
  68. --]]
  69.  
  70. local services = setmetatable({
  71. World = game:GetService('Workspace');
  72. Players = game:GetService('Players');
  73. Input = game:GetService('UserInputService');
  74. Run = game:GetService('RunService');
  75. UI = game:GetService('StarterGui');
  76. },{
  77. __index = function(tab,index)
  78. local serv
  79. local ran,err = pcall(function() serv=game:service(index) end)
  80. if ran then
  81. tab[index] = serv
  82. return serv
  83. end
  84. end
  85. })
  86.  
  87. local cre = function(class,parent)
  88. local create = LoadLibrary('RbxUtility').Create
  89. return function(props)
  90. local inst = create(class)(props)
  91. inst.Parent = parent
  92.  
  93. return inst
  94. end
  95. end
  96.  
  97. local ResizeUI = function(ui,downscale,byclass)
  98. if not rawequal(ui['ClassName'],'ScrollingFrame') then print('This was mean\'t for scrolling frames.') return end
  99.  
  100. local count = 0;
  101. for __, asset in next, (ui:GetChildren()) do
  102. if rawequal(asset['ClassName'],byclass) then
  103. count = count + 1
  104. end
  105. end
  106.  
  107. ui['CanvasSize'] = UDim2.new(ui.CanvasSize.X.Scale,ui.CanvasSize.X.Offset,ui.CanvasSize.Y.Scale,downscale*count)
  108. end
  109.  
  110. local wfc, ffc, ffoc, cast, ray = services.World.WaitForChild, services.World.FindFirstChild, services.World.FindFirstChildOfClass, services.World.FindPartOnRayWithIgnoreList, Ray.new
  111. local wfcoc = function(p,class)
  112. local obj
  113. repeat services.Run.RenderStepped:wait()
  114. obj = p:FindFirstChildOfClass(class)
  115. until obj
  116. return obj
  117. end
  118.  
  119. local Client = services.Players.LocalPlayer
  120. local ClientUI = wfc(Client,'PlayerGui')
  121. local ClientMouse = Client:GetMouse()
  122. local ClientModel = Client.Character or Client.CharacterAdded:wait()
  123. local ClientCamera = services.World.CurrentCamera
  124. local ClientHumanoid = wfcoc(ClientModel,'Humanoid')
  125. local ClientActiveUI;
  126.  
  127. local status = {
  128. Enabled = false,
  129. TeamCheck = false,
  130. HeadsOnly = false,
  131. RayCheck = true,
  132. AutoAim = false,
  133. }
  134.  
  135. local function toggle(button)
  136. local option, val = button['Text']:match('(.*):%s*(.*)')
  137. status[option] = not status[option]
  138.  
  139. if status[option] then
  140. button.TextColor3 = Color3.fromRGB(0,255,0)
  141. else
  142. button.TextColor3 = Color3.fromRGB(255,0,0)
  143. end
  144. button.Text = option .. ': ' .. tostring(status[option])
  145. end
  146.  
  147. local selection = {}
  148. local select_pos = 1
  149. local current_pos = 0
  150. local __ = function()
  151. if ffc(game.CoreGui, '___') then return end
  152.  
  153. local GUI = cre('ScreenGui',game:GetService('CoreGui')){
  154. Name = '___';
  155. }
  156.  
  157. local Frame = cre('ScrollingFrame',GUI){
  158. BackgroundTransparency = 1,
  159. BorderSizePixel = 0,
  160.  
  161. Name = 'Options',
  162. Position = UDim2.new(.8,0,.915,0),
  163. Size = UDim2.new(.2,0,0,30),
  164. ZIndex = 10,
  165. ClipsDescendants = true,
  166. CanvasSize = UDim2.new(0,0,0,0),
  167. ScrollBarThickness = 0,
  168. ScrollingEnabled = false,
  169. }
  170.  
  171. local UILL = cre('UIListLayout',Frame){
  172. Name = 'LayoutHandler',
  173. FillDirection = 'Vertical',
  174. HorizontalAlignment = 'Center',
  175. SortOrder = 'LayoutOrder',
  176. VerticalAlignment = 'Top'
  177. }
  178.  
  179. local Template = cre('TextButton',nil){
  180. BackgroundTransparency = 1,
  181. BorderSizePixel = 0,
  182.  
  183. Name = 'Template',
  184. Size = UDim2.new(.9,0,0,30),
  185. Font = 'SciFi',
  186. Text = '',
  187. TextColor3 = Color3.fromRGB(255,255,255),
  188. TextScaled = true,
  189. TextWrapped = true,
  190. }
  191.  
  192. local TSC = cre('UISizeConstraint',Template){
  193. Name = 'TemplateSizeConstraint',
  194. MaxSize = Vector2.new(math.huge,30),
  195. }
  196.  
  197. Frame['ChildAdded']:connect(function()
  198. ResizeUI(Frame,30,'TextButton')
  199. end)
  200.  
  201. local sel_pos = 0
  202. for option, val in next, status do
  203. local tp = Template:Clone()
  204.  
  205. tp.Name = option
  206. tp.Text = option .. ': ' .. tostring(val)
  207.  
  208. if status[option] then
  209. tp.TextColor3 = Color3.fromRGB(0,255,0)
  210. else
  211. tp.TextColor3 = Color3.fromRGB(255,0,0)
  212. end
  213.  
  214. sel_pos = sel_pos + 1
  215. selection[sel_pos] = tp
  216. tp.Parent = Frame
  217. end
  218.  
  219. Frame.CanvasPosition = Vector2.new(0, current_pos)
  220. return Frame
  221. end
  222.  
  223. Client['CharacterAdded']:connect(function(c)
  224. ClientModel = c
  225. ClientHumanoid = wfcoc(ClientModel,'Humanoid')
  226. ClientActiveUI.Parent.Parent = nil
  227. ClientActiveUI = coroutine.wrap(__)()
  228. end)
  229. ClientActiveUI = coroutine.wrap(__)()
  230.  
  231. local right_down, keylogs, inputlogs = nil, {}, {}
  232. services.Input.InputBegan:connect(function(input, procc)
  233. keylogs[input.KeyCode],inputlogs[input.UserInputType] = true, true;
  234.  
  235. if not ClientActiveUI then return end
  236. if keylogs[Enum.KeyCode.U] and current_pos >= 30 then
  237. select_pos = select_pos - 1
  238. current_pos = current_pos - 30
  239. ClientActiveUI.CanvasPosition = Vector2.new(0,current_pos)
  240.  
  241. elseif keylogs[Enum.KeyCode.J] and current_pos < ClientActiveUI.CanvasSize.Y.Offset - 30 then
  242. select_pos = select_pos + 1
  243. current_pos = current_pos + 30
  244. ClientActiveUI.CanvasPosition = Vector2.new(0,current_pos)
  245.  
  246. elseif keylogs[Enum.KeyCode.H] then
  247. if selection[select_pos] then
  248. toggle(selection[select_pos])
  249. end
  250. end
  251. end)
  252. services.Input.InputEnded:connect(function(input, procc)
  253. keylogs[input.KeyCode],inputlogs[input.UserInputType] = false, false;
  254. end)
  255.  
  256. local function GetPlayerFromCharacter(mod)
  257. if not mod:IsA('Model') then return end
  258.  
  259. for __, client in next, services.Players:GetPlayers() do
  260. if rawequal(string.lower(client['Name']):sub(1,#mod['Name']),mod['Name']:lower()) then
  261. return client, client['Name']
  262. end
  263. end
  264. return nil, 'N/A'
  265. end
  266.  
  267. local function Search()
  268. local t = {}
  269. for __, child in next, services.World:GetChildren() do
  270. local UserFromCharacter = GetPlayerFromCharacter(child)
  271. if UserFromCharacter then
  272. if child:IsA('Model') and not rawequal(UserFromCharacter,Client) then
  273. local h = ffoc(child,'Humanoid')
  274. if h and h.Health > 0 then
  275. table.insert(t, {child,UserFromCharacter})
  276. end
  277. end
  278. end
  279. end
  280. return t
  281. end
  282.  
  283. local function cast_ray(p0,p1,blacklist)
  284. local Part
  285. local __=0
  286. repeat
  287. __=__+1
  288. local cond=(p1-p0).magnitude < 999
  289. Part,p0=cast(workspace,ray(p0,cond and p1-p0 or (p1-p0).unit*999),blacklist)
  290. if Part then
  291. if Part.CanCollide==false or Part.Transparency==1 then
  292. blacklist[#blacklist+1]=Part
  293. Part=nil
  294. end
  295. elseif cond or __ > 15 then
  296. break
  297. end
  298. until Part
  299. return Part,p0
  300. end
  301.  
  302. services.Run.RenderStepped:connect(function()
  303. local Storage = {}
  304. if status['Enabled'] and (inputlogs[Enum.UserInputType.MouseButton2] or status['AutoAim']) then
  305. Storage = Search()
  306.  
  307. local dot, face = -1
  308. for __, info in next, (Storage) do
  309. local h = ffc(info[1],'Humanoid')
  310. local skip;
  311.  
  312. if not inputlogs[Enum.UserInputType.MouseButton2] and not status['AutoAim'] then return end
  313. if not info[1] or not info[2] or IgnorePlayersNamed[info[2]['Name']] or ffoc(info[1],'ForceField') then skip = true end
  314. if not ffc(info[1],'HumanoidRootPart') then skip = true end
  315.  
  316. if h and h['Health'] > 0 then
  317. if status['TeamCheck'] then
  318. if Client['TeamColor'] == info[2]['TeamColor'] then
  319. skip = true
  320. end
  321. end
  322.  
  323. if not skip then
  324. local cc = ClientCamera.CFrame
  325. local pos = status['HeadsOnly'] and info[1]['HumanoidRootPart'].CFrame.p + Vector3.new(0,1.5,0) or info[1]['HumanoidRootPart'].Position
  326. local HitPart=cast_ray(cc.p,pos,{ClientCamera,ClientModel})
  327.  
  328. if not (status['RayCheck'] and HitPart) or info[1]:IsAncestorOf(HitPart) then
  329. local m = (pos-cc.p).unit:Dot(cc.lookVector)
  330. if rawequal(m,m) and m > dot then
  331. dot, face= m, pos
  332. end
  333. end
  334. end
  335. end
  336. end
  337. if face then
  338. ClientCamera.CFrame = CFrame.new(ClientCamera.CFrame.p,face) * CFrame.new(0,0,0.5)
  339. end
  340. end
  341. end)
  342. end)
  343.  
  344. close.Name = "close"
  345. close.Parent = MainGUI
  346. close.BackgroundColor3 = Color3.new(1, 0, 0)
  347. close.BorderSizePixel = 0
  348. close.Position = UDim2.new(0.876288652, 0, 0.062200956, 0)
  349. close.Size = UDim2.new(0, 24, 0, 30)
  350. close.Font = Enum.Font.GothamBold
  351. close.Text = "X"
  352. close.TextColor3 = Color3.new(0, 0, 0)
  353. close.TextScaled = true
  354. close.TextSize = 14
  355. close.TextWrapped = true
  356. close.MouseButton1Down:connect(function()
  357. open.Visible = true
  358. MainGUI.Visible = false
  359. end)
  360.  
  361. rules.Name = "rules"
  362. rules.Parent = MainGUI
  363. rules.BackgroundColor3 = Color3.new(1, 1, 1)
  364. rules.BackgroundTransparency = 1
  365. rules.BorderSizePixel = 0
  366. rules.Position = UDim2.new(0, 0, 0.645932853, 0)
  367. rules.Size = UDim2.new(0, 194, 0, 52)
  368. rules.Font = Enum.Font.GothamBold
  369. rules.Text = " [J] - To go down the list.\n [U] - To go up the list.\n [H] - To toggle that item in the list."
  370. rules.TextColor3 = Color3.new(0, 0, 0)
  371. rules.TextScaled = true
  372. rules.TextSize = 14
  373. rules.TextWrapped = true
  374.  
  375. Frame.Parent = ScreenGui
  376. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  377. Frame.Position = UDim2.new(0, 0, 0.490171999, 0)
  378. Frame.Size = UDim2.new(0, 100, 0, 31)
  379.  
  380. open.Name = "open"
  381. open.Parent = Frame
  382. open.BackgroundColor3 = Color3.new(1, 0, 0)
  383. open.Position = UDim2.new(-3.7252903e-09, 0, 0, 0)
  384. open.Size = UDim2.new(0, 100, 0, 31)
  385. open.Font = Enum.Font.GothamBold
  386. open.Text = "Open"
  387. open.TextColor3 = Color3.new(0, 0, 0)
  388. open.TextScaled = true
  389. open.TextSize = 14
  390. open.TextWrapped = true
  391. open.MouseButton1Down:connect(function()
  392. MainGUI.Visible = true
  393. Frame.Visible = false
  394. end)
  395. -- Scripts:
  396.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement