local Lib = getgenv().Library local W = Lib.CurrentWindow local UIS = game:GetService("UserInputService") print("[mob] touch device " .. tostring(UIS.TouchEnabled) .. " | viewport " .. workspace.CurrentCamera.ViewportSize.X .. "x" .. workspace.CurrentCamera.ViewportSize.Y) -- force the mobile button like a phone would have Lib:SetMobileButton(true) task.wait(0.3) local B = Lib.MobileButton.Instance print(string.format("[mob] button %dx%d at %.0f,%.0f", B.AbsoluteSize.X, B.AbsoluteSize.Y, B.AbsolutePosition.X, B.AbsolutePosition.Y)) print("[mob] button drag handlers " .. (function() local ok,c = pcall(function() return #getconnections(Lib.MobileButton.Instance.InputBegan) end) return tostring(ok and c) end)()) print("[mob] button ended handlers " .. (function() local ok,c = pcall(function() return #getconnections(Lib.MobileButton.Instance.InputEnded) end) return tostring(ok and c) end)()) -- simulate a drag by moving it, and a tap by leaving it in place B.Position = UDim2.new(1, -60, 0, 120) task.wait(0.2) print(string.format("[mob] after manual move: %.0f,%.0f", B.AbsolutePosition.X, B.AbsolutePosition.Y)) -- touch targets local function FindSlider() for _, I in ipairs(W.Items["Body"].Instance:GetDescendants()) do if I:IsA("TextButton") and I.AbsoluteSize.X == 104 and I.AbsoluteSize.Y == 24 then return I end end end local S = FindSlider() print("[mob] slider hit box " .. (S and (S.AbsoluteSize.X .. "x" .. S.AbsoluteSize.Y) or "none")) -- esp preview docking when there is no room on the right Lib:SetEspPreview(false) task.wait(0.2) Main = W.Items["MainFrame"].Instance local RightEdge = Main.AbsolutePosition.X + Main.AbsoluteSize.X print(string.format("[mob] window right=%.0f viewport=%.0f room=%.0f", RightEdge, workspace.CurrentCamera.ViewportSize.X, workspace.CurrentCamera.ViewportSize.X - RightEdge)) Lib:SetEspPreview(true, { Title = "ESP Preview" }) task.wait(0.5) local Root = Lib.EspPreviewState.Items["Root"].Instance print(string.format("[mob] esp at %.0f,%.0f (window bottom %.0f) -> %s", Root.AbsolutePosition.X, Root.AbsolutePosition.Y, Main.AbsolutePosition.Y + Main.AbsoluteSize.Y, Root.AbsolutePosition.Y > Main.AbsolutePosition.Y + Main.AbsoluteSize.Y and "docked under window" or "docked to the right")) Lib:SetMobileButton(false)