π₯ Hatcher
This module manages everything to do with opening eggs.
Setupβ
local Framework = require(path).GetSever()
local Hatcher = Framework.Hatcher
Creating an eggβ
Creates an egg out of a part with int values inside of it.
warning
The int values MUST have valid pet names otherwise you create data issues.
local Egg = Hatcher.new(Part)
AutoHatchβ
This allows the user to autohatch an egg
Egg:AutoHatch(player)
SetBuy1Functionβ
This sets the function to buy one egg.
Egg:SetBuy1Function(function(player: Player)
Egg:Open(player, 1)
end)
SetBuy3Functionβ
This sets the function to buy three eggs.
Egg:SetBuy3Function(function(player: Player)
Egg:Open(player, 3)
end)
Openβ
Force open an egg of your choice, but only if the server says so!
Egg:Open(player, 1) -- force opens 1 eggs
Egg:Open(player, 3) -- force opens 3 eggs
-- anything less than 1, or more than 3 will not be accepted.