Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LockedPlayer = nil
- local Aimlock = nil
- local LocalPlayer = game:GetService("Players").LocalPlayer
- local Character = LocalPlayer.Character
- local Workspace = game:GetService("Workspace")
- local CoreGui = game:GetService("CoreGui")
- local mt = getrawmetatable(game)
- local namecall = mt.__namecall
- setreadonly(mt, false)
- if getrawmetatable then
- local mt = getrawmetatable(game)
- local namecall = mt.__namecall
- setreadonly(mt, false)
- mt.__namecall = newcclosure(function(table, ...)
- local args = {...}
- local method = getnamecallmethod()
- if method == "FireServer" and args[1] and args[1] == "UpdateMousePos" then
- if not (args[3] and args[3] == "Aimlock") then
- return nil
- end
- end
- return namecall(table, ...)
- end)
- end
- local function FindPlrOnMouse()
- for i, v in pairs(game.Workspace:FindPartsInRegion3(Region3.new(LocalPlayer:GetMouse().Hit.Position, LocalPlayer:GetMouse().Hit.Position))) do
- local plr = game.Players:GetPlayerFromCharacter(v.Parent)
- if plr ~= nil and plr ~= LocalPlayer then
- return plr
- end
- end
- return nil
- end
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local Button = Instance.new("TextButton")
- local Shadow = Instance.new("Frame")
- local UICorner_2 = Instance.new("UICorner")
- local TextLabel = Instance.new("TextLabel")
- local UICorner_3 = Instance.new("UICorner")
- local Button_2 = Instance.new("TextButton")
- local Shadow_2 = Instance.new("Frame")
- local UICorner_4 = Instance.new("UICorner")
- local UICorner_5 = Instance.new("UICorner")
- --Properties:
- ScreenGui.Parent = game.CoreGui
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0.285390705, 0, 0.252508372, 0)
- Frame.Size = UDim2.new(0, 293, 0, 120)
- UICorner.CornerRadius = UDim.new(0.100000001, 0)
- UICorner.Parent = Frame
- Button.Name = "Button"
- Button.Parent = Frame
- Button.BackgroundColor3 = Color3.fromRGB(48, 48, 48)
- Button.BorderSizePixel = 0
- Button.Position = UDim2.new(0.191126287, 0, 0.308333337, 0)
- Button.Size = UDim2.new(0, 180, 0, 45)
- Button.ZIndex = 2
- Button.Font = Enum.Font.GothamSemibold
- Button.Text = ""
- Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button.TextScaled = true
- Button.TextSize = 14.000
- Button.TextWrapped = true
- Shadow.Name = "Shadow"
- Shadow.Parent = Button
- Shadow.BackgroundColor3 = Color3.fromRGB(22, 22, 22)
- Shadow.BorderSizePixel = 0
- Shadow.Size = UDim2.new(1, 0, 1, 4)
- UICorner_2.Parent = Shadow
- TextLabel.Parent = Button
- TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.BorderColor3 = Color3.fromRGB(27, 42, 53)
- TextLabel.BorderSizePixel = 0
- TextLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
- TextLabel.Size = UDim2.new(1, -20, 1, -20)
- TextLabel.ZIndex = 2
- TextLabel.Font = Enum.Font.GothamSemibold
- TextLabel.Text = "Aimbot"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- UICorner_3.Parent = Button
- Button_2.Name = "Button"
- Button_2.Parent = Frame
- Button_2.BackgroundColor3 = Color3.fromRGB(221, 221, 221)
- Button_2.BorderSizePixel = 0
- Button_2.Position = UDim2.new(0.720833123, 0, 0.0583333336, 0)
- Button_2.Size = UDim2.new(0, 69, 0, 17)
- Button_2.ZIndex = 2
- Button_2.Font = Enum.Font.GothamSemibold
- Button_2.Text = ""
- Button_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- Button_2.TextScaled = true
- Button_2.TextSize = 14.000
- Button_2.TextWrapped = true
- Shadow_2.Name = "Shadow"
- Shadow_2.Parent = Button_2
- Shadow_2.BackgroundColor3 = Color3.fromRGB(150, 150, 150)
- Shadow_2.BorderSizePixel = 0
- Shadow_2.Size = UDim2.new(1.01153481, 0, 0.882352948, 4)
- UICorner_4.CornerRadius = UDim.new(0.5, 0)
- UICorner_4.Parent = Shadow_2
- UICorner_5.CornerRadius = UDim.new(0.5, 0)
- UICorner_5.Parent = Button_2
- Button.MouseButton1Down:Connect(function()
- Aimlock = nil
- for i, v in pairs(LocalPlayer.Backpack:GetChildren()) do
- if v.ClassName == "Tool" and v.Name == "Aimlock Tool" then
- v:Destroy()
- end
- end
- for i, v in pairs(LocalPlayer.Character:GetChildren()) do
- if v.ClassName == "Tool" and v.Name == "Aimlock Tool" then
- v:Destroy()
- elseif v.ClassName == "Tool" then
- v.Parent = LocalPlayer.Backpack
- end
- end
- local AimlockTool = Instance.new("Tool")
- AimlockTool.Name = "Aimlock Tool"
- AimlockTool.Parent = LocalPlayer.Backpack
- AimlockTool.RequiresHandle = false
- AimlockTool.Name = "Aimbot"
- AimlockTool.Activated:Connect(function()
- local Plr = FindPlrOnMouse()
- if Plr ~= nil and Plr.Character and Plr.Character:FindFirstChild("Head") and Plr.Character:FindFirstChild("UpperTorso") then
- Aimlock = Plr
- game:GetService("StarterGui"):SetCore("SendNotification",{
- Title = "AIMLOCK | Krypt";
- Text = "Aimlocking towards: " .. Plr.Name .. ", use any gun and shoot anywhere";
- Button1 = "Ok";
- Duration = 2.5;
- })
- else
- Aimlock = nil
- game:GetService("StarterGui"):SetCore("SendNotification",{
- Title = "AIMLOCK | Krypt";
- Text = "No player clicked on, aimlocking towards mouse as normal";
- Button1 = "Ok";
- Duration = 2.5;
- })
- end
- end)
- end)
- Button_2.MouseButton1Down:Connect(function()
- game.CoreGui.ScreenGui:Destroy()
- end)
- if getrawmetatable then
- game:GetService("RunService").Heartbeat:Connect(function()
- if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position, "Aimlock")
- elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position, "Aimlock")
- elseif Aimlock == nil then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", game:GetService("Players").LocalPlayer:GetMouse().Hit.Position, "Aimlock")
- end
- end)
- else
- for i = 1, 10 do
- game:GetService("RunService").Heartbeat:Connect(function()
- if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position)
- elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position)
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position)
- elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position)
- end
- end)
- game:GetService("RunService").Stepped:Connect(function()
- if Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChild("Head") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character.Head.Position)
- elseif Aimlock ~= nil and Aimlock.Character and Aimlock.Character:FindFirstChildOfClass("Part") then
- game.ReplicatedStorage.MainEvent:FireServer("UpdateMousePos", Aimlock.Character:FindFirstChildOfClass("Part").Position)
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment