Description
no loadstring plain src leak skid allowed...
Features
Script
-- Services
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Workspace = game:GetService("Workspace")
-- Local Player
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local Camera = Workspace.CurrentCamera
-- Rayfield Setup (assumes Rayfield is already loaded via exploit)
local Rayfield = loadstring(game:HttpGet("https://raw.githubusercontent.com/shlexware/Rayfield/main/source"))()
local Window = Rayfield:CreateWindow({
Name = "Universal Hub",
LoadingTitle = "Loading Script...",
LoadingSubtitle = "Stay chill, homie! 😎",
ConfigurationSaving = {
Enabled = true,
FolderName = "UHConfig",
FileName = "Settings"
}
})
-- Settings
local Settings = {
AimbotEnabled = false,
TeamCheck = true,
WallCheck = true,
ESPEnabled = false,
SilentAimEnabled = false,
AimPart = "Head",
FOV = 100,
Sensitivity = 0.1,
AimingMethod = "Raycast",
PlayerMods = {
WalkSpeed = 16,
JumpPower = 50,
WalkSpeedEnabled = false,
JumpPowerEnabled = false
}
}
-- ESP Drawings
local ESPDrawings = {}
-- FOV Circle
local fovCircle = Drawing.new("Circle")
fovCircle.Transparency = 0.7
fovCircle.Thickness = 2
fovCircle.Color = Color3.fromRGB(255, 255, 255)
fovCircle.Filled = false
fovCircle.Visible = true
fovCircle.Radius = Settings.FOV
fovCircle.NumSides = 64
-- Tabs
local MainTab = Window:CreateTab("Main", nil)
local PlayerModsTab = Window:CreateTab("Player Mods", nil)
-- Aimbot Functions
local function isTeammate(player)
if not Settings.TeamCheck then return false end
return player.Team == LocalPlayer.Team
end
local function canSeeTarget(target, part)
if not Settings.WallCheck then return true end
local origin = Camera.CFrame.Position
local direction = (part.Position - origin).Unit * 1000
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {LocalPlayer.Character, target.Character}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
local result = Workspace:Raycast(origin, direction, raycastParams)
return result == nil or result.Instance:IsDescendantOf(target.Character)
end
local function getClosestPlayerToMouse()
local closestPlayer = nil
local closestDistance = Settings.FOV
local mousePos = Vector2.new(Mouse.X, Mouse.Y)
for _, player in pairs(Players:GetPlayers()) do
if player == LocalPlayer or not player.Character or not player.Character:FindFirstChild(Settings.AimPart) or isTeammate(player) then continue end
local part = player.Character[Settings.AimPart]
local screenPos, onScreen = Camera:WorldToViewportPoint(part.Position)
if not onScreen then continue end
local distance = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude
if distance < closestDistance and canSeeTarget(player, part) then
closestDistance = distance
closestPlayer = player
end
end
return closestPlayer
end
-- ESP Functions
local function createESP(player)
if player == LocalPlayer or ESPDrawings[player] then return end
local box = Drawing.new("Square")
box.Thickness = 2
box.Color = Color3.fromRGB(255, 0, 0)
box.Filled = false
local nameTag = Drawing.new("Text")
nameTag.Size = 16
nameTag.Color = Color3.fromRGB(255, 255, 255)
nameTag.Outline = true
nameTag.Center = true
ESPDrawings[player] = {Box = box, NameTag = nameTag}
local function updateESP()
if not player.Character or not player.Character:FindFirstChild("HumanoidRootPart") or not Settings.ESPEnabled or isTeammate(player) then
box.Visible = false
nameTag.Visible = false
return
end
local rootPart = player.Character.HumanoidRootPart
local head = player.Character:FindFirstChild("Head")
if not head then return end
local top, top „
System: Here's the continuation of the script:
<xaiArtifact artifact_id="f2883a76-f965-40f0-8587-66a3be0d5177" artifact_version_id="80c04ff9-b9f5-4197-b357-8dce9e4d9a38" title="AimbotWithRayfield.lua" contentType="text/lua">
top, topOnScreen = Camera:WorldToViewportPoint(rootPart.Position + Vector3.new(0, 3, 0))
local bottom, bottomOnScreen = Camera:WorldToViewportPoint(rootPart.Position - Vector3.new(0, 3, 0))
if topOnScreen and bottomOnScreen then
box.Size = Vector2.new(1500 / (top.Z + bottom.Z), bottom.Y - top.Y)
box.Position = Vector2.new(top.X - box.Size.X / 2, top.Y)
box.Visible = true
nameTag.Text = player.Name
nameTag.Position = Vector2.new(top.X, top.Y - 20)
nameTag.Visible = true
else
box.Visible = false
nameTag.Visible = false
end
end
RunService.RenderStepped:Connect(updateESP)
end
local function removeESP(player)
if ESPDrawings[player] then
ESPDrawings[player].Box:Remove()
ESPDrawings[player].NameTag:Remove()
ESPDrawings[player] = nil
end
end
-- Aiming Methods
local function aimRaycast(target)
local part = target.Character[Settings.AimPart]
local direction = (part.Position - Camera.CFrame.Position).Unit
Camera.CFrame = CFrame.new(Camera.CFrame.Position, Camera.CFrame.Position + direction * 1000)
end
local function aimCamera(target)
local part = target.Character[Settings.AimPart]
Camera.CFrame = CFrame.new(Camera.CFrame.Position, part.Position)
end
local function aimMouseMoveRel(target)
local part = target.Character[Settings.AimPart]
local screenPos = Camera:WorldToViewportPoint(part.Position)
local deltaX = screenPos.X - Mouse.X
local deltaY = screenPos.Y - Mouse.Y
mousemoverel(deltaX * Settings.Sensitivity, deltaY * Settings.Sensitivity)
end
local function aimMoveMouse(target)
local part = target.Character[Settings.AimPart]
local screenPos = Camera:WorldToViewportPoint(part.Position)
movemouse(screenPos.X, screenPos.Y)
end
local function aimCFrame(target)
local part = target.Character[Settings.AimPart]
local direction = (part.Position - LocalPlayer.Character.HumanoidRootPart.Position).Unit
LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(LocalPlayer.Character.HumanoidRootPart.Position, LocalPlayer.Character.HumanoidRootPart.Position + direction * 1000)
end
local aimingMethods = {
["Raycast"] = aimRaycast,
["Camera"] = aimCamera,
["MouseMoveRel"] = aimMouseMoveRel,
["MoveMouse"] = aimMoveMouse,
["CFrame"] = aimCFrame
}
-- Silent Aim Hook (Example for a gun)
local oldNamecall
oldNamecall = hookmetamethod(game, "__namecall", function(self, ...)
local args = {...}
local method = getnamecallmethod()
if method == "FindPartOnRay" and Settings.SilentAimEnabled then
local target = getClosestPlayerToMouse()
if target and target.Character and target.Character:FindFirstChild(Settings.AimPart) then
local part = target.Character[Settings.AimPart]
local ray = Ray.new(args[1].Origin, (part.Position - args[1].Origin).Unit * 1000)
return part, part.Position, part.Position - args[1].Origin, part.Material
end
end
return oldNamecall(self, ...)
end)
-- Main Aimbot Loop
RunService.RenderStepped:Connect(function()
fovCircle.Position = Vector2.new(Mouse.X, Mouse.Y)
if Settings.AimbotEnabled and UserInputService:IsMouseButtonPressed(Enum.UserInputService.MouseButton.Right) then
local target = getClosestPlayerToMouse()
if target then
aimingMethods[Settings.AimingMethod](target)
end
end
-- Update Player Mods
if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Humanoid") then
local humanoid = LocalPlayer.Character.Humanoid
if Settings.PlayerMods.WalkSpeedEnabled then
humanoid.WalkSpeed = Settings.PlayerMods.WalkSpeed
end
if Settings.PlayerMods.JumpPowerEnabled then
humanoid.JumpPower = Settings.PlayerMods.JumpPower
end
end
end)
-- ESP Player Handling
Players.PlayerAdded:Connect(function(player)
createESP(player)
end)
Players.PlayerRemoving:Connect(function(player)
removeESP(player)
end)
for _, player in pairs(Players:GetPlayers()) do
createESP(player)
end
-- Rayfield UI Elements
MainTab:CreateToggle({
Name = "Aimbot",
CurrentValue = Settings.AimbotEnabled,
Callback = function(value)
Settings.AimbotEnabled = value
end
})
MainTab:CreateToggle({
Name = "Team Check",
CurrentValue = Settings.TeamCheck,
Callback = function(value)
Settings.TeamCheck = value
end
})
MainTab:CreateToggle({
Name = "Wall Check",
CurrentValue = Settings.WallCheck,
Callback = function(value)
Settings.WallCheck = value
end
})
MainTab:CreateToggle({
Name = "ESP",
CurrentValue = Settings.ESPEnabled,
Callback = function(value)
Settings.ESPEnabled = value
end
})
MainTab:CreateToggle({
Name = "Silent Aim",
CurrentValue = Settings.SilentAimEnabled,
Callback = function(value)
Settings.SilentAimEnabled = value
end
})
MainTab:CreateDropdown({
Name = "Aiming Method",
Options = {"Raycast", "Camera", "MouseMoveRel", "MoveMouse", "CFrame"},
CurrentOption = Settings.AimingMethod,
Callback = function(value)
Settings.AimingMethod = value
end
})
MainTab:CreateSlider({
Name = "FOV",
Range = {50, 500},
Increment = 10,
CurrentValue = Settings.FOV,
Callback = function(value)
Settings.FOV = value
fovCircle.Radius = value
end
})
MainTab:CreateSlider({
Name = "Sensitivity",
Range = {0.01, 1},
Increment = 0.01,
CurrentValue = Settings.Sensitivity,
Callback = function(value)
Settings.Sensitivity = value
end
})
MainTab:CreateDropdown({
Name = "Aim Part",
Options = {"Head", "Torso", "HumanoidRootPart"},
CurrentOption = Settings.AimPart,
Callback = function(value)
Settings.AimPart = value
end
})
PlayerModsTab:CreateToggle({
Name = "WalkSpeed Enabled",
CurrentValue = Settings.PlayerMods.WalkSpeedEnabled,
Callback = function(value)
Settings.PlayerMods.WalkSpeedEnabled = value
end
})
PlayerModsTab:CreateSlider({
Name = "WalkSpeed",
Range = {16, 100},
Increment = 1,
CurrentValue = Settings.PlayerMods.WalkSpeed,
Callback = function(value)
Settings.PlayerMods.WalkSpeed = value
end
})
PlayerModsTab:CreateToggle({
Name = "JumpPower Enabled",
CurrentValue = Settings.PlayerMods.JumpPowerEnabled,
Callback = function(value)
Settings.PlayerMods.JumpPowerEnabled = value
end
})
PlayerModsTab:CreateSlider({
Name = "JumpPower",
Range = {50, 200},
Increment = 1,
CurrentValue = Settings.PlayerMods.JumpPower,
Callback = function(value)
Settings.PlayerMods.JumpPower = value
end
})
-- Notification
Rayfield:Notify({
Title = "Aimbot Loaded",
Content = "Aimbot, ESP, and Player Mods loaded successfully!",
Duration = 5
})
Comments
Sign in to leave a comment
No comments yet.
Quick Actions