if(game:GetService("\080\108\097\121\101\114\115")).LocalPlayer then local o=game.Players.LocalPlayer:GetMouse();(getmetatable(Mouse)).__index=function(M,U)return o[U]end end local o=Instance.new("\083\099\114\101\101\110\071\117\105")o.DisplayOrder=10 local M=Instance.new("\073\109\097\103\101\076\097\098\101\108")M.BackgroundTransparency=1 M.Size=UDim2.new(0,32,0,32)M.Parent=o M.AnchorPoint=Vector2.new(.5,.5)function Mouse.SetGuiIcon(U)local k=true if U.Enabled~=nil then k=U.Enabled end if k then if game.Players.LocalPlayer then o.Parent=game.Players.LocalPlayer.PlayerGui else o.Parent=game.CoreGui end else o.Parent=nil end;(game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")).MouseIconEnabled=not k if U[1]then M.Image=U[1]end if U.Rotation then M.Rotation=U.Rotation end;(game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")).InputChanged:connect(function(o)if o.UserInputType==Enum.UserInputType.MouseMovement then local U=o.Position M.Position=UDim2.new(0,U.x,0,U.y)end end)end function Mouse.Teardown()o.Parent=nil;(game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")).MouseIconEnabled=true _G.MouseTeardown=nil end _G.MouseTeardown=Mouse.Teardown return Mouse
--TODO: try to find a way to get this in studio as well.
if game:GetService("Players").LocalPlayer then
	local realMouse = game.Players.LocalPlayer:GetMouse()
	getmetatable(Mouse).__index = function(self, i)
		return realMouse[i]
	end
end

local gui = Instance.new("ScreenGui")
gui.DisplayOrder = 10
local image = Instance.new("ImageLabel")
image.BackgroundTransparency = 1
image.Size = UDim2.new(0, 32, 0, 32)
image.Parent = gui
image.AnchorPoint = Vector2.new(0.5, 0.5)

function Mouse.SetGuiIcon(params)
	local enable = true
	if params.Enabled ~= nil then
		enable = params.Enabled
	end
	if enable then
		if game.Players.LocalPlayer then
			gui.Parent = game.Players.LocalPlayer.PlayerGui
		else
			gui.Parent = game.CoreGui
		end
	else
		gui.Parent = nil
	end
	game:GetService("UserInputService").MouseIconEnabled = not enable
	if params[1] then
		image.Image = params[1]
	end
	if params.Rotation then
		image.Rotation = params.Rotation
	end
	game:GetService("UserInputService").InputChanged:connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseMovement then
			local p = input.Position
			image.Position = UDim2.new(0, p.x, 0, p.y)
		end
	end)
end

function Mouse.Teardown()
	gui.Parent = nil
	game:GetService("UserInputService").MouseIconEnabled = true
	_G.MouseTeardown = nil
end
_G.MouseTeardown = Mouse.Teardown

return Mouse
