local Players = game:GetService("Players") local RunService = game:GetService("RunService") local LocalPlayer = Players.LocalPlayer local PlayerGui = LocalPlayer:WaitForChild("PlayerGui") local ESP_ENABLED = true local BOX_ENABLED = true local SKELETON_ENABLED = true local TRACER_ENABLED = true local NAME_ENABLED = true local hue = 0 local espObjects = {} local playerConnections = {} --================================================== -- GUI --================================================== local oldGui = PlayerGui:FindFirstChild("YOGAexeESP") if oldGui then oldGui:Destroy() end local gui = Instance.new("ScreenGui") gui.Name = "YOGAexeESP" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.Parent = PlayerGui --================================================== -- CREDIT --================================================== local credit = Instance.new("TextLabel") credit.Size = UDim2.new(0, 160, 0, 30) credit.Position = UDim2.new(1, -170, 0, 10) credit.BackgroundTransparency = 1 credit.Text = "By YOGAexe" credit.TextScaled = true credit.Font = Enum.Font.GothamBold credit.TextStrokeTransparency = 0.2 credit.Parent = gui --================================================== -- TOGGLE --================================================== local toggle = Instance.new("TextButton") toggle.Size = UDim2.new(0, 80, 0, 32) toggle.Position = UDim2.new(0, 15, 1, -48) toggle.BackgroundColor3 = Color3.fromRGB(25, 25, 25) toggle.BackgroundTransparency = 0.15 toggle.BorderSizePixel = 0 toggle.Text = "OPEN" toggle.TextScaled = true toggle.Font = Enum.Font.GothamBold toggle.TextStrokeTransparency = 0.35 -- Tidak berubah ukuran saat ditekan toggle.AutoButtonColor = false toggle.Parent = gui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 8) corner.Parent = toggle --================================================== -- REMOVE ESP --================================================== local function removeESP(player) local data = espObjects[player] if not data then return end if data.objects then for _, obj in ipairs(data.objects) do if obj then pcall(function() obj:Destroy() end) end end end espObjects[player] = nil end --================================================== -- CREATE ATTACHMENT --================================================== local function makeAttachment(part, name, objects) if not part then return nil end local attachment = Instance.new("Attachment") attachment.Name = name attachment.Parent = part table.insert(objects, attachment) return attachment end --================================================== -- SKELETON BONE --================================================== local function makeBone(part0, part1, objects) if not part0 or not part1 then return end local a0 = makeAttachment( part0, "YOGA_SkeletonA", objects ) local a1 = makeAttachment( part1, "YOGA_SkeletonB", objects ) if not a0 or not a1 then return end local beam = Instance.new("Beam") beam.Name = "YOGA_Skeleton" beam.Attachment0 = a0 beam.Attachment1 = a1 beam.Width0 = 0.04 beam.Width1 = 0.04 beam.FaceCamera = true beam.LightEmission = 1 beam.Segments = 1 beam.Parent = part0 table.insert(objects, beam) end --================================================== -- CREATE ESP --================================================== local function createESP(player) if player == LocalPlayer then return end if not ESP_ENABLED then return end local character = player.Character if not character then return end local humanoid = character:FindFirstChildOfClass("Humanoid") local root = character:FindFirstChild("HumanoidRootPart") local head = character:FindFirstChild("Head") if not humanoid or not root or not head then return end -- Jangan pernah numpuk ESP removeESP(player) local objects = {} --================================================ -- BOX --================================================ local box if BOX_ENABLED then box = Instance.new("Highlight") box.Name = "YOGA_Box" box.Adornee = character box.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop box.FillTransparency = 0.92 box.OutlineTransparency = 0 box.Parent = character table.insert(objects, box) end --================================================ -- NAME --================================================ local nameLabel if NAME_ENABLED then local billboard = Instance.new("BillboardGui") billboard.Name = "YOGA_Name" billboard.Adornee = head billboard.Size = UDim2.new(0, 160, 0, 25) billboard.StudsOffset = Vector3.new(0, 3, 0) billboard.AlwaysOnTop = true billboard.Parent = head table.insert(objects, billboard) nameLabel = Instance.new("TextLabel") nameLabel.Size = UDim2.fromScale(1, 1) nameLabel.BackgroundTransparency = 1 nameLabel.Text = player.DisplayName nameLabel.TextScaled = true nameLabel.Font = Enum.Font.GothamBold nameLabel.TextStrokeTransparency = 0.25 nameLabel.Parent = billboard table.insert(objects, nameLabel) end --================================================ -- SKELETON --================================================ if SKELETON_ENABLED then -- R15 local upperTorso = character:FindFirstChild("UpperTorso") local lowerTorso = character:FindFirstChild("LowerTorso") if upperTorso then makeBone( head, upperTorso, objects ) local leftUpperArm = character:FindFirstChild("LeftUpperArm") local leftLowerArm = character:FindFirstChild("LeftLowerArm") local leftHand = character:FindFirstChild("LeftHand") local rightUpperArm = character:FindFirstChild("RightUpperArm") local rightLowerArm = character:FindFirstChild("RightLowerArm") local rightHand = character:FindFirstChild("RightHand") local leftUpperLeg = character:FindFirstChild("LeftUpperLeg") local leftLowerLeg = character:FindFirstChild("LeftLowerLeg") local leftFoot = character:FindFirstChild("LeftFoot") local rightUpperLeg = character:FindFirstChild("RightUpperLeg") local rightLowerLeg = character:FindFirstChild("RightLowerLeg") local rightFoot = character:FindFirstChild("RightFoot") if leftUpperArm then makeBone( upperTorso, leftUpperArm, objects ) end if leftLowerArm then makeBone( leftUpperArm, leftLowerArm, objects ) end if leftHand then makeBone( leftLowerArm, leftHand, objects ) end if rightUpperArm then makeBone( upperTorso, rightUpperArm, objects ) end if rightLowerArm then makeBone( rightUpperArm, rightLowerArm, objects ) end if rightHand then makeBone( rightLowerArm, rightHand, objects ) end if lowerTorso then makeBone( upperTorso, lowerTorso, objects ) if leftUpperLeg then makeBone( lowerTorso, leftUpperLeg, objects ) end if leftLowerLeg then makeBone( leftUpperLeg, leftLowerLeg, objects ) end if leftFoot then makeBone( leftLowerLeg, leftFoot, objects ) end if rightUpperLeg then makeBone( lowerTorso, rightUpperLeg, objects ) end if rightLowerLeg then makeBone( rightUpperLeg, rightLowerLeg, objects ) end if rightFoot then makeBone( rightLowerLeg, rightFoot, objects ) end end else -- R6 local torso = character:FindFirstChild("Torso") if torso then makeBone( head, torso, objects ) local leftArm = character:FindFirstChild("Left Arm") local rightArm = character:FindFirstChild("Right Arm") local leftLeg = character:FindFirstChild("Left Leg") local rightLeg = character:FindFirstChild("Right Leg") if leftArm then makeBone( torso, leftArm, objects ) end if rightArm then makeBone( torso, rightArm, objects ) end if leftLeg then makeBone( torso, leftLeg, objects ) end if rightLeg then makeBone( torso, rightLeg, objects ) end end end end --================================================ -- TRACER --================================================ local tracer if TRACER_ENABLED then tracer = Instance.new("Frame") tracer.Name = "YOGA_Tracer" tracer.AnchorPoint = Vector2.new(0.5, 0.5) tracer.BorderSizePixel = 0 tracer.Size = UDim2.fromOffset(2, 100) tracer.Visible = false tracer.Parent = gui table.insert(objects, tracer) end --================================================ -- SAVE --================================================ espObjects[player] = { character = character, objects = objects, box = box, label = nameLabel, tracer = tracer } --================================================ -- CHARACTER DIED --================================================ humanoid.Died:Connect(function() -- Jangan hapus data player permanen. -- CharacterAdded akan membuat ESP baru. removeESP(player) end) end --================================================== -- WAIT UNTIL CHARACTER READY --================================================== local function createWhenReady(player) if not ESP_ENABLED then return end for i = 1, 30 do if not ESP_ENABLED then return end local character = player.Character if character then local humanoid = character:FindFirstChildOfClass("Humanoid") local root = character:FindFirstChild("HumanoidRootPart") local head = character:FindFirstChild("Head") if humanoid and root and head then -- Pastikan character masih character terbaru if player.Character == character then createESP(player) end return end end task.wait(0.2) end end --================================================== -- SETUP PLAYER --================================================== local function setupPlayer(player) if player == LocalPlayer then return end -- Jangan pasang connection dua kali if playerConnections[player] then return end local connections = {} playerConnections[player] = connections --============================================== -- CHARACTER ADDED --============================================== table.insert( connections, player.CharacterAdded:Connect(function(character) -- Bersihkan ESP karakter lama removeESP(player) -- Tunggu karakter benar-benar siap task.spawn(function() task.wait(0.15) -- Pastikan ini masih character terbaru if player.Character == character then createWhenReady(player) end end) end) ) --============================================== -- CHARACTER REMOVING --============================================== table.insert( connections, player.CharacterRemoving:Connect(function(character) local data = espObjects[player] if data and data.character == character then removeESP(player) end end) ) --============================================== -- CHARACTER SEKARANG --============================================== if player.Character then task.spawn(function() createWhenReady(player) end) end end --================================================== -- EXISTING PLAYERS --================================================== for _, player in ipairs(Players:GetPlayers()) do setupPlayer(player) end --================================================== -- NEW PLAYER --================================================== Players.PlayerAdded:Connect(function(player) setupPlayer(player) end) --================================================== -- PLAYER LEAVING --================================================== Players.PlayerRemoving:Connect(function(player) removeESP(player) if playerConnections[player] then for _, connection in ipairs(playerConnections[player]) do pcall(function() connection:Disconnect() end) end end playerConnections[player] = nil end) --================================================== -- OPEN / CLOSE --================================================== toggle.Activated:Connect(function() ESP_ENABLED = not ESP_ENABLED if ESP_ENABLED then toggle.Text = "OPEN" -- Bersihkan semuanya dulu local players = {} for player in pairs(espObjects) do table.insert(players, player) end for _, player in ipairs(players) do removeESP(player) end -- Buat satu kali untuk semua player for _, player in ipairs(Players:GetPlayers()) do if player ~= LocalPlayer then task.spawn(function() createWhenReady(player) end) end end else toggle.Text = "CLOSE" local players = {} for player in pairs(espObjects) do table.insert(players, player) end for _, player in ipairs(players) do removeESP(player) end end end) --================================================== -- RAINBOW + TRACER --================================================== RunService.RenderStepped:Connect(function() hue = (hue + 0.008) % 1 local rainbow = Color3.fromHSV( hue, 1, 1 ) credit.TextColor3 = rainbow toggle.TextColor3 = rainbow -- Paksa ukuran tombol tetap toggle.Size = UDim2.new(0, 80, 0, 32) for player, data in pairs(espObjects) do --============================================ -- Pastikan character masih valid --============================================ if not player.Parent then removeESP(player) else local character = player.Character if not character or data.character ~= character then removeESP(player) else --==================================== -- BOX --==================================== if data.box then data.box.OutlineColor = rainbow data.box.FillColor = rainbow end --==================================== -- NAME --==================================== if data.label then data.label.TextColor3 = rainbow end --==================================== -- SKELETON --==================================== for _, object in ipairs(data.objects) do if object:IsA("Beam") and object.Name == "YOGA_Skeleton" then object.Color = ColorSequence.new(rainbow) end end --==================================== -- TRACER --==================================== if data.tracer then local root = character:FindFirstChild( "HumanoidRootPart" ) local camera = workspace.CurrentCamera if root and camera then local position, visible = camera:WorldToViewportPoint( root.Position ) if visible and position.Z > 0 then local startX = camera.ViewportSize.X / 2 local startY = camera.ViewportSize.Y local endX = position.X local endY = position.Y local dx = endX - startX local dy = endY - startY local distance = math.sqrt( dx * dx + dy * dy ) local angle = math.deg( math.atan2( dy, dx ) ) + 90 data.tracer.Visible = true data.tracer.Position = UDim2.fromOffset( (startX + endX) / 2, (startY + endY) / 2 ) data.tracer.Size = UDim2.fromOffset( 2, distance ) data.tracer.Rotation = angle data.tracer.BackgroundColor3 = rainbow else data.tracer.Visible = false end else data.tracer.Visible = false end end end end end end)