-- class_perks.lua local function apply_perks(player, class) if class.perk == "logistic_cost_reduction" then player.print("Ministry of Transportation: Logistic costs reduced!") elseif class.perk == "combat_cost_reduction" then player.print("Ministry of Defence: Combat costs reduced!") end end script.on_event(defines.events.on_gui_click, function(event) local player = game.players[event.player_index] local element = event.element if element.name == "ministry_of_transportation_button" then local class = require("ministry_of_transportation") apply_perks(player, class) player.print("You have chosen the Ministry of Transportation!") elseif element.name == "ministry_of_defence_button" then local class = require("ministry_of_defence") apply_perks(player, class) player.print("You have chosen the Ministry of Defence!") end if player.gui.screen.informatron and player.gui.screen.informatron.class_selection_tab then player.gui.screen.informatron.class_selection_tab.destroy() end end)