Good question, you can use the objects in a server script to tell the server how to handle skill objects and the associating logic.
First, you would need to require the module script, I would do it like so:
--Points to the module script in the workspace
local SkillPointer = ReplicatedStorage.Source.ObjectFolder.SkillObject
local SkillObject = require(SkillPointer)
Using the example script I gave I would initialize the first skill object which would be the start of a skill tree, let’s call it some weird name:
local Name = "XXx_SlayerHunting_xXX"
local HuntingSkill = SkillObject.new(Name)
Then you would create another skill that is up the skill tree lets call it beast slaying
local Name = "BeastSlayingSkill"
--Random units could represent exp in a game
local BeastSlayingUnlockExpCost = 10000
--Skills required before unlocking this new skill
local SkillsRequiredTable = {HuntingSkill}
local BeastSlayingSkill = SkillObject.new(Name,BeastSlayingUnlockCost,SkillsRequiredTable)
Then lets take an example usage of a skill tree usage in a GUI, where we unlock a button, this would be the pseudo-code required that uses an object-oriented style fancy thing
--Probably use a remote event
some gui on button press on the beast slaying skill unlock event do this(
--Event should return the player who is trying to unlock the skill
function(Player)
--Player is the person who clicked the skill unlock button
--Checks if the player has the previous skill object
BeastSlayingSkill:CheckRequirementsAndUnlockForPlayer(Player)
--Gives the player the skill
BeastSlayingSkill:GivePlayerAbility(Player)
end)
Now that this general concept is written you can further improve and generalize it. I hope this helps with object-oriented programming.
Edit: Within the object for the unlock, you can implement a data store check,
I recommend looking at this tutorial, for ideas.
Edit: Hmm after some researching I found an skill tree libary GUI made using React, a java script libary for making UI.
Perhaps you can replicate it in Roblox using Roact instead?