0% found this document useful (0 votes)
57 views3 pages

temp.lua

.

Uploaded by

cn313922
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views3 pages

temp.lua

.

Uploaded by

cn313922
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

local aimbotEnabled = false

local aimbotTeamCheckEnabled = false

local function isBehindWall(target)


if not target or not target.Character or not
target.Character:FindFirstChild("Head") then return false end
local origin = workspace.CurrentCamera.CFrame.Position
local direction = (target.Character.Head.Position - origin).Unit
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {game.Players.LocalPlayer.Character}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
local raycastResult = workspace:Raycast(origin, direction * 1000,
raycastParams)
return not (raycastResult and raycastResult.Instance and
raycastResult.Instance:IsDescendantOf(target.Character))
end

local function isPlayerAlive(player)


return player and player.Character and
player.Character:FindFirstChild("Humanoid") and player.Character.Humanoid.Health >
0
end

local function getClosestPlayer()


local closestPlayer, shortestDistance = nil, math.huge
for _, player in pairs(game.Players:GetPlayers()) do
if player ~= game.Players.LocalPlayer and isPlayerAlive(player) then
local character = player.Character
if character and character:FindFirstChild("Head") then
local screenPoint =
workspace.CurrentCamera:WorldToViewportPoint(character.Head.Position)
local distance = (Vector2.new(screenPoint.X, screenPoint.Y) -
Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2,
workspace.CurrentCamera.ViewportSize.Y / 2)).Magnitude
if distance < shortestDistance and not isBehindWall(player) then
closestPlayer, shortestDistance = player, distance
end
end
end
end
return closestPlayer
end

local function getClosestPlayerWithTeamCheck()


local closestPlayer, shortestDistance = nil, math.huge
for _, player in pairs(game.Players:GetPlayers()) do
if player ~= game.Players.LocalPlayer and player.Team ~=
game.Players.LocalPlayer.Team and isPlayerAlive(player) then
local character = player.Character
if character and character:FindFirstChild("Head") then
local screenPoint =
workspace.CurrentCamera:WorldToViewportPoint(character.Head.Position)
local distance = (Vector2.new(screenPoint.X, screenPoint.Y) -
Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2,
workspace.CurrentCamera.ViewportSize.Y / 2)).Magnitude
if distance < shortestDistance and not isBehindWall(player) then
closestPlayer, shortestDistance = player, distance
end
end
end
end
return closestPlayer
end

local function aimAt(target)


if target and target.Character and target.Character:FindFirstChild("Head") then
workspace.CurrentCamera.CFrame =
CFrame.new(workspace.CurrentCamera.CFrame.Position, target.Character.Head.Position)
end
end

game:GetService("RunService").RenderStepped:Connect(function()
if aimbotEnabled then
local target = getClosestPlayer()
if target then aimAt(target) end
elseif aimbotTeamCheckEnabled then
local target = getClosestPlayerWithTeamCheck()
if target then aimAt(target) end
end
end)

local ScreenGui = Instance.new("ScreenGui")


local MainFrame = Instance.new("Frame")
local Header = Instance.new("TextLabel")
local ButtonsFrame = Instance.new("Frame")
local AimbotButton = Instance.new("TextButton")
local TeamCheckButton = Instance.new("TextButton")
local Footer = Instance.new("TextLabel")
local OpenButton = Instance.new("TextButton")

ScreenGui.Parent = game.CoreGui

MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
MainFrame.BackgroundTransparency = 0.5
MainFrame.Size = UDim2.new(0, 240, 0, 280)
MainFrame.Position = UDim2.new(0.5, -120, 0.5, -140)
MainFrame.Visible = false
MainFrame.BorderSizePixel = 2
MainFrame.BorderColor3 = Color3.fromRGB(255, 255, 255)

Header.Parent = MainFrame
Header.Text = "Aimbot Menu"
Header.Font = Enum.Font.SourceSansBold
Header.TextSize = 24
Header.TextColor3 = Color3.fromRGB(255, 255, 255)
Header.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
Header.BackgroundTransparency = 0.5
Header.Size = UDim2.new(1, 0, 0, 40)

ButtonsFrame.Parent = MainFrame
ButtonsFrame.BackgroundTransparency = 1
ButtonsFrame.Size = UDim2.new(1, 0, 1, -100)
ButtonsFrame.Position = UDim2.new(0, 0, 0, 40)

AimbotButton.Parent = ButtonsFrame
AimbotButton.Text = "Aimbot Normal"
AimbotButton.Size = UDim2.new(0.85, 0, 0, 40)
AimbotButton.Position = UDim2.new(0.075, 0, 0, 20)
AimbotButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
AimbotButton.Font = Enum.Font.SourceSansBold
AimbotButton.TextColor3 = Color3.fromRGB(255, 255, 255)
AimbotButton.MouseButton1Click:Connect(function()
aimbotEnabled = not aimbotEnabled
aimbotTeamCheckEnabled = false
AimbotButton.Text = aimbotEnabled and "Aimbot Normal: Ativado" or "Aimbot
Normal: Desativado"
end)

TeamCheckButton.Parent = ButtonsFrame
TeamCheckButton.Text = "Aimbot TeamCheck"
TeamCheckButton.Size = UDim2.new(0.85, 0, 0, 40)
TeamCheckButton.Position = UDim2.new(0.075, 0, 0, 70)
TeamCheckButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
TeamCheckButton.Font = Enum.Font.SourceSansBold
TeamCheckButton.TextColor3 = Color3.fromRGB(255, 255, 255)
TeamCheckButton.MouseButton1Click:Connect(function()
aimbotTeamCheckEnabled = not aimbotTeamCheckEnabled
aimbotEnabled = false
TeamCheckButton.Text = aimbotTeamCheckEnabled and "Aimbot TeamCheck: Ativado"
or "Aimbot TeamCheck: Desativado"
end)

Footer.Parent = MainFrame
Footer.Text = "v1.0 | By Ghzin7sz"
Footer.Font = Enum.Font.SourceSansItalic
Footer.TextSize = 14
Footer.TextColor3 = Color3.fromRGB(255, 255, 255)
Footer.BackgroundTransparency = 1
Footer.Size = UDim2.new(1, 0, 0, 40)
Footer.Position = UDim2.new(0, 0, 1, -40)

OpenButton.Parent = ScreenGui
OpenButton.Text = "Abrir Menu"
OpenButton.Size = UDim2.new(0, 140, 0, 40)
OpenButton.Position = UDim2.new(0, 20, 0, 20)
OpenButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
OpenButton.Font = Enum.Font.SourceSansBold
OpenButton.TextColor3 = Color3.fromRGB(255, 255, 255)
OpenButton.MouseButton1Click:Connect(function()
MainFrame.Visible = not MainFrame.Visible
OpenButton.Text = MainFrame.Visible and "Fechar Menu" or "Abrir Menu"
end)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy