--[[ HOW TO USE: 1. Place this script as a LocalScript in StarterPlayerScripts or StarterGui. 2. Change CURSOR_ID below to your desired image asset id (format: "rbxassetid://XXXXXXXX"). 3. Optionally adjust CURSOR_SIZE and CURSOR_OFFSET. 4. The script will replace any default game cursor, even if the game sets its own! Supports both PC and Mobile (touch). ]] ---------------- USER SETTINGS ---------------- local CURSOR_ID = "rbxassetid://[image id]" -- <--- Change this to your image asset ID! local CURSOR_SIZE = UDim2.new(0, 79, 0, 79) -- Cursor size (width, height in pixels) local CURSOR_OFFSET = Vector2.new(0, 0) -- Offset from pointer ------------------------------------------------ local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") -- Hide the default cursor UserInputService.MouseIconEnabled = false -- Create GUI for custom cursor local gui = Instance.new("ScreenGui") gui.Name = "UniversalCustomCursorGui" gui.IgnoreGuiInset = true gui.ResetOnSpawn = false gui.Parent = game:GetService("CoreGui") local cursor = Instance.new("ImageLabel") cursor.Name = "CustomCursor" cursor.BackgroundTransparency = 1 cursor.Size = CURSOR_SIZE cursor.Image = CURSOR_ID cursor.AnchorPoint = Vector2.new(0.5, 0.5) cursor.ZIndex = 9999 cursor.Parent = gui -- Update cursor position each frame local function updateCursorPosition() if UserInputService.TouchEnabled then local touches = UserInputService:GetTouchPositions() if #touches > 0 then cursor.Visible = true local pos = touches[1] cursor.Position = UDim2.new(0, pos.X + CURSOR_OFFSET.X, 0, pos.Y + CURSOR_OFFSET.Y) else cursor.Visible = false end else cursor.Visible = true local pos = UserInputService:GetMouseLocation() cursor.Position = UDim2.new(0, pos.X + CURSOR_OFFSET.X, 0, pos.Y + CURSOR_OFFSET.Y) end end RunService.RenderStepped:Connect(updateCursorPosition) -- If the game tries to change the default cursor, keep hiding it UserInputService:GetPropertyChangedSignal("MouseIconEnabled"):Connect(function() UserInputService.MouseIconEnabled = false end) -- Restore default cursor if script GUI is removed gui.AncestryChanged:Connect(function() if not gui:IsDescendantOf(game:GetService("CoreGui")) then UserInputService.MouseIconEnabled = true end end) -- Hide custom cursor when Roblox menu is open pcall(function() game:GetService("StarterGui").MenuOpened:Connect(function() cursor.Visible = false end) game:GetService("StarterGui").MenuClosed:Connect(function() cursor.Visible = true end) end)