Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local success, Rayfield = pcall(function()
- return loadstring(game:HttpGet("https://sirius.menu/rayfield"))()
- end)
- if not success then
- warn("Gagal memuat Rayfield: " .. tostring(Rayfield))
- return
- end
- if gethui then
- pcall(function()
- RayFieldLib.Parent = gethui()
- end)
- end
- -- ✅ Window utama
- local Window = Rayfield:CreateWindow({
- Name = "Zex Hub",
- LoadingTitle = "Welcome To Our Community",
- LoadingSubtitle = "by ErtzxPetra",
- Theme = "Dark Blue",
- ConfigurationSaving = {
- Enabled = true,
- FolderName = "ertzxhubcfg",
- FileName = "mainconfig"
- },
- Discord = {
- Enabled = false
- }
- })
- local MainTab = Window:CreateTab("🤖 Main Menu", 6035186997)
- local PlayerTab = Window:CreateTab("👤 Player", 6034287593)
- local VisualTab = Window:CreateTab("👀 Visuals", 6035053509)
- local TeleportTab = Window:CreateTab("🔮 Teleports", 6035181604)
- local MiscTab = Window:CreateTab("⚙️ Miscellaneous", 6031075938)
- local ThemeTab = Window:CreateTab("🎨 Theme")
- -- Player Tab
- PlayerTab:CreateLabel("Speed & Movement")
- -- Initialize player movement variables
- local Players = game:GetService("Players")
- local UIS = game:GetService("UserInputService")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
- local Humanoid = Character:WaitForChild("Humanoid")
- -- Default values
- local defaultWalkSpeed = 16
- local defaultJumpPower = 50
- local targetWalkSpeed = defaultWalkSpeed
- local targetJumpPower = defaultJumpPower
- local sprintSpeed = 30
- local isSprinting = false
- -- Handle character respawns
- LocalPlayer.CharacterAdded:Connect(function(char)
- Character = char
- Humanoid = char:WaitForChild("Humanoid")
- Humanoid.WalkSpeed = isSprinting and sprintSpeed or targetWalkSpeed
- Humanoid.JumpPower = targetJumpPower
- end)
- -- Sprint hotkey handling
- UIS.InputBegan:Connect(function(input, gpe)
- if gpe or not Humanoid then return end
- if input.KeyCode == Enum.KeyCode.LeftShift then
- isSprinting = true
- Humanoid.WalkSpeed = sprintSpeed
- end
- end)
- UIS.InputEnded:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.LeftShift and Humanoid then
- isSprinting = false
- Humanoid.WalkSpeed = targetWalkSpeed
- end
- end)
- -- Movement controls
- PlayerTab:CreateSlider({
- Name = "Walk Speed",
- Range = {0, 100},
- Increment = 1,
- Suffix = "Speed",
- CurrentValue = defaultWalkSpeed,
- Callback = function(val)
- targetWalkSpeed = val
- if not isSprinting and Humanoid then
- Humanoid.WalkSpeed = val
- end
- end,
- })
- PlayerTab:CreateSlider({
- Name = "Jump Power",
- Range = {0, 150},
- Increment = 1,
- Suffix = "Power",
- CurrentValue = defaultJumpPower,
- Callback = function(val)
- targetJumpPower = val
- if Humanoid then
- Humanoid.JumpPower = val
- end
- end,
- })
- -- ⚠️ Stealth-mode aim, masih bisa dibaca manusia
- local plrService = game:GetService("Players")
- local uis = game:GetService("UserInputService")
- local rs = game:GetService("RunService")
- local localPlr = plrService.LocalPlayer
- local cam = workspace.CurrentCamera
- PlayerTab:CreateLabel("aim Settings")
- -- Configurable Flags
- local aimbotOn = false
- local checkHp = true
- local wallFilter = true
- local teamSafe = false
- local fieldOfView = 150
- local focusBone = "Head"
- local aimKey = Enum.KeyCode.Q
- local bindKey = false
- local circleColor = Color3.fromRGB(255, 0, 0)
- -- FOV Circle (visual optional)
- local fovVisual = Drawing.new("Circle")
- fovVisual.Color = circleColor
- fovVisual.Thickness = 1
- fovVisual.NumSides = 60
- fovVisual.Radius = fieldOfView
- fovVisual.Filled = false
- fovVisual.Transparency = 1
- fovVisual.Visible = false
- rs.RenderStepped:Connect(function()
- fovVisual.Position = Vector2.new(cam.ViewportSize.X / 2, cam.ViewportSize.Y / 2)
- fovVisual.Visible = aimbotOn
- end)
- -- Wall Visibility Check
- local function canSee(part)
- local rayParams = RaycastParams.new()
- rayParams.FilterType = Enum.RaycastFilterType.Blacklist
- rayParams.FilterDescendantsInstances = {localPlr.Character}
- rayParams.IgnoreWater = true
- local rayResult = workspace:Raycast(cam.CFrame.Position, (part.Position - cam.CFrame.Position), rayParams)
- return rayResult == nil or rayResult.Instance:IsDescendantOf(part.Parent)
- end
- -- Target Finder
- local function acquireTarget()
- local closest, distance = nil, fieldOfView
- for _, plr in ipairs(plrService:GetPlayers()) do
- if plr ~= localPlr and plr.Character and plr.Character:FindFirstChild(focusBone) then
- local char = plr.Character
- local bone = char[focusBone]
- local screenPos, visible = cam:WorldToViewportPoint(bone.Position)
- if visible then
- local dist = (Vector2.new(screenPos.X, screenPos.Y) - Vector2.new(cam.ViewportSize.X / 2, cam.ViewportSize.Y / 2)).Magnitude
- if dist < distance then
- local isTeam = localPlr.Team and plr.Team and (localPlr.Team == plr.Team)
- if (not checkHp or (char:FindFirstChild("Humanoid") and char.Humanoid.Health > 0)) and
- (not wallFilter or canSee(bone)) and
- (not teamSafe or not isTeam) then
- closest = plr
- distance = dist
- end
- end
- end
- end
- end
- return closest
- end
- -- Aimbot Tracker
- rs.RenderStepped:Connect(function()
- if aimbotOn then
- local target = acquireTarget()
- if target and target.Character and target.Character:FindFirstChild(focusBone) then
- local targetPos = target.Character[focusBone].Position
- local direction = (targetPos - cam.CFrame.Position).Unit
- cam.CFrame = CFrame.new(cam.CFrame.Position, cam.CFrame.Position + direction)
- end
- end
- end)
- -- Key Toggle Handler
- uis.InputBegan:Connect(function(input, isGameProcessed)
- if isGameProcessed then return end
- if bindKey then
- aimKey = input.KeyCode
- bindKey = false
- Rayfield:Notify({
- Title = "Aimbot Key Updated",
- Content = "Now using: " .. tostring(aimKey),
- Duration = 3
- })
- elseif input.KeyCode == aimKey then
- aimbotOn = not aimbotOn
- end
- end)
- -- UI Controls
- PlayerTab:CreateInput({
- Name = "Set aim Hotkey",
- PlaceholderText = "Press any key...",
- RemoveTextAfterFocusLost = true,
- Callback = function()
- bindKey = true
- Rayfield:Notify({
- Title = "Keybinding",
- Content = "Press a key to bind aimbot toggle...",
- Duration = 3
- })
- end,
- })
- PlayerTab:CreateToggle({
- Name = "Check If Target Alive",
- CurrentValue = true,
- Callback = function(Value)
- checkHp = Value
- end
- })
- PlayerTab:CreateToggle({
- Name = "Team Check",
- CurrentValue = false,
- Callback = function(Value)
- teamSafe = Value
- Rayfield:Notify({
- Title = "Team Check",
- Content = "Now " .. (teamSafe and "ON" or "OFF"),
- Duration = 2
- })
- end,
- })
- PlayerTab:CreateToggle({
- Name = "Wall Check",
- CurrentValue = true,
- Callback = function(Value)
- wallFilter = Value
- end
- })
- PlayerTab:CreateDropdown({
- Name = "Target Bone",
- Options = {"Head", "HumanoidRootPart", "Torso"},
- CurrentOption = "Head",
- Callback = function(opt)
- focusBone = opt
- end
- })
- -- Stealth No Recoil Toggle (PlayerTab)
- local noRecoilEnabled = false
- local recoilOffset = 1.2
- PlayerTab:CreateToggle({
- Name = "Stealth No Recoil",
- CurrentValue = false,
- Callback = function(state)
- noRecoilEnabled = state
- Rayfield:Notify({
- Title = "No Recoil",
- Content = "No Recoil " .. (state and "Activated" or "Deactivated"),
- Duration = 2
- })
- end
- })
- -- Anti recoil logic (only while shooting)
- task.spawn(function()
- local userInput = game:GetService("UserInputService")
- local runService = game:GetService("RunService")
- runService.RenderStepped:Connect(function()
- if noRecoilEnabled and userInput:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
- local randX = math.random(-3, 3) / 10
- local randY = math.random(8, 12) / 10
- mousemoverel(randX, -randY * recoilOffset)
- end
- end)
- end)
- -- Visual Tab
- VisualTab:CreateLabel("ESP Settings")
- local EspColor = Color3.fromRGB(255, 0, 0)
- local connections = {}
- -- ESP functions
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local LocalPlayer = Players.LocalPlayer
- local EspColor = Color3.fromRGB(255, 0, 0)
- local EspMode = "All"
- local ShowName = false
- local ShowDistance = false
- local connections = {}
- VisualTab:CreateLabel("ESP Settings")
- local function randomId()
- return "ESP_" .. tostring(math.random(100000, 999999))
- end
- local function getTeam(player)
- return player.Team or nil
- end
- local function distanceFromLocal(character)
- if character and character:FindFirstChild("HumanoidRootPart") and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- return (character.HumanoidRootPart.Position - LocalPlayer.Character.HumanoidRootPart.Position).Magnitude
- end
- return 0
- end
- function AddESPToCharacter(player)
- local character = player.Character
- if not character or character:FindFirstChildWhichIsA("Highlight") then return end
- if EspMode == "Just Team" and getTeam(player) ~= getTeam(LocalPlayer) then return end
- if EspMode == "Just Enemy" and getTeam(player) == getTeam(LocalPlayer) then return end
- local highlight = Instance.new("Highlight")
- highlight.Name = randomId()
- highlight.FillColor = EspColor
- highlight.OutlineColor = Color3.new(1, 1, 1)
- highlight.FillTransparency = 0.5
- highlight.OutlineTransparency = 0
- highlight.Adornee = character
- highlight.Parent = character
- if ShowName or ShowDistance then
- local part = character:FindFirstChild("Head") or character:FindFirstChildWhichIsA("BasePart")
- if part then
- local billboard = Instance.new("BillboardGui")
- billboard.Name = "ESP_Info"
- billboard.Size = UDim2.new(0, 200, 0, 50)
- billboard.AlwaysOnTop = true
- billboard.StudsOffset = Vector3.new(0, 3, 0)
- billboard.Adornee = part
- billboard.Parent = character
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(1, 0, 1, 0)
- label.BackgroundTransparency = 1
- label.TextColor3 = EspColor
- label.TextStrokeTransparency = 0.5
- label.TextScaled = true
- label.Font = Enum.Font.SourceSansBold
- label.Parent = billboard
- local renderConn
- renderConn = RunService.RenderStepped:Connect(function()
- if not character or not character:FindFirstChild("HumanoidRootPart") or not billboard or not label then
- renderConn:Disconnect()
- return
- end
- local name = ShowName and player.Name or ""
- local dist = ShowDistance and string.format(" [%.0f]", distanceFromLocal(character)) or ""
- label.Text = name .. dist
- end)
- table.insert(connections, renderConn)
- end
- end
- end
- function TrackPlayer(player)
- local function OnCharacterAdded(character)
- task.wait(0.5)
- AddESPToCharacter(player)
- end
- if player.Character then
- AddESPToCharacter(player)
- end
- local conn = player.CharacterAdded:Connect(OnCharacterAdded)
- table.insert(connections, conn)
- end
- function EnableESP()
- for _, player in pairs(Players:GetPlayers()) do
- if player ~= LocalPlayer then
- TrackPlayer(player)
- end
- end
- local joinConn = Players.PlayerAdded:Connect(function(player)
- if player ~= LocalPlayer then
- TrackPlayer(player)
- end
- end)
- table.insert(connections, joinConn)
- end
- function DisableESP()
- for _, player in pairs(Players:GetPlayers()) do
- if player.Character then
- for _, v in pairs(player.Character:GetChildren()) do
- if v:IsA("Highlight") or v.Name == "ESP_Info" then
- v:Destroy()
- end
- end
- end
- end
- for _, conn in pairs(connections) do
- if conn.Disconnect then
- pcall(function() conn:Disconnect() end)
- end
- end
- connections = {}
- end
- -- UI Setup
- VisualTab:CreateColorPicker({
- Name = "ESP Color",
- Color = EspColor,
- Callback = function(Color)
- EspColor = Color
- end,
- })
- VisualTab:CreateDropdown({
- Name = "ESP Mode",
- Options = {"All", "Just Team", "Just Enemy"},
- CurrentOption = "All",
- Callback = function(Option)
- EspMode = Option
- end,
- })
- VisualTab:CreateToggle({
- Name = "Show Player Name",
- CurrentValue = false,
- Callback = function(Value)
- ShowName = Value
- end,
- })
- VisualTab:CreateToggle({
- Name = "Show Distance",
- CurrentValue = false,
- Callback = function(Value)
- ShowDistance = Value
- end,
- })
- VisualTab:CreateToggle({
- Name = "Enable ESP",
- CurrentValue = false,
- Callback = function(Value)
- if Value then
- EnableESP()
- else
- DisableESP()
- end
- end,
- })
- -- Miscellaneous Tab
- local antiFlingEnabled = false
- local antiFlingConnection = nil
- MiscTab:CreateToggle({
- Name = "Anti Fling",
- CurrentValue = false,
- Callback = function(Value)
- antiFlingEnabled = Value
- if Value then
- antiFlingConnection = game:GetService("RunService").Heartbeat:Connect(function()
- for _, player in pairs(game.Players:GetPlayers()) do
- if player ~= game.Players.LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local root = player.Character.HumanoidRootPart
- root.Velocity = Vector3.new(0, 0, 0)
- root.RotVelocity = Vector3.new(0, 0, 0)
- end
- end
- end)
- else
- if antiFlingConnection then
- antiFlingConnection:Disconnect()
- antiFlingConnection = nil
- end
- end
- Rayfield:Notify({
- Title = "Anti Fling",
- Content = "Anti Fling telah " .. (Value and "Diaktifkan" or "Dinonaktifkan"),
- Duration = 2
- })
- end,
- })
- MiscTab:CreateToggle({
- Name = "Fullbright",
- CurrentValue = false,
- Callback = function(Value)
- local lighting = game:GetService("Lighting")
- lighting.GlobalShadows = not Value
- lighting.Brightness = Value and 2 or 1
- end,
- })
- local noclip = false
- local noclipConnection = nil
- -- Fungsi toggle Noclip
- local function toggleNoclip(state)
- noclip = state
- if noclip then
- noclipConnection = game:GetService("RunService").Stepped:Connect(function()
- local char = game.Players.LocalPlayer.Character
- if char then
- for _, part in pairs(char:GetDescendants()) do
- if part:IsA("BasePart") then
- part.CanCollide = false
- end
- end
- end
- end)
- else
- if noclipConnection then
- noclipConnection:Disconnect()
- noclipConnection = nil
- end
- end
- end
- -- Tambahkan toggle ke GUI
- MiscTab:CreateToggle({
- Name = "No Clip",
- CurrentValue = false,
- Callback = function(Value)
- toggleNoclip(Value)
- Rayfield:Notify({
- Title = "Noclip",
- Content = "Noclip " .. (Value and "Diaktifkan" or "Dinonaktifkan"),
- Duration = 2
- })
- end,
- })
- -- Reaktifkan noclip saat respawn
- game.Players.LocalPlayer.CharacterAdded:Connect(function()
- if noclip then
- wait(1)
- toggleNoclip(true)
- end
- end)
- local afkConnection = nil
- MiscTab:CreateToggle({
- Name = "Anti AFK",
- CurrentValue = false,
- Callback = function(Value)
- -- Obfuscation untuk mengurangi deteksi
- local VirtualUser = game:GetService("\86\105\114\116\117\97\108\85\115\101\114") -- "VirtualUser" dalam ASCII
- local Players = game:GetService("\80\108\97\121\101\114\115") -- "Players" dalam ASCII
- if Value then
- -- Putuskan koneksi lama jika ada
- if afkConnection then
- afkConnection:Disconnect()
- afkConnection = nil
- end
- -- Metode utama (VirtualUser)
- afkConnection = Players.LocalPlayer.Idled:Connect(function()
- pcall(function()
- VirtualUser:CaptureController()
- task.wait(math.random(0.5, 2)) -- Random delay
- VirtualUser:ClickButton2(Vector2.new())
- end)
- end)
- -- Backup method (jika VirtualUser gagal)
- task.spawn(function()
- while Value and task.wait(30) do -- Backup setiap 30 detik
- pcall(function()
- game:GetService("VirtualInputManager"):SendKeyEvent(true, "W", false, game)
- task.wait(0.1)
- game:GetService("VirtualInputManager"):SendKeyEvent(false, "W", false, game)
- end)
- end
- end)
- Rayfield:Notify({
- Title = "Anti AFK",
- Content = "Diaktifkan (Mode Hybrid)",
- Duration = 2,
- Image = 4483362458
- })
- else
- if afkConnection then
- afkConnection:Disconnect()
- afkConnection = nil
- end
- Rayfield:Notify({
- Title = "Anti AFK",
- Content = "Dinonaktifkan",
- Duration = 2,
- Image = 4483362458
- })
- end
- end,
- })
- MiscTab:CreateToggle({
- Name = "Anti AFK",
- CurrentValue = false,
- Callback = AntiAFK
- })
- MiscTab:CreateToggle({
- Name = "Anti AFK",
- CurrentValue = false,
- Callback = function(Value)
- if Value then
- -- Gunakan VirtualUser sebagai ganti VirtualInputManager
- afkConnection = game:GetService("Players").LocalPlayer.Idled:Connect(function()
- game:GetService("VirtualUser"):CaptureController()
- game:GetService("VirtualUser"):ClickButton2(Vector2.new())
- end)
- Rayfield:Notify({
- Title = "Anti AFK",
- Content = "Diaktifkan (Mode Aman)",
- Duration = 2
- })
- elseif afkConnection then
- afkConnection:Disconnect()
- afkConnection = nil
- Rayfield:Notify({
- Title = "Anti AFK",
- Content = "Dinonaktifkan",
- Duration = 2
- })
- end
- end,
- })
- local TargetFPS = 60
- MiscTab:CreateSlider({
- Name = "Set Max FPS",
- Range = {1, 240},
- Increment = 1,
- Suffix = "FPS",
- CurrentValue = 60,
- Callback = function(Value)
- TargetFPS = Value
- if setfpscap then
- setfpscap(TargetFPS)
- end
- end,
- })
- MiscTab:CreateButton({
- Name = "Destroy GUI",
- Callback = function()
- DisableESP()
- if circle then circle:Remove() end
- Rayfield:Destroy()
- end
- })
- --theme tab
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement