M4DH4X

Untitled

Jan 20th, 2021
14,648
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.79 KB | None | 0 0
  1. local LockedPlayer = nil
  2. local Aimlock = nil
  3. local LocalPlayer = game:GetService("Players").LocalPlayer
  4. local Character = LocalPlayer.Character
  5. local Workspace = game:GetService("Workspace")
  6. local CoreGui = game:GetService("CoreGui")
  7.  
  8. local mt = getrawmetatable(game)
  9. local namecall = mt.__namecall
  10. setreadonly(mt, false)
  11.  
  12. if getrawmetatable then
  13. local mt = getrawmetatable(game)
  14. local namecall = mt.__namecall
  15. setreadonly(mt, false)
  16.  
  17. mt.__namecall = newcclosure(function(table, ...)
  18. local args = {...}
  19. local method = getnamecallmethod()
  20. if method == "FireServer" and args[1] and args[1] == "UpdateMousePos" then
  21. if not (args[3] and args[3] == "Aimlock") then
  22. return nil
  23. end
  24. end
  25. return namecall(table, ...)
  26. end)
  27. end
  28.  
  29. local function FindPlrOnMouse()
  30. for i, v in pairs(game.Workspace:FindPartsInRegion3(Region3.new(LocalPlayer:GetMouse().Hit.Position, LocalPlayer:GetMouse().Hit.Position))) do
  31. local plr = game.Players:GetPlayerFromCharacter(v.Parent)
  32. if plr ~= nil and plr ~= LocalPlayer then
  33. return plr
  34. end
  35. end
  36. return nil
  37. end
  38. local ScreenGui = Instance.new("ScreenGui")
  39. local Frame = Instance.new("Frame")
  40. local UICorner = Instance.new("UICorner")
  41. local Button = Instance.new("TextButton")
  42. local Shadow = Instance.new("Frame")
  43. local UICorner_2 = Instance.new("UICorner")
  44. local TextLabel = Instance.new("TextLabel")
  45. local UICorner_3 = Instance.new("UICorner")
  46. local Button_2 = Instance.new("TextButton")
  47. local Shadow_2 = Instance.new("Frame")
  48. local UICorner_4 = Instance.new("UICorner")
  49. local UICorner_5 = Instance.new("UICorner")
  50.  
  51. --Properties:
  52.  
  53. ScreenGui.Parent = game.CoreGui
  54. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  55.  
  56. Frame.Parent = ScreenGui
  57. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  58. Frame.BorderSizePixel = 0
  59. Frame.Position = UDim2.new(0.285390705, 0, 0.252508372, 0)
  60. Frame.Size = UDim2.new(0, 293, 0, 120)
  61.  
  62. UICorner.CornerRadius = UDim.new(0.100000001, 0)
  63. UICorner.Parent = Frame
  64.  
  65. Button.Name = "Button"
  66. Button.Parent = Frame
  67. Button.BackgroundColor3 = Color3.fromRGB(48, 48, 48)
  68. Button.BorderSizePixel = 0
  69. Button.Position = UDim2.new(0.191126287, 0, 0.308333337, 0)
  70. Button.Size = UDim2.new(0, 180, 0, 45)
  71. Button.ZIndex = 2
  72. Button.Font = Enum.Font.GothamSemibold
  73. Button.Text = ""
  74. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  75. Button.TextScaled = true
  76. Button.TextSize = 14.000
  77. Button.TextWrapped = true
  78.  
  79. Shadow.Name = "Shadow"
  80. Shadow.Parent = Button
  81. Shadow.BackgroundColor3 = Color3.fromRGB(22, 22, 22)
  82. Shadow.BorderSizePixel = 0
  83. Shadow.Size = UDim2.new(1, 0, 1, 4)
  84.  
  85. UICorner_2.Parent = Shadow
  86.  
  87. TextLabel.Parent = Button
  88. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  89. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  90. TextLabel.BackgroundTransparency = 1.000
  91. TextLabel.BorderColor3 = Color3.fromRGB(27, 42, 53)
  92. TextLabel.BorderSizePixel = 0
  93. TextLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
  94. TextLabel.Size = UDim2.new(1, -20, 1, -20)
  95. TextLabel.ZIndex = 2
  96. TextLabel.Font = Enum.Font.GothamSemibold
  97. TextLabel.Text = "Aimbot"
  98. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  99. TextLabel.TextScaled = true
  100. TextLabel.TextSize = 14.000
  101. TextLabel.TextWrapped = true
  102.  
  103. UICorner_3.Parent = Button
  104.  
  105. Button_2.Name = "Button"
  106. Button_2.Parent = Frame
  107. Button_2.BackgroundColor3 = Color3.fromRGB(221, 221, 221)
  108. Button_2.BorderSizePixel = 0
  109. Button_2.Position = UDim2.new(0.720833123, 0, 0.0583333336, 0)
  110. Button_2.Size = UDim2.new(0, 69, 0, 17)
  111. Button_2.ZIndex = 2
  112. Button_2.Font = Enum.Font.GothamSemibold
  113. Button_2.Text = ""
  114. Button_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  115. Button_2.TextScaled = true
  116. Button_2.TextSize = 14.000
  117. Button_2.TextWrapped = true
  118.  
  119. Shadow_2.Name = "Shadow"
  120. Shadow_2.Parent = Button_2
  121. Shadow_2.BackgroundColor3 = Color3.fromRGB(150, 150, 150)
  122. Shadow_2.BorderSizePixel = 0
  123. Shadow_2.Size = UDim2.new(1.01153481, 0, 0.882352948, 4)
  124.  
  125. UICorner_4.CornerRadius = UDim.new(0.5, 0)
  126. UICorner_4.Parent = Shadow_2
  127.  
  128. UICorner_5.CornerRadius = UDim.new(0.5, 0)
  129. UICorner_5.Parent = Button_2
  130.  
  131. Button.MouseButton1Down:Connect(function()
  132. Aimlock = nil
  133.  
  134. for i, v in pairs(LocalPlayer.Backpack:GetChildren()) do
  135. if v.ClassName == "Tool" and v.Name == "Aimlock Tool" then
  136. v:Destroy()
  137. end
  138. end
  139. for i, v in pairs(LocalPlayer.Character:GetChildren()) do
  140. if v.ClassName == "Tool" and v.Name == "Aimlock Tool" then
  141. v:Destroy()
  142. elseif v.ClassName == "Tool" then
  143. v.Parent = LocalPlayer.Backpack
  144. end
  145. end
  146.  
  147. local AimlockTool = Instance.new("Tool")
  148. AimlockTool.Name = "Aimlock Tool"
  149. AimlockTool.Parent = LocalPlayer.Backpack
  150. AimlockTool.RequiresHandle = false
  151. AimlockTool.Name = "Aimbot"
  152.  
  153. AimlockTool.Activated:Connect(function()
  154. local Plr = FindPlrOnMouse()
  155.  
  156. if Plr ~= nil and Plr.Character and Plr.Character:FindFirstChild("Head") and Plr.Character:FindFirstChild("UpperTorso") then
  157. Aimlock = Plr
  158.  
  159. game:GetService("StarterGui"):SetCore("SendNotification",{
  160. Title = "AIMLOCK | Krypt";
  161. Text = "Aimlocking towards: " .. Plr.Name .. ", use any gun and shoot anywhere";
  162. Button1 = "Ok";
  163. Duration = 2.5;
  164. })
  165. else
  166. Aimlock = nil
  167.  
  168. game:GetService("StarterGui"):SetCore("SendNotification",{
  169. Title = "AIMLOCK | Krypt";
  170. Text = "No player clicked on, aimlocking towards mouse as normal";
  171. Button1 = "Ok";
  172. Duration = 2.5;
  173. })
  174. end
  175. end)
  176. end)
  177.  
  178. Button_2.MouseButton1Down:Connect(function()
  179. game.CoreGui.ScreenGui:Destroy()
  180. end)
  181.  
  182. if getrawmetatable then
  183. game:GetService("RunService").Heartbeat:Connect(function()
  184. if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
  185. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position, "Aimlock")
  186. elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
  187. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position, "Aimlock")
  188. elseif Aimlock == nil then
  189. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", game:GetService("Players").LocalPlayer:GetMouse().Hit.Position, "Aimlock")
  190. end
  191. end)
  192. else
  193. for i = 1, 10 do
  194. game:GetService("RunService").Heartbeat:Connect(function()
  195. if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
  196. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position)
  197. elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
  198. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position)
  199. end
  200. end)
  201. game:GetService("RunService").RenderStepped:Connect(function()
  202. if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
  203. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position)
  204. elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
  205. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position)
  206. end
  207. end)
  208. game:GetService("RunService").Stepped:Connect(function()
  209. if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
  210. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position)
  211. elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
  212. game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position)
  213. end
  214. end)
  215. end
  216. end
Advertisement
Add Comment
Please, Sign In to add comment