Skip to content

Commit

Permalink
add shiftlock cmd and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
fatesc committed May 21, 2021
1 parent 1641c9b commit f8f75a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ PluginLibrary.GetHumanoid = GetHumanoid
local GetMagnitude = function(Plr)
return Plr and (GetRoot(Plr).Position - GetRoot().Position).magnitude or math.huge
end
PluginLibrary.GetHumanoid = GetMagnitude
PluginLibrary.GetMagnitude = GetMagnitude

local Settings = {
Prefix = "!",
Expand Down Expand Up @@ -4358,6 +4358,14 @@ AddCommand("bypass", {"clientbypass"}, "client sided bypass", {3}, function()
return "clientsided bypass enabled"
end)

AddCommand("shiftlock", {}, "enables shiftlock in your game (some games have it off)", {}, function()
if (LocalPlayer.DevEnableMouseLock) then
return "shiftlock is already on"
end
LocalPlayer.DevEnableMouseLock = true
return "shiftlock is now on"
end)

local PlrChat = function(i, plr)
if (not Connections.Players[plr.Name]) then
Connections.Players[plr.Name] = {}
Expand Down
10 changes: 9 additions & 1 deletion src/lua/admin.main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ PluginLibrary.GetHumanoid = GetHumanoid
local GetMagnitude = function(Plr)
return Plr and (GetRoot(Plr).Position - GetRoot().Position).magnitude or math.huge
end
PluginLibrary.GetHumanoid = GetMagnitude
PluginLibrary.GetMagnitude = GetMagnitude

local Settings = {
Prefix = "!",
Expand Down Expand Up @@ -3004,6 +3004,14 @@ AddCommand("bypass", {"clientbypass"}, "client sided bypass", {3}, function()
return "clientsided bypass enabled"
end)

AddCommand("shiftlock", {}, "enables shiftlock in your game (some games have it off)", {}, function()
if (LocalPlayer.DevEnableMouseLock) then
return "shiftlock is already on"
end
LocalPlayer.DevEnableMouseLock = true
return "shiftlock is now on"
end)

local PlrChat = function(i, plr)
if (not Connections.Players[plr.Name]) then
Connections.Players[plr.Name] = {}
Expand Down

0 comments on commit f8f75a0

Please sign in to comment.