local function CheckGroupStats(Player, Rank, Group)
	if Player:GetRankInGroup(Group) >= Rank then
		return true
	else
		return false
	end
end

script.Parent.Click.MouseClick:Connect(function(Player)
	if CheckGroupStats(Player, 255, 4853203) then
		if not Player.PlayerGui:FindFirstChild("EmployeeViewGui") then
			local FindGui = game.Lighting:FindFirstChild("EmployeeViewGui")
			if FindGui then
				local ClonedGui = FindGui:Clone()
				ClonedGui.Parent = Player.PlayerGui
				ClonedGui.Enabled = true
				
				ClonedGui.Frame.Close.MouseButton1Click:Connect(function()
					ClonedGui:Destroy()
				end)
			end
		end
	end
end)

This script was transferred from my old game. My game is a Grocery Store.

And yes, there is a click detector ; http://prntscr.com/pom6st

1 comment

0

that should be done on the client