This script is used to check if the player has GMRank 2, if so you can access the GMIsland, but if you are lower than Rank 2 = you cant'
Code:
print(">> Loading Anti GMIsland | Coded by TITKATA_BG <<")
local area = 876
-- To where the non gm's will be teleported
local map = 0
local x = 0
local y = 0
local z = 0
local o = 0
local function GMArea(event, player)
if (player:GetAreaId() == area) then
if (player:GetGMRank() < 2) then
player:Teleport(map, x, y, z, o)
player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
player:SendBroadcastMessage("|cffFF0000You can't enter the GM Island because you are rank "..player:GetGMRank().." You must be minimum Rank 2!|r")
end
if(player:GetGMRank() >= 2) then
player:SendBroadcastMessage("You are rank "..player:GetGMRank()..", so you can go to GM Island! Enjoy your stay!|r")
end
end
end
RegisterPlayerEvent(27, GMArea)