Advertisement
Domadicoof-28363

Untitled

May 8th, 2023
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.49 KB | None | 0 0
  1.  
  2.  
  3. local Script_Title = "KAGA <font color=\"rgb(255, 255, 255)\">|</font> Aimlock"
  4.  
  5. -- Instances:
  6. local Arceus = Instance.new("ScreenGui")
  7. local Main = Instance.new("Frame")
  8. local UICorner = Instance.new("UICorner")
  9. local Intro = Instance.new("Frame")
  10. local UICorner_2 = Instance.new("UICorner")
  11. local Logo = Instance.new("ImageButton")
  12. local UIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
  13. local Title = Instance.new("TextLabel")
  14. local Menu = Instance.new("ScrollingFrame")
  15. local UIListLayout = Instance.new("UIListLayout")
  16. local Toggle = Instance.new("ImageButton")
  17. local UICorner_3 = Instance.new("UICorner")
  18. local Enabled = Instance.new("Frame")
  19. local UIAspectRatioConstraint_2 = Instance.new("UIAspectRatioConstraint")
  20. local UICorner_4 = Instance.new("UICorner")
  21. local Check = Instance.new("Frame")
  22. local UIAspectRatioConstraint_3 = Instance.new("UIAspectRatioConstraint")
  23. local UICorner_5 = Instance.new("UICorner")
  24. local Name = Instance.new("TextLabel")
  25. local UIGradient = Instance.new("UIGradient")
  26. local Button = Instance.new("ImageButton")
  27. local UICorner_6 = Instance.new("UICorner")
  28. local Name_2 = Instance.new("TextLabel")
  29. local UIGradient_2 = Instance.new("UIGradient")
  30. local tab = Instance.new("Frame")
  31. local Close = Instance.new("TextButton")
  32. local ComboElem = Instance.new("ImageButton")
  33. local UICorner_7 = Instance.new("UICorner")
  34. local Name_3 = Instance.new("TextLabel")
  35. local UIGradient_3 = Instance.new("UIGradient")
  36. local Img = Instance.new("TextLabel")
  37. local UIAspectRatioConstraint_4 = Instance.new("UIAspectRatioConstraint")
  38. local ComboBox = Instance.new("ImageButton")
  39. local UICorner_8 = Instance.new("UICorner")
  40. local Name_4 = Instance.new("TextLabel")
  41. local UIGradient_4 = Instance.new("UIGradient")
  42. local Img_2 = Instance.new("TextLabel")
  43. local UIAspectRatioConstraint_5 = Instance.new("UIAspectRatioConstraint")
  44.  
  45. --Properties:
  46.  
  47. Arceus.Name = "Arceus"
  48. Arceus.Enabled = true
  49. Arceus.ResetOnSpawn = true
  50. Arceus.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  51. Arceus.DisplayOrder = 999999999
  52.  
  53. Main.Name = "Main"
  54. Main.Parent = Arceus
  55. Main.Active = true
  56. Main.Draggable = true
  57. Main.AnchorPoint = Vector2.new(0.5, 0.5)
  58. Main.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  59. Main.BorderSizePixel = 0
  60. Main.Position = UDim2.new(0.5, 0, -0.2, 0) --UDim2.new(0.5, 0, 0.5, 0)
  61. Main.Size = UDim2.new(0.3, 0, 0.3, 0)
  62.  
  63. UICorner.CornerRadius = UDim.new(0.1, 0)
  64. UICorner.Parent = Main
  65.  
  66. Intro.Name = "Intro"
  67. Intro.Parent = Main
  68. Intro.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  69. Intro.ClipsDescendants = true
  70. Intro.Size = UDim2.new(1, 0, 1, 0)
  71. Intro.ZIndex = 2
  72.  
  73. UICorner_2.CornerRadius = UDim.new(0.1, 0)
  74. UICorner_2.Parent = Intro
  75.  
  76. Logo.Parent = Intro
  77. Logo.AnchorPoint = Vector2.new(0.5, 0.5)
  78. Logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  79. Logo.BackgroundTransparency = 1
  80. Logo.BorderSizePixel = 0
  81. Logo.Position = UDim2.new(0.5, 0, 0.5, 0)
  82. Logo.Size = UDim2.new(0.75, 0, 0.75, 0)
  83. Logo.ZIndex = 2
  84. Logo.Image = "ใส่Idรูป"
  85. Logo.ScaleType = Enum.ScaleType.Fit
  86. Logo.Active = false
  87.  
  88. UIAspectRatioConstraint.Parent = Logo
  89.  
  90. Title.Name = "Title"
  91. Title.Parent = Main
  92. Title.AnchorPoint = Vector2.new(1, 0)
  93. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  94. Title.BackgroundTransparency = 1
  95. Title.BorderSizePixel = 0
  96. Title.Position = UDim2.new(0.975, 0, 0.075, 0)
  97. Title.Size = UDim2.new(0.85, 0, 0.155, 0)
  98. Title.Font = Enum.Font.TitilliumWeb
  99. Title.FontFace = Font.new("rbxasset://fonts/families/TitilliumWeb.json", Enum.FontWeight.Bold)
  100. Title.RichText = true
  101. Title.Text = Script_Title
  102. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  103. Title.TextScaled = true
  104. Title.TextSize = 14
  105. Title.TextWrapped = true
  106. Title.TextXAlignment = Enum.TextXAlignment.Left
  107. Title.TextYAlignment = Enum.TextYAlignment.Center
  108.  
  109. Menu.Name = "Menu"
  110. Menu.Parent = Main
  111. Menu.Active = true
  112. Menu.AnchorPoint = Vector2.new(0.5, 1)
  113. Menu.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  114. Menu.BackgroundTransparency = 1
  115. Menu.AutomaticCanvasSize = Enum.AutomaticSize.Y
  116. Menu.BorderSizePixel = 0
  117. Menu.Position = UDim2.new(0.5, 0, 0.95, 0)
  118. Menu.Size = UDim2.new(0.95, 0, 0.65, 0)
  119. Menu.CanvasSize = UDim2.new(0, 0, 0, 0)
  120. Menu.ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255)
  121. Menu.ScrollBarThickness = Menu.AbsoluteSize.X/25
  122.  
  123. UIListLayout.Parent = Menu
  124. --UIListLayout.Padding = UDim.new(0.025, 0)
  125. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  126.  
  127. Toggle.Name = "Toggle"
  128. Toggle.Visible = false
  129. --Toggle.Parent = Arceus
  130. Toggle.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  131. Toggle.Size = UDim2.new(0.95, 0, 0, 50)
  132.  
  133. UICorner_3.CornerRadius = UDim.new(0.25, 0)
  134. UICorner_3.Parent = Toggle
  135.  
  136. Enabled.Name = "Enabled"
  137. Enabled.Parent = Toggle
  138. Enabled.AnchorPoint = Vector2.new(1, 0.5)
  139. Enabled.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  140. Enabled.Position = UDim2.new(0.975, 0, 0.5, 0)
  141. Enabled.Size = UDim2.new(0.75, 0, 0.75, 0)
  142.  
  143. UIAspectRatioConstraint_2.Parent = Enabled
  144.  
  145. UICorner_4.CornerRadius = UDim.new(0.3, 0)
  146. UICorner_4.Parent = Enabled
  147.  
  148. Check.Name = "Check"
  149. Check.Parent = Enabled
  150. Check.AnchorPoint = Vector2.new(0.5, 0.5)
  151. Check.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  152. Check.Position = UDim2.new(0.5, 0, 0.5, 0)
  153. Check.Size = UDim2.new(0.65, 0, 0.65, 0)
  154.  
  155. UIAspectRatioConstraint_3.Parent = Check
  156.  
  157. UICorner_5.CornerRadius = UDim.new(0.3, 0)
  158. UICorner_5.Parent = Check
  159.  
  160. Name.Name = "Name"
  161. Name.Parent = Toggle
  162. Name.AnchorPoint = Vector2.new(0, 0.5)
  163. Name.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  164. Name.BackgroundTransparency = 1
  165. Name.BorderSizePixel = 0
  166. Name.Position = UDim2.new(0.05, 0, 0.5, 0)
  167. Name.Size = UDim2.new(0.75, 0, 0.8, 0)
  168. Name.Font = Enum.Font.TitilliumWeb
  169. Name.Text = "Script"
  170. Name.TextColor3 = Color3.fromRGB(255, 255, 255)
  171. Name.TextScaled = true
  172. Name.TextSize = 14
  173. Name.TextWrapped = true
  174. Name.TextXAlignment = Enum.TextXAlignment.Left
  175. Name.TextYAlignment = Enum.TextYAlignment.Bottom
  176.  
  177. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  178. UIGradient.Parent = Toggle
  179.  
  180. Button.Name = "Button"
  181. --Button.Parent = Arceus
  182. Button.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  183. Button.Size = UDim2.new(0.95, 0, 0, 50)
  184.  
  185. UICorner_6.CornerRadius = UDim.new(0.25, 0)
  186. UICorner_6.Parent = Button
  187.  
  188. Name_2.Name = "Name"
  189. Name_2.Parent = Button
  190. Name_2.AnchorPoint = Vector2.new(0, 0.5)
  191. Name_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  192. Name_2.BackgroundTransparency = 1
  193. Name_2.BorderSizePixel = 0
  194. Name_2.Position = UDim2.new(0.05, 0, 0.5, 0)
  195. Name_2.Size = UDim2.new(0.95, 0, 0.82, 0)
  196. Name_2.Font = Enum.Font.TitilliumWeb
  197. Name_2.Text = "Enabled"
  198. Name_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  199. Name_2.TextScaled = true
  200. Name_2.TextSize = 14
  201. Name_2.TextWrapped = true
  202. Name_2.TextXAlignment = Enum.TextXAlignment.Left
  203. Name_2.TextYAlignment = Enum.TextYAlignment.Bottom
  204.  
  205. UIGradient_2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  206. UIGradient_2.Parent = Button
  207.  
  208. tab.Name = "Tab"
  209. tab.Visible = false
  210. --tab.Parent = Arceus
  211. tab.BackgroundTransparency = 1
  212. tab.Size = UDim2.new(0.95, 0, 0.025, 0)
  213.  
  214. Close.Name = "Close"
  215. Close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  216. Close.BackgroundTransparency = 1
  217. Close.BorderSizePixel = 0
  218. Close.Position = UDim2.new(0.8, 0, 0.1, 0)
  219. Close.Size = UDim2.new(0.15, 0, 0.125, 0)
  220. Close.Font = Enum.Font.FredokaOne
  221. Close.Text = "X"
  222. Close.TextColor3 = Color3.fromRGB(255, 255, 255)
  223. Close.TextScaled = true
  224. Close.TextSize = 14
  225. Close.TextWrapped = true
  226. Close.TextXAlignment = Enum.TextXAlignment.Right
  227. Close.Parent = Main
  228.  
  229. ComboElem.Name = "ComboElem"
  230. ComboElem.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  231. ComboElem.Size = UDim2.new(0.95, 0, 0, 50)
  232.  
  233. UICorner_7.CornerRadius = UDim.new(0.25, 0)
  234. UICorner_7.Parent = ComboElem
  235.  
  236. Name_3.Name = "Name"
  237. Name_3.Parent = ComboElem
  238. Name_3.AnchorPoint = Vector2.new(0, 0.5)
  239. Name_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  240. Name_3.BackgroundTransparency = 1
  241. Name_3.BorderSizePixel = 0
  242. Name_3.Position = UDim2.new(0.05, 0, 0.5, 0)
  243. Name_3.Size = UDim2.new(0.75, 0, 0.8, 0)
  244. Name_3.Font = Enum.Font.TitilliumWeb
  245. Name_3.Text = "Enabled"
  246. Name_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  247. Name_3.TextScaled = true
  248. Name_3.TextSize = 14
  249. Name_3.TextWrapped = true
  250. Name_3.TextXAlignment = Enum.TextXAlignment.Left
  251. Name_3.TextYAlignment = Enum.TextYAlignment.Bottom
  252.  
  253. UIGradient_3.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  254. UIGradient_3.Rotation = 180
  255. UIGradient_3.Parent = ComboElem
  256.  
  257. Img.Name = "Img"
  258. Img.Parent = ComboElem
  259. Img.AnchorPoint = Vector2.new(1, 0.5)
  260. Img.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  261. Img.BackgroundTransparency = 1
  262. Img.BorderSizePixel = 0
  263. Img.Position = UDim2.new(0.975, 0, 0.5, 0)
  264. Img.Rotation = 90
  265. Img.Size = UDim2.new(0.75, 0, 0.75, 0)
  266. Img.Font = Enum.Font.FredokaOne
  267. Img.Text = "^"
  268. Img.TextColor3 = Color3.fromRGB(255, 255, 255)
  269. Img.TextScaled = true
  270. Img.TextSize = 14
  271. Img.TextWrapped = true
  272.  
  273. UIAspectRatioConstraint_4.Parent = Img
  274.  
  275. ComboBox.Name = "ComboBox"
  276. ComboBox.BackgroundColor3 = Color3.fromRGB(55, 55, 55)
  277. ComboBox.Size = UDim2.new(0.95, 0, 0, 50)
  278.  
  279. UICorner_8.CornerRadius = UDim.new(0.25, 0)
  280. UICorner_8.Parent = ComboBox
  281.  
  282. Name_4.Name = "Name"
  283. Name_4.Parent = ComboBox
  284. Name_4.AnchorPoint = Vector2.new(0, 0.5)
  285. Name_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  286. Name_4.BackgroundTransparency = 1.000
  287. Name_4.BorderSizePixel = 0
  288. Name_4.Position = UDim2.new(0.05, 0, 0.5, 0)
  289. Name_4.Size = UDim2.new(0.75, 0, 0.8, 0)
  290. Name_4.Font = Enum.Font.TitilliumWeb
  291. Name_4.Text = "Enabled"
  292. Name_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  293. Name_4.TextScaled = true
  294. Name_4.TextSize = 14
  295. Name_4.TextWrapped = true
  296. Name_4.TextXAlignment = Enum.TextXAlignment.Left
  297. Name_4.TextYAlignment = Enum.TextYAlignment.Bottom
  298.  
  299. UIGradient_4.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(180, 180, 180))}
  300. UIGradient_4.Parent = ComboBox
  301.  
  302. Img_2.Name = "Img"
  303. Img_2.Parent = ComboBox
  304. Img_2.AnchorPoint = Vector2.new(1, 0.5)
  305. Img_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  306. Img_2.BackgroundTransparency = 1
  307. Img_2.BorderSizePixel = 0
  308. Img_2.Rotation = 180
  309. Img_2.Position = UDim2.new(0.975, 0, 0.5, 0)
  310. Img_2.Size = UDim2.new(0.75, 0, 0.75, 0)
  311. Img_2.Font = Enum.Font.FredokaOne
  312. Img_2.Text = "^"
  313. Img_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  314. Img_2.TextScaled = true
  315. Img_2.TextSize = 14
  316. Img_2.TextWrapped = true
  317.  
  318. UIAspectRatioConstraint_5.Parent = Img_2
  319.  
  320. -- SCRIPT
  321.  
  322. local TweenService = game:GetService("TweenService")
  323. Close.MouseButton1Click:Connect(function()
  324. Logo.Active = true
  325. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0}):Play()
  326.  
  327. task.wait(0.3)
  328. Logo:TweenSizeAndPosition(
  329. UDim2.fromScale(0.75, 0.75),
  330. UDim2.fromScale(0.5, 0.5),
  331. Enum.EasingDirection.Out,
  332. Enum.EasingStyle.Quad,
  333. 0.25, true, nil
  334. )
  335.  
  336. task.wait(0.3)
  337. Main:TweenSize(
  338. UDim2.fromScale(0.1, 0.175),
  339. Enum.EasingDirection.Out,
  340. Enum.EasingStyle.Quad,
  341. 0.25, true, nil
  342. )
  343.  
  344. task.wait(0.3)
  345. for _, obj in pairs(Main:GetChildren()) do
  346. if obj:IsA("GuiObject") and obj ~= Intro then
  347. obj.Visible = false
  348. end
  349. end
  350.  
  351. TweenService:Create(Logo, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {ImageTransparency = 0.8}):Play()
  352. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1}):Play()
  353. TweenService:Create(Main, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0.8}):Play()
  354. end)
  355.  
  356. Logo.MouseButton1Click:Connect(function()
  357. Logo.Active = false
  358. TweenService:Create(Logo, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {ImageTransparency = 0}):Play()
  359. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0}):Play()
  360. TweenService:Create(Main, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 0}):Play()
  361.  
  362. task.wait(0.3)
  363. Main:TweenSize(
  364. UDim2.fromScale(0.3, 0.3),
  365. Enum.EasingDirection.Out,
  366. Enum.EasingStyle.Quad,
  367. 0.25, true, nil
  368. )
  369.  
  370. task.wait(0.3)
  371. Logo:TweenSizeAndPosition(
  372. UDim2.fromScale(0.175, 0.175),
  373. UDim2.fromScale(0.075, 0.15),
  374. Enum.EasingDirection.Out,
  375. Enum.EasingStyle.Quad,
  376. 0.25, true, nil
  377. )
  378.  
  379. for _, obj in pairs(Main:GetChildren()) do
  380. if obj:IsA("GuiObject") and obj ~= Intro then
  381. obj.Visible = true
  382. end
  383. end
  384.  
  385. task.wait(0.3)
  386. TweenService:Create(Intro, TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1}):Play()
  387. end)
  388.  
  389. local function uiparent()
  390. local success, parent = pcall(function()
  391. return gethui()
  392. end)
  393.  
  394. if not success then
  395. return game:GetService("CoreGui")
  396. end
  397.  
  398. return parent
  399. end
  400.  
  401. local success, err = pcall(function()
  402. Arceus.Parent = uiparent()
  403. end)
  404.  
  405. if not success then
  406. Arceus.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  407. end
  408.  
  409. local element_height = 50*Menu.AbsoluteSize.Y/210
  410. local elements = 0
  411.  
  412. local function addSpace(parent)
  413. local space = tab:Clone()
  414. space.Parent = parent
  415. space.LayoutOrder = elements
  416. space.Visible = true
  417.  
  418. elements += 1
  419. end
  420.  
  421. local function addToggle(name, funct, enabled, ...)
  422. local newTog = Toggle:Clone()
  423. local args = {...}
  424.  
  425. newTog.MouseButton1Click:Connect(function()
  426. enabled = not enabled
  427. newTog:WaitForChild("Enabled"):WaitForChild("Check").Visible = enabled
  428. funct(enabled, unpack(args))
  429. end)
  430.  
  431. newTog:WaitForChild("Enabled"):WaitForChild("Check").Visible = enabled
  432. newTog:WaitForChild("Name").Text = name
  433.  
  434. newTog.Size = UDim2.new(0.95, 0, 0, element_height) -- Y1 = 50 : Y2 = X
  435. newTog.Name = name
  436. newTog.Parent = Menu
  437. newTog.LayoutOrder = elements
  438. newTog.Visible = true
  439.  
  440. elements += 1
  441. addSpace(Menu)
  442.  
  443. return newTog
  444. end
  445.  
  446. local function addButton(name, funct, ...)
  447. local newBut = Button:Clone()
  448. local args = {...}
  449.  
  450. newBut.MouseButton1Click:Connect(function()
  451. funct(unpack(args))
  452. end)
  453.  
  454. newBut:WaitForChild("Name").Text = name
  455. newBut.Size = UDim2.new(0.95, 0, 0, element_height)
  456. newBut.Name = name
  457. newBut.Parent = Menu
  458. newBut.LayoutOrder = elements
  459. newBut.Visible = true
  460.  
  461. elements += 1
  462. addSpace(Menu)
  463.  
  464. return newBut
  465. end
  466.  
  467. local function addComboBox(text, options, funct, ...) -- ADD CUSTOM ELEMENT INSTEAD
  468. local newCombo = ComboBox:Clone()
  469. local enabled = false
  470. local elems = {}
  471. local args = {...}
  472.  
  473. local function setBoxState()
  474. newCombo:WaitForChild("Img").Rotation = enabled and 0 or 180
  475. for _, elem in ipairs(elems) do
  476. elem.Visible = enabled
  477. end
  478. end
  479.  
  480. newCombo.MouseButton1Click:Connect(function()
  481. enabled = not enabled
  482. setBoxState()
  483. end)
  484.  
  485. newCombo:WaitForChild("Name").Text = text .. ": " .. (#options > 0 and options[1] or "")
  486. newCombo.Size = UDim2.new(0.95, 0, 0, element_height)
  487. newCombo.Name = #options > 0 and options[1] or ""
  488. newCombo.Parent = Menu
  489. newCombo.LayoutOrder = elements
  490. newCombo.Parent = Menu
  491. newCombo.Visible = true
  492.  
  493. elements += 1
  494. addSpace(Menu)
  495.  
  496. for _, name in ipairs(options) do
  497. local newElem = ComboElem:Clone()
  498. table.insert(elems, newElem)
  499.  
  500. newElem.MouseButton1Click:Connect(function()
  501. newCombo:WaitForChild("Name").Text = text .. ": " .. name
  502. enabled = false
  503. setBoxState()
  504.  
  505. funct(name, unpack(args))
  506. end)
  507.  
  508. newElem:WaitForChild("Name").Text = name
  509. newElem.Size = UDim2.new(0.95, 0, 0, element_height)
  510. newElem.Name = name
  511. newElem.Parent = Menu
  512. newElem.LayoutOrder = elements
  513. newElem.Visible = false
  514.  
  515. elements += 1
  516. addSpace(Menu)
  517. end
  518.  
  519. return newCombo
  520. end
  521.  
  522. -- Actual Script
  523.  
  524. local runService = game:GetService("RunService")
  525. local plrsService = game:GetService("Players")
  526. local enabled = false
  527. local teamcheck = false
  528. local aimpart = "Head"
  529.  
  530. function lookAt(target, eye)
  531. workspace.CurrentCamera.CFrame = CFrame.new(target, eye)
  532. end
  533.  
  534. function getClosestPlayerToCursor(trg_part)
  535. local nearest = nil
  536. local last = math.huge
  537.  
  538. for i, v in ipairs(plrsService:GetPlayers()) do
  539. if v ~= plrsService.LocalPlayer and plrsService.LocalPlayer.Character and plrsService.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid") and plrsService.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid").Health > 0
  540. and v.Character and v.Character:FindFirstChildWhichIsA("Humanoid") and v.Character:FindFirstChildWhichIsA("Humanoid").Health > 0
  541. then
  542. local allowed = not teamcheck
  543. if teamcheck and v.Team ~= plrsService.LocalPlayer.Team then
  544. allowed = true
  545. end
  546.  
  547. if allowed then
  548. local aimobj = v.Character:FindFirstChild(trg_part) or v.Character:FindFirstChild("UpperTorso")
  549. if aimobj then
  550. if plrsService.LocalPlayer.Character:FindFirstChild("Head") then
  551. local ePos, vissss = workspace.CurrentCamera:WorldToViewportPoint(aimobj.Position)
  552. local AccPos = Vector2.new(ePos.x, ePos.y)
  553. local mousePos = Vector2.new(workspace.CurrentCamera.ViewportSize.x / 2, workspace.CurrentCamera.ViewportSize.y / 2)
  554. local distance = (AccPos - mousePos).magnitude
  555. if distance < last and vissss and distance < 400 then
  556. last = distance
  557. nearest = v
  558. end
  559. end
  560. end
  561. end
  562. end
  563. end
  564. return nearest
  565. end
  566.  
  567. local toggleBtn
  568. toggleBtn = addToggle("Toggle aimbot", function(state)
  569. enabled = state
  570. end, false)
  571.  
  572.  
  573.  
  574. local aimPartCombo
  575. aimPartCombo = addComboBox("Aim part", {"Head", "Torso"}, function(selection)
  576. aimpart = selection
  577. end)
  578.  
  579. runService.RenderStepped:Connect(function()
  580. local closest = getClosestPlayerToCursor(aimpart)
  581. if enabled and closest then
  582. local aimobj = closest.Character:FindFirstChild(aimpart) or closest.Character:FindFirstChild("UpperTorso") -- If not found then should be R15 Torso
  583. if aimobj then
  584. lookAt(workspace.CurrentCamera.CFrame.p, aimobj.Position)
  585. end
  586. end
  587. end)
  588.  
  589. -- INIT
  590.  
  591. Main:TweenPosition(
  592. UDim2.fromScale(0.5, 0.5),
  593. Enum.EasingDirection.In,
  594. Enum.EasingStyle.Quad,
  595. 1, true, nil
  596. )
  597.  
  598. task.wait(1.5)
  599. Logo:TweenSizeAndPosition(
  600. UDim2.fromScale(0.175, 0.175),
  601. UDim2.fromScale(0.075, 0.15),
  602. Enum.EasingDirection.In,
  603. Enum.EasingStyle.Quad,
  604. 1, true, nil
  605. )
  606.  
  607. task.wait(1.5)
  608. TweenService:Create(Intro, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In), {BackgroundTransparency = 1}):Play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement