Categories > Exploiting > Scripts >

[REL] The Streets Aimlock

Posts: 4

Threads: 2

Joined: Nov, 2021

Reputation: 0

Posted

just a simple aimlock w/ a command bar

 

local CoreGui = game:GetService('CoreGui')
local CurrentCamera = Workspace.CurrentCamera
local HttpService = game:GetService('HttpService')
local Mouse = game.Players.LocalPlayer:GetMouse()
local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local RunService = game:GetService('RunService')
local TextService = game:GetService('TextService')
local UserInputService = game:GetService('UserInputService')
local Workspace = game:GetService('Workspace')

local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui

local Skreppa = Instance.new('ScreenGui', CoreGui)
Skreppa.ZIndexBehavior = Enum.ZIndexBehavior.Global

local CommandBar = Instance.new('TextBox', Skreppa)
CommandBar.BackgroundColor3 = Color3.fromRGB(32, 32, 48)
CommandBar.BorderColor3 = Color3.fromRGB(224, 224, 224)
CommandBar.Font = Enum.Font.Code
CommandBar.Position = UDim2.new(0, 0, 0.5, 0)
CommandBar.Size = UDim2.new(0, 0, 0, 25)
CommandBar.TextColor3 = Color3.fromRGB(255, 255, 255)
CommandBar.TextSize = 18
CommandBar.TextTruncate = Enum.TextTruncate.AtEnd
CommandBar.Visible = false
CommandBar.ZIndex = 1

local CommandNotification = Instance.new('TextLabel', Skreppa)
CommandNotification.BackgroundColor3 = Color3.fromRGB(32, 32, 48)
CommandNotification.BorderColor3 = Color3.fromRGB(224, 224, 224)
CommandNotification.Font = Enum.Font.Code
CommandNotification.Position = UDim2.new(0, 0, 0.5, 0)
CommandNotification.Size = UDim2.new(0, 0, 0, 25)
CommandNotification.TextColor3 = Color3.fromRGB(255, 255, 255)
CommandNotification.TextSize = 18
CommandNotification.Visible = false
CommandNotification.ZIndex = 0

local AimLockPlayer
local LoopShootPlayer
local AimVelocity = 5
local AimLocking = false
local LoopShooting

local Face = function(Position, Velocity)
    CurrentCamera.CFrame = CFrame.new(CurrentCamera.CFrame.Position, Position + Velocity)
end

local Shoot = function(Position, Velocity)
    Player.Backpack.Input:FireServer('m1', {['mousehit'] = Position + Velocity, ['velo'] = math.huge})
end

local GetPlayer = function(TargetPlayer)
    for _, z in pairs(Players:GetPlayers()) do 
        if string.sub(string.lower(z.Name), 1, #TargetPlayer) == string.lower(TargetPlayer) and TargetPlayer ~= Player then return z end
    end
end

local Notify = function(Message, Time)
    CommandNotification.Visible=true;CommandNotification.Text=Message;task.wait()CommandNotification:TweenSize(UDim2.new(0,#CommandNotification.Text*10.5,0,25),'Out','Quad',0.5,true)task.wait(Time or 2.5)CommandNotification:TweenSize(UDim2.new(0,0,0,25),'Out','Quad',0.5,true)task.wait()CommandNotification.Visible=false
end

RunService.Heartbeat:Connect(function()
    if AimLocking and AimLockPlayer then if AimLockPlayer.Character.Torso then
        Face(AimLockPlayer.Character.Torso.Position, AimLockPlayer.Character.Torso.Velocity / AimVelocity) end
    end
    if LoopShooting and LoopShootPlayer then if LoopShootPlayer.Character.Torso then
        Shoot(LoopShootPlayer.Character.Torso.CFrame, LoopShootPlayer.Character.Torso.Velocity / AimVelocity) end
    end
end)

UserInputService.InputBegan:Connect(function(Key, Processed)
    if not Processed and Key.KeyCode == Enum.KeyCode.Semicolon then
        CommandBar.Visible=true;CommandBar.Text=''task.wait();CommandBar:CaptureFocus()CommandBar:TweenSize(UDim2.new(0,250,0,25),'Out','Quad',0.35,true)
    end
end)

CommandBar.FocusLost:Connect(function(Focused)
    if Focused then
        CommandBar:TweenSize(UDim2.new(0,0,0,25),'Out','Quad',0.2,true)task.wait()CommandBar.Visible=false
        
        local Command = string.split(string.lower(CommandBar.Text), ' ')[1]
        local Arguments = string.split(CommandBar.Text, ' ')
        
        if Command == 'lock' then
            if Arguments[2] then
                if GetPlayer(Arguments[2]) then
                    AimLockPlayer = GetPlayer(Arguments[2])
                    AimLocking = true
                    
                    Notify('Locking on: ' .. tostring(AimLockPlayer))
                else
                    Notify('Player not found: ' .. tostring(Arguments[2]))
                end
            else
                Notify('Please provide desired player')
            end
        elseif Command == 'unlock' then
            AimLocking = false
            
            if AimLockPlayer then
                Notify('Stopped locking on: ' .. tostring(AimLockPlayer))
            end
        elseif Command == 'aimvelocity' then
            if Arguments[2] then
                AimVelocity = Arguments[2]
                
                Notify('Set aim velocity to: ' .. AimVelocity)
            else
                Notify('Please provide desired aim velocity')
            end
        else
            Notify('Command not found: ' .. Command)
        end
    end
end)
  • 0

WetWipes

Professional Idiot

vip

Posts: 139

Threads: 31

Joined: Sep, 2020

Reputation: 14

Replied

Pretty nice script, I like that you did it for The Streets not many scripts for that :D

  • 0

Open to help anyone with anything, DM me on discord :)

Posts: 4

Threads: 2

Joined: Nov, 2021

Reputation: 0

Replied

@WetWipes thank you

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )