Script set in StarterCharacter
-- Press "V" to unlock/lock the players Mouse
game:GetService("Players").LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.V then
if game.Players.LocalPlayer.PlayerGui.FreeMouse.FreeMouseButton.Visible == false then
game.Players.LocalPlayer.PlayerGui.FreeMouse.FreeMouseButton.Visible = true
else
game.Players.LocalPlayer.PlayerGui.FreeMouse.FreeMouseButton.Visible = false
end
end
end)
-- Enable the Cursor
local uis = game:GetService("UserInputService")
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxassetid://15096364738"
while true do
wait(.1)
uis.MouseIconEnabled = true
end