Group lock wont work with PVEye

PVEye is a fps cheater dectector and allows to easily catch people, I am currently having a issue with the settings script for it, as the module script that requires this settings script works perfectly fine but the issue is if try to use the command “!pveye” when I am in the group it doesn’t work, but it seems like the private server code works, I am little confused and need help for this script

local Player = game.Players.LocalPlayer
local Group = "Player:GetRankInGroup(16968869) >= 3"


return {
	Humiliate = false, 
	ScreenWatch = {
		Enabled = true, 
		PVEye_Admins = true, 
		Admins = { Group, game.PrivateServerOwnerId}, 
		Command = "!pveye"	
	}, 
	Bans = {
		DataStore = "Bans_1", 
		PVEye_Bans = true, 
		List = {}, 
		KickMessage = "PVEye Detected: Banned from the game"
	}, 
	PVEyeSecured = {
		HitBoxExpand = {
			Enabled = true, 
			Punish = "SBan", 
			KickMessage = "PVEye Detected: Hit Box Expanding", 
			MessageSettings = {
				Text = function(p1)
					return "HBE detected in " .. p1 .. "!";
				end, 
				Color = Color3.fromRGB(255, 0, 0), 
				Font = Enum.Font.SourceSansBold, 
				FontSize = Enum.FontSize.Size18
			}
		}, 
		ESP = {
			Enabled = false, 
			Punish = "SBan", 
			KickMessage = "PVEye Detected: Extra Sensory Perception", 
			MessageSettings = {
				Text = function(p2)
					return "ESP detected in " .. p2 .. "!";
				end, 
				Color = Color3.fromRGB(255, 0, 0), 
				Font = Enum.Font.SourceSansBold, 
				FontSize = Enum.FontSize.Size18
			}
		}, 
		Aimbot = {
			Enabled = false, 
			Punish = "SBan", 
			KickMessage = "PVEye Detected: Aimbot", 
			MessageSettings = {
				Text = function(p3)
					return "Aimbot detected in " .. p3 .. "!";
				end, 
				Color = Color3.fromRGB(255, 0, 0), 
				Font = Enum.Font.SourceSansBold, 
				FontSize = Enum.FontSize.Size18
			}
		}
	}
};
4 Likes

I never used “pveye” but try changing the group variable to

(Player:GetRankInGroup(16968869) >= 3 and Player.UserId)
2 Likes

sadly it didnt work


module script wont load now

1 Like

You can’t use the LocalPlayer property if you are calling the module script from a server-sided script what are you trying to do with this table that you are returning

yeah i switched it to local

Players = game:GetService("Players")

local Group
for _, plr in ipairs(Players:GetPlayers()) do
	Group = plr:GetRankInGroup(16968869) >= 3
end

from there it just didnt work, and the table loads the admins within the list so if i am in the given group ID it will load my username onto the module script thats in the 3rd error line and will allow me to use those cheater tools, like screen watch, if i am not in the table i cant see the pveye gui

i thought this would work as its running on server now but it just doesnt do the command, not even the priv server works with that change too

1 Like

So when I said you can’t use the LocalPlayer property I wasn’t trying to say switch it to local because this gives exploiters a lot of power that they can abuse try making the table into a changing table and making an Index in the module so something like this:

local Module = {}
Module.PVEye = {
	Humiliate = false, 
	ScreenWatch = {
		Enabled = true, 
		PVEye_Admins = true, 
		Admins = {if game.PrivateServerOwnerId ~= 0 then game.PrivateServerOwnerId else nil   }, 
		Command = "!pveye"	
	}, 
	Bans = {
		DataStore = "Bans_1", 
		PVEye_Bans = true, 
		List = {}, 
		KickMessage = "PVEye Detected: Banned from the game"
	}, 
	PVEyeSecured = {
		HitBoxExpand = {
			Enabled = true, 
			Punish = "SBan", 
			KickMessage = "PVEye Detected: Hit Box Expanding", 
			MessageSettings = {
				Text = function(p1)
					return "HBE detected in " .. p1 .. "!";
				end, 
				Color = Color3.fromRGB(255, 0, 0), 
				Font = Enum.Font.SourceSansBold, 
				FontSize = Enum.FontSize.Size18
			}
		}, 
		ESP = {
			Enabled = false, 
			Punish = "SBan", 
			KickMessage = "PVEye Detected: Extra Sensory Perception", 
			MessageSettings = {
				Text = function(p2)
					return "ESP detected in " .. p2 .. "!";
				end, 
				Color = Color3.fromRGB(255, 0, 0), 
				Font = Enum.Font.SourceSansBold, 
				FontSize = Enum.FontSize.Size18
			}
		}, 
		Aimbot = {
			Enabled = false, 
			Punish = "SBan", 
			KickMessage = "PVEye Detected: Aimbot", 
			MessageSettings = {
				Text = function(p3)
					return "Aimbot detected in " .. p3 .. "!";
				end, 
				Color = Color3.fromRGB(255, 0, 0), 
				Font = Enum.Font.SourceSansBold, 
				FontSize = Enum.FontSize.Size18
			}
		}
	}
}


game.Players.PlayerAdded:Connect(function(Player)
	if Player:IsInGroup(16968869) and Player:GetRankInGroup(16968869) >= 3 then
		table.insert(Module.PVEye.ScreenWatch.Admins, Player.UserId)
	end
end)

return Module

To implement this run the module script when the server starts and get the same table by

Module. PVEye 
1 Like

i wouldnt know how to do this as its notmy script and i meant to say i changed it from local to server my bad

1 Like

I haven’t changed it a lot you can still use the module script the same but now it returns a table with a table named PVEye in it you use it and get the table

doesnt load just retruns an error with the hitbox

Can you send a ss of the error

Can you add a print and print what gets returned by the module before that line please

its just using the same settings as the script thas what it retruns

No can you try what I said and try printing it because the error looks to me like the table isn’t being returned properly

i dont know how to do it

--[[
	CREDIT:
		PhantomVisual
		Aritional (gave good advice)
	
	MESSAGE:
		Hi, PhantomVisual here.
		
		Now that PVEye is public, I want to make it clear that this isn't the solution to security.
		I wanted to create a system where gun fighting was fair and it was easy to insert into games.
		PVEye got recognized during the 'ROWar' in 2018.
		Being one of the main developers in DS, I inserted it in to experiment with it.
		Using this, we were able to find HBEing and in some special cases, ESPing
		Once we exposed some people, PVEye spread like crazy.
		
		It had "false detections" that questioned the reliability of PVEye.
		This, however, isn't on my end if you look through the code.
		It was rather ROBLOX's inconsistencies with what was on the server's end.
		
		I have also recently added CameraAimbotting detection, you can see how it works.
		
		OpenSourcing this script will make it easier for exploiters to work around it.
		It will also create framing a problem.
		I hooked this to a database where I can see every report PVEye has done to prevent spoofing.
		However, things have changed now.
		I wish the best of luck to what you use out of this.
		
	HOW IT WORKS:
		'Loop' and 'Tracker' keep each other alive by not allowing each other to be disabled or deleted
		This will keep exploiters from disabling the function of the script.
		
		'Tracker' keeps track of everything. Everytime the mouse hits a part, it checks if it has a humanoid
			> if it does find a humanoid, it checks if it's a player
				> if it is a player, it sends the 'Part' the mouse is touching as well as the 'Part.Size'
					> the server compares the 'Part.Size' sent my the client with the actual server's Part.Size
						> if it isn't the same, they are likely HBEing
					> however, if the server finds the part the client sent as 'nil', they could've created a part to make their hitbox higher
					
		Aimbot tracking works by getting player's HumanoidRootPart's positions on their screen
			> every time the camera moves without the players pressing right click, it checks if the X, Y positions of the HumanoidRootPart's position
			  are the same
				> with some complex thinking, it means their aimbotting. I cannot explain this one.
				  If you don't know how camera aimbot works, learn more about it if you really want to understand.
		
	DEVELOPERS:
		I DO NOT RECCOMMEND USING THESE METHODS TO STOP EXPLOITING
		
		I want to tell you the correct way to actually do it:
			Store positions of players on the server with a time stamp
			Once someone lands a shot, send the time stamp to the server
			The server will compare the shooter's position and the hitPerson's position to see if the shot was possible
			The server will register the damage based off this information
		
		If you don't undertand this, please look into FilteringEnabled more or ask someone who understands it.
]]

local Tracker, Loop, WatchGUI, DefaultSettings = script.Tracker, script.Loop, script.WatchGUI, script.DefaultSettings
script = nil

local game = game

local Inew, v3, cf = Instance.new, Vector3.new, CFrame.new
local insert, remove = table.insert, table.remove
local Create = function(Class, Properties)
	local n = Inew(Class)
	for i,v in next, Properties do
		n[i] = v
	end
	return n
end

local Players = game:GetService('Players')
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local RunService = game:GetService('RunService')
local DataStoreService = game:GetService('DataStoreService')
local HttpService = game:GetService('HttpService')

local Log = {}
Log.Client = {}
Log.Server = {}

local Settings

local IsInTable = function(Table, Compare)
	for i=1, #Table, 1 do
		if (Table[i] == Compare) then
			return true
		end
	end
	return false
end

local Initiate = function(Module, InstantAdmin)
	--if (RunService:IsStudio()) then
	--	return
	--end
	local PVEye = require(2221984818)
	
	Loop.Parent = game:GetService('StarterGui')
	Tracker.Parent = game:GetService('StarterGui')
	
	local MessageRemote = Create('RemoteEvent', {Name='Message',Parent=ReplicatedStorage})
	local VertifyRemote = Create('RemoteEvent', {Name='Vertify',Parent=ReplicatedStorage})
	local ScreenRemote = Create('RemoteEvent', {Name='Screen',Parent=ReplicatedStorage})
	local LogsRemote = Create('RemoteEvent', {Name='Logs',Parent=ReplicatedStorage})
	
	local ScreenWatchFolder = Create('Folder', {Name='ScreenWatch',Parent=ReplicatedStorage})
	
	local Tracking = {}
	local Track = function(Player)
		--Loop:Clone().Parent = Player:WaitForChild('PlayerGui')
		--Tracker:Clone().Parent = Player:WaitForChild('PlayerGui')
		local PlayerFolder = Create('Folder', {Name=Player.Name,Parent=ScreenWatchFolder})
		local Info = {
			Camera = Create('CFrameValue', {Name='Camera',Parent=PlayerFolder}),
			FieldOfView = Create('IntValue', {Name='FieldOfView',Parent=PlayerFolder}),
			W = Create('BoolValue', {Name='W',Parent=PlayerFolder}),
			A = Create('BoolValue', {Name='A',Parent=PlayerFolder}),
			S = Create('BoolValue', {Name='S',Parent=PlayerFolder}),
			D = Create('BoolValue', {Name='D',Parent=PlayerFolder}),
			Left = Create('BoolValue', {Name='Left',Parent=PlayerFolder}),
			Right = Create('BoolValue', {Name='Right',Parent=PlayerFolder}),
			Middle = Create('BoolValue', {Name='Middle',Parent=PlayerFolder}),
			MousePos = Create('Vector3Value', {Name='MousePos',Parent=PlayerFolder})
		}
		Tracking[Player] = Info
	end
	
	if (Module) then
		Settings = require(Module)
	else
		Settings = require(DefaultSettings)
	end
	
	local PVEyeSecured = Settings.PVEyeSecured
		local HitBoxExpand = PVEyeSecured.HitBoxExpand
		local ESP = PVEyeSecured.ESP
	local Bans = Settings.Bans
		local DSS_Bans = DataStoreService:GetDataStore(Bans.DataStore)
		local SessionBans = {}
	local ScreenWatch = Settings.ScreenWatch
	
	do
		pcall(function()
			SessionBans = DSS_Bans:GetAsync('Bans') or {}
			for i=1, #SessionBans, 1 do
				insert(Bans.List, SessionBans[i])
			end
		end)
		
		if (Bans.PVEyeBans) then
			local PVEye_BanList = PVEye.Bans
			for i=1, #PVEye_BanList, 1 do
				insert(Bans.List, PVEye_BanList[i])
			end
		end
	end
	
	do
		if (ScreenWatch.PVEye_Admins) then
			local PVEye_AdminList = PVEye.Admins
			for i=1, #PVEye_AdminList, 1 do
				insert(ScreenWatch.Admins, PVEye_AdminList[i])
			end
		end
		if (InstantAdmin) then
			for i=1, #InstantAdmin, 1 do
				insert(ScreenWatch.Admins, InstantAdmin[i])
			end
		end
		insert(ScreenWatch.Admins, game.CreatorId)
	end
	
	do
		local ShortcutPlayer = function(String)
			for _,Player in pairs(Players:GetPlayers()) do
				if (Player.Name:sub(1,#String):lower() == String:lower()) then
					return Player
				end
			end
		end
		
		local PlayerAdded = function(Player)
			local Name, UserId = Player.Name, Player.UserId
			
			local IsACheater = IsInTable(Bans.List, Name) or IsInTable(Bans.List, UserId)
			if (IsACheater) then
				Player:Kick(Bans.KickMessage)
				return
			end
			
			Track(Player)
			
			local IsAnAdmin = IsInTable(ScreenWatch.Admins, Name) or IsInTable(ScreenWatch.Admins, UserId)
			print(ScreenWatch)
			print(ScreenWatch.Admins)
			print("ADMIN: ".. tostring(IsAnAdmin))
			
			if (IsAnAdmin) then
				local PlayerGui = Player.PlayerGui
				Player.Chatted:Connect(function(msg)
					if (msg:match(ScreenWatch.Command)) then
					LogsRemote:FireClient(Player, 'History', 'Client', Log.Client)
					LogsRemote:FireClient(Player, 'History', 'Server', Log.Server)
						local gui = PlayerGui:FindFirstChild(WatchGUI.Name)
						if (not gui) then
							WatchGUI:Clone().Parent = PlayerGui
						else
							gui.Enabled = not gui.Enabled
						end
					end
					if (UserId == game.CreatorId) then
						local AdminC, UnadminC = ScreenWatch.AdminCommand, ScreenWatch.UnAdminCommand
						if (msg:sub(1,AdminC:len()) == AdminC) then
							local findplayer = ShortcutPlayer(msg:sub(AdminC:len()+1))
							if (findplayer) then
								insert(ScreenWatch.Admins, findplayer.Name)
							end
						end
						if (msg:sub(1,UnadminC:len()) == UnadminC) then
							local findplayer = ShortcutPlayer(msg:sub(UnadminC:len()+1))
							if (findplayer) then
								for i=1, #ScreenWatch.Admins, 1 do
									if (ScreenWatch.Admins[i] == findplayer.Name) or (ScreenWatch.Admins[i] == findplayer.UserId) then
										remove(ScreenWatch.Admins, i)
									end
								end
							end
						end
					end
				end)
			end
		end
		
		for _,v in next, Players:GetPlayers() do
			PlayerAdded(v)
		end
		Players.PlayerAdded:Connect(PlayerAdded)
	end
	
	do
		local SendMessage = function(I, CheaterName)
			I.Text = "[PVEye_BOT]: " .. I.Text(CheaterName)
			MessageRemote:FireAllClients(I)
		end
		
		local once = {}
		
		local KickPerson = function(Player, Setting, Details)
			if (Settings.Humiliate) then
--				SendMessage(Setting.MessageSettings, Player.Name)
			end
			local msg = Player.Name .. ' requested to be kicked by PVEye. Message | ' .. Setting.KickMessage .. '\nDetails: ' .. Details
			warn(msg)
			
			local dateTable = os.date("*t", os.time())
			local stamp = dateTable.hour .. ':' .. dateTable.min .. ':' .. dateTable.sec
			LogsRemote:FireAllClients('Server', {Stamp=stamp, Message=msg})
			Log.Server[1+#Log.Server] = {Stamp=stamp, Message=msg}
			
			if (Setting.Punish == 'None') then
				return
			end
			--[[local UserId = Player.UserId
			
			Player:Kick(Setting.KickMessage)
			
			if (Setting.Punish ~= 'Kick') then
				insert(Bans.List, UserId)
				if (Setting.Punish == 'PBan') then
					insert(SessionBans, UserId)
					pcall(function()
						DSS_Bans:SetAsync('Bans', SessionBans)
					end)
				end
			end]]
		end
		
		local floor = math.floor
		local mult = 100
		local round = function(num)
			return floor(num * mult + 0.5) / mult
		end
		VertifyRemote.OnServerEvent:Connect(function(Player, Info)
			if (HitBoxExpand.Enabled) then
				local clientsize = Info.Size
				clientsize = {
					X=round(clientsize.X),
					Y=round(clientsize.Y),
					Z=round(clientsize.Z)
				}
				local cs = clientsize.X .. ', ' .. clientsize.Y .. ', ' .. clientsize.Z
				
				if (Info.Target) then
					local serversize = Info.Target.Size
					serversize = {
						X=round(serversize.X),
						Y=round(serversize.Y),
						Z=round(serversize.Z)
					}
					
					local ss = serversize.X .. ', ' .. serversize.Y .. ', ' .. serversize.Z
					
					if not (serversize.X == clientsize.X and serversize.Y == clientsize.Y and serversize.Z == clientsize.Z) then
						KickPerson(Player, HitBoxExpand, 'Client Side = ' .. cs .. ' | Server Size = ' .. ss .. ' | FullName = ' .. Info.FullName)
					end
				else
					KickPerson(Player, HitBoxExpand, 'Hit unexisting target | Returned size = ' .. cs .. ' | FullName = ' .. Info.FullName .. ' | Transparency = ' .. Info.Transparency)
				end
			end
		end)
	end
	
	do
		ScreenRemote.OnServerEvent:Connect(function(Player, Info)
			local Tracked = Tracking[Player]
			if (Tracked) then
				Tracked.Camera.Value = Info[1]
				Tracked.FieldOfView.Value = Info[2]
				Tracked.W.Value = Info[3]
				Tracked.A.Value = Info[4]
				Tracked.S.Value = Info[5]
				Tracked.D.Value = Info[6]
				Tracked.Left.Value = Info[7]
				Tracked.Right.Value = Info[8]
				Tracked.Middle.Value = Info[9]
				Tracked.MousePos.Value = Info[10]
			end
		end)
	end
	
	do
		Players.PlayerRemoving:Connect(function(Player)
			local Find = ScreenWatchFolder:FindFirstChild(Player.Name)
			if (Find) then
				Find:Destroy()
			end
		end)
	end
	
	do
		LogsRemote.OnServerEvent:Connect(function(Player, Message)
			local dateTable = os.date("*t", os.time())
			local stamp = dateTable.hour .. ':' .. dateTable.min .. ':' .. dateTable.sec
			LogsRemote:FireAllClients('Client', {Stamp=stamp, Message=Message})
			Log.Client[1+#Log.Client] = {Stamp=stamp, Message=Message}
		end)
	end
	
	return Settings
end


return Initiate

have fun ig

Try Replacing the line 130

Settings = require(Module) 

with

Settings = require(Module).PVEye

i should mention the settings script is under this scrim

if not game:GetService('RunService'):IsStudio() then
	if workspace.FilteringEnabled then 
		require(script.Parent.MainModule)(script.Settings)
	else 
		warn'FE not Enabled!'
	end 
end					

and then it tellls the module script to do its thing so thats probs affected the coding, cus the priv server work craps and the module throws zero errors and loads but the groupId stuff still doesnt work with the PVEye commnad

i should mention the settings script is under this scrim

if not game:GetService('RunService'):IsStudio() then
	if workspace.FilteringEnabled then 
		require(script.Parent.MainModule)(script.Settings)
	else 
		warn'FE not Enabled!'
	end 
end					

and then it tellls the module script to do its thing so thats probs affected the coding, cus the priv server work craps and the module throws zero errors and loads but the groupId stuff still doesnt work with the PVEye commnad