-- class_choice_gui.lua local function create_class_choice_gui(player) local frame = player.gui.center.add { type = "frame", name = "class_choice_frame", caption = "Choose Your Class", } frame.add { type = "button", name = "ministry_of_transportation_button", caption = "Ministry of Transportation", } frame.add { type = "button", name = "ministry_of_defence_button", caption = "Ministry of Defence", } end script.on_event(defines.events.on_player_joined_game, function(event) local player = game.players[event.player_index] create_class_choice_gui(player) end)