Skip to content

Instantly share code, notes, and snippets.

View TomatoesDev's full-sized avatar

Tomatoes TomatoesDev

View GitHub Profile
@TomatoesDev
TomatoesDev / WorldGenerationV2.lua
Created April 5, 2026 00:37
This is a server-side module from my 'ClashKing' game, which implements a random seed based world generation system using OOP architecture. It also features settings like the minimum distance between each object. On top of this each object is efficiently saved and loaded through different seeds, preserving each object's position, rotation, templ…
-- Services --
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")
local World = {}
World.__index = World
-- References --
-- Services --
local TeleportService = game:GetService("TeleportService")
local SafeTeleport = require(game.ReplicatedStorage:WaitForChild("SafeTeleport"))
-- References --
local zonesFolder = workspace:WaitForChild("Zones")
local function teleportScript(zone)
local text = zone:WaitForChild("BillboardGui"):WaitForChild("TextLabel")
local Drop = {}
Drop.__index = Drop
-- Services --
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local InventoryManager = require(game.ReplicatedStorage.Modules.InventoryManager)
local CollectingGuiRemote = game.ReplicatedStorage.Remotes.ShowCollectingGUI
-- Settings --
-- Services --
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local CollectionService = game:GetService("CollectionService")
local World = {}
World.__index = World
-- References --