-- Create a storage object with the file "config.yml"
pluginConfig = plugin.getStorageObject("config.yml")
-- Set the default to join message and save the config if it is not already in there
if pluginConfig:setDefaultValue("join-message", "%s joined the game!") then
-- Make event for when players join
plugin.registerEvent("PlayerJoinEvent", function(event)
-- Set the join message based on the config value
event:setJoinMessage(string.format(pluginConfig:getValue("join-message"), event:getPlayer():getDisplayName()))