--!strict
local util

local plugin: Plugin = {
	name = "LuaPlugin",
	version = "0.1.0",
	authors = "",
	description = "A simple lua plugin",
	OnLoad = function(ctx)
		util = require("../util")(ctx)

		local store = ctx:GetDataStore()
		store:Set("hello", "test2")
 
		api.PlayerAdded:Connect(function()
			local value: string =  store:Get("hello")
			ctx:Debug("Plugin data: "..value)
			ctx:Debug("Plugin name: "..ctx:GetName())
		end)
	end,
	OnUnload = function(ctx)
		util.Goodbye()
	end,
}

return plugin
