So here's the scripting, you don't need lines 47 - 101 the game pass id is 6056277 if u need it but thats in a config folder.
local Seat = script.Parent
local PlaneTool = Seat.Plane
local PlaneMain = Seat.Parent.Parent
local Customize = PlaneMain.Customize
local Crashed = PlaneMain.Crashed
local Origin = PlaneMain.Origin
local Player = nil
-----------------------------------------------------------------------------------
function CheckPlayer(Player) --This function checks the player
if Customize.GroupSpecific.Value then --If the GroupSpecific value is true...
if (not Player:IsInGroup(Customize.GroupSpecific.GroupID.Value)) then --If the player is not part of the group...
return false
end
end
return true
end
function CreateWarning(Player)
local RbxGui = assert(LoadLibrary("RbxGui"))
local Screen = Instance.new("ScreenGui")
Screen.Name = "NotInGroupGui"
local Gui = RbxGui.CreateStyledMessageDialog(
"You are not in this plane's group!",
Player.Name..", you are not a part of the group that this plane is in! Please exit the plane!",
"Confirm",
{
{
Text = "OK";
Function = function()
if Screen.Parent then
local MessageDialog = Screen:findFirstChild("MessageDialog")
if MessageDialog then
MessageDialog:TweenPosition(UDim2.new(0.25,0,0,-165),"In","Back",0.7,true)
end
wait(0.7)
Screen:Destroy()
end
end
}
}
)
Gui.Parent = Screen
Screen.Parent = Player.PlayerGui
return Screen
end
