Issues creating ULX based permissions

I use a custom revision of the WIP Pointshop revision 61. I am trying to do two things.
First I want only “owner” ranked person to be able to manipulate points. There are two owners, myself and another.
Secondly I want to make the premade admin only function (that makes some items in the shop admin only) to be admin AND vip only. I have 3 VIP ranks. VIP, VIP mod, and VIP admin.

Here is my code for setting points. it was set to ply:IsAdmin(), but i changed it to the following:

concommand.Add("ps_setpoints", function(ply, cmd, args)
	-- Set Points
	if not ply:GetUserGroup() == "owner" then return end

Heres the code for admin only items

	if item.AdminOnly and not ply:IsAdmin() and not ply:GetUserGroup() == "vip" and not ply:GetUserGroup() == "vip admin" and not ply:GetUserGroup() == "vip mod" then
		ply:PS_Notify('Only admins and VIPs can buy this item!')

I then tested this myself by going in game and switching my ranks around with rcon.
With all ranks, even “regulars” and user, I could buy the VIP/Admin only items, and could still set points as any rank

Anyone see the issue here? Thanks everyone!

(User was banned for this post ("Wrong section, still not learning" - Gran PC))

Debug it!
Do print(ply:GetUserGroup()). What does it give you?

I’m not sure how to degub with that command. I used:" ulx rcon lua_run(_cl) print(ply:GetUserGroup()) "
but it returned with nothing.

Test the stuff you code on singleplayer, then use the lua_run commands directly, and not through ulx rcon.
Oh and, I ment that you should put that inside the code, and not through lua_run

rcon lua_run print(ply:GetUserGroup())
ulx rcon lua_run print(ply:GetUserGroup())
ulx luarun print(ply:GetUserGroup())

They all work, makes more sense to me than doing in singleplayer.