--The seeds for the melon plant ITEM = {} ITEM.Name = "Melon Seeds" ITEM.Description = "Something you can plant!" ITEM.Icon = "items/seed_melon.png" ITEM.UniqueData = false ITEM.GrowTime = math.random( 60, 180 ) ITEM.OnGrow = function(self, aor, owner) local plant = GAMEMODE.MakeGenericPlant( owner, self:GetPos() + Vector( 0, 0, 13 ), "models/props/CS_militia/fern01.mdl" ) plant.Children = 0 local num = 1 if ( IsValid( ply ) && ply:HasUnlock( "Adept_Farmer" ) ) then num = num + math.random( 0, 1 ) end if ( IsValid( ply ) && ply:HasUnlock( "Expert_Farmer" ) ) then num = num + math.random( 0, 2 ) end for i = 1, num do GAMEMODE.MakeGenericPlantChild( owner, self:GetPos() + Vector( math.random( -25, 25 ), math.random( -25, 25 ), math.random( 5, 7 ) ), "models/props_junk/watermelon01.mdl", plant ) end end genericMakeDroppable(ITEM) genericMakePlantable(ITEM) GMS.RegisterResource(ITEM)