-- Script: Mobile Mouse Buttons for Delta X -- Left and Right Mouse Click buttons on screen local VirtualInputManager = game:GetService("VirtualInputManager") local Players = game:GetService("Players") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- Create ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Name = "MobileMouseButtons" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui -- Main Frame local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 180, 0, 100) mainFrame.Position = UDim2.new(0, 20, 1, -140) -- Bottom left corner mainFrame.BackgroundTransparency = 1 mainFrame.Parent = screenGui -- Left Mouse Button local leftButton = Instance.new("TextButton") leftButton.Name = "LeftClick" leftButton.Size = UDim2.new(0, 80, 0, 80) leftButton.Position = UDim2.new(0, 0, 0, 0) leftButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255) leftButton.Text = "LMB\n(Left)" leftButton.TextColor3 = Color3.new(1,1,1) leftButton.TextScaled = true leftButton.Font = Enum.Font.GothamBold leftButton.Parent = mainFrame local leftCorner = Instance.new("UICorner") leftCorner.CornerRadius = UDim.new(0, 16) leftCorner.Parent = leftButton -- Right Mouse Button local rightButton = Instance.new("TextButton") rightButton.Name = "RightClick" rightButton.Size = UDim2.new(0, 80, 0, 80) rightButton.Position = UDim2.new(0, 95, 0, 0) rightButton.BackgroundColor3 = Color3.fromRGB(255, 100, 100) rightButton.Text = "RMB\n(Right)" rightButton.TextColor3 = Color3.new(1,1,1) rightButton.TextScaled = true rightButton.Font = Enum.Font.GothamBold rightButton.Parent = mainFrame local rightCorner = Instance.new("UICorner") rightCorner.CornerRadius = UDim.new(0, 16) rightCorner.Parent = rightButton -- Function to send mouse button event local function sendMouseButton(x, y, button, isDown) VirtualInputManager:SendMouseButtonEvent(x, y, button, isDown, game, 0) end -- Left Button Logic leftButton.MouseButton1Down:Connect(function() local pos = leftButton.AbsolutePosition local size = leftButton.AbsoluteSize local x = pos.X + size.X / 2 local y = pos.Y + size.Y / 2 sendMouseButton(x, y, 0, true) -- 0 = Left Mouse Button end) leftButton.MouseButton1Up:Connect(function() local pos = leftButton.AbsolutePosition local size = leftButton.AbsoluteSize local x = pos.X + size.X / 2 local y = pos.Y + size.Y / 2 sendMouseButton(x, y, 0, false) end) -- Right Button Logic rightButton.MouseButton1Down:Connect(function() local pos = rightButton.AbsolutePosition local size = rightButton.AbsoluteSize local x = pos.X + size.X / 2 local y = pos.Y + size.Y / 2 sendMouseButton(x, y, 1, true) -- 1 = Right Mouse Button end) rightButton.MouseButton1Up:Connect(function() local pos = rightButton.AbsolutePosition local size = rightButton.AbsoluteSize local x = pos.X + size.X / 2 local y = pos.Y + size.Y / 2 sendMouseButton(x, y, 1, false) end) print("✅ Mobile Mouse Buttons Loaded! (Delta X)")Create script