01 | local player = game.Players.LocalPlayer |
02 | local groupid = 3555391 |
03 | local fbi = script.Parent |
04 | local gui = game.StarterGui.ScreenGui |
05 |
06 |
07 | script.Parent.MouseButton 1 Click:connect( function () |
08 | if player:IsInGroup(groupid) then |
09 | fbi.Active = true |
10 | player.TeamColor = BrickColor.new( "Forest green" ) |
11 | else |
12 | fbi.Active = false |
13 | end |
14 | end ) |
15 |
16 | if player.TeamColor = = BrickColor.new( "Forest green" ) then |
17 | gui.Active = false |
18 | gui.Frame.Visible = false |
19 | gui.Frame.Active = false |
20 | end |
I don't know how your game is laid out, so I can only be of limited help. For example, what is fbi?
01 | local player = game.Players.LocalPlayer; |
02 | local groupid = 3555391 ; |
03 | local fbi = script.Parent; |
04 | local gui = player.PlayerGui.ScreenGui; |
05 |
06 | fbi.InputBegan:connect( function (input) |
07 | if (input.UserInputType = = Enum.UserInputType.MouseButton 1 ) then |
08 | if (player:IsInGroup(groupid)) then |
09 | fbi.Active = true ; |
10 | player.TeamColor = BrickColor.new( "Forest green" ); |
11 | gui.Frame.Visible = false ; |
12 | gui.Frame.Active = false ; |
13 | gui.Active = false ; |
14 | else |
15 | fbi.Active = false ; |
16 | end |
17 | end |
18 | end ) |