filtering enabled and in a normal script.

function ClassC(theplayer)
	local Player = theplayer.Name
	if game.Players[Player]:GetRankInGroup(3569513) == 0 or not game.Players[Player]:IsInGroup(3569513) then
		game.Players[Player].TeamColor = game.Teams["Class - C"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end
function Insurgency(theplayer)
	
end
function Personnel(theplayer)
	local Player = theplayer.Name
	if game.Players[Player]:GetRankInGroup(3569513) >= 0 then
		game.Players[Player].TeamColor = game.Teams["Arcanian Personnel"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end
function Admin(theplayer)
	local Player = theplayer.Name
	if game.Players[Player].Name == "GalaxyFPS_Studios" or game.Players[Player].Name == "Photiosxon" then
		game.Players[Player].TeamColor = game.Teams["Administration Department"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end
function Science(theplayer)
	local Player = theplayer.Name
	if game.Players[Player]:GetRankInGroup(3569513) == 9 then
		game.Players[Player].TeamColor = game.Teams["Scientific Department"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end
function Medical(theplayer)
	
end
function Regulation(theplayer)
	local Player = theplayer.Name
	if game.Players[Player]:GetRankInGroup(3569513) == 10 then
		game.Players[Player].TeamColor = game.Teams["Regulation Department"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end
function MET(theplayer)
	local Player = theplayer.Name
	if game.Players[Player]:GetRankInGroup(3569513) == 8 then
		game.Players[Player].TeamColor = game.Teams["MET Department"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end
function Security(theplayer)
	local Player = theplayer.Name
	if game.Players[Player]:IsInGroup(3878013) then
		game.Players[Player].TeamColor = game.Teams["Security Department"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end
function Intelligence(theplayer)
	local Player = theplayer.Name
	if game.Players[Player]:IsInGroup(3997163) then
		game.Players[Player].TeamColor = game.Teams["Intelligence Agency"].TeamColor
		game.Players[Player].Character.Humanoid.Health = 0
		script.Parent.Position = UDim2.new(-1, 0, -1, 0)
		wait(1)
		script.Parent.Visible = false
	end
end

script.Parent.ClassC.MouseButton1Click:Connect(ClassC)
script.Parent.Insurgency.MouseButton1Click:Connect(Insurgency)
script.Parent.Personnel.MouseButton1Click:Connect(Personnel)
script.Parent.Admin.MouseButton1Click:Connect(Admin)
script.Parent.Science.MouseButton1Click:Connect(Science)
script.Parent.Medical.MouseButton1Click:Connect(Medical)
script.Parent.MET.MouseButton1Click:Connect(MET)
script.Parent.Regulation.MouseButton1Click:Connect(Regulation)
script.Parent.Security.MouseButton1Click:Connect(Security)
script.Parent.Intelligence.MouseButton1Click:Connect(Intelligence)

8 comments

1

MouseButton1Click doesn't pass the player who clicked as an argument.

1

^^ MouseClick does, MouseButton1Click doesn't pass any arument

0

Ok thanks Ill try that.

0

MouseClick doesnt exist for GUIs.

0

Sorry forgot to say it was a GUI

0

just use LocalPlayer because that will be who is clicking the gui

0

Problem is that its filtering enabled and I dont want to use events.

0

LocalPlayer is not an event. It is just the person who has the gui.