RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create an advanced randomized server sided game generator script for Roblox."
-- server script -- Create a table of possible game objects local gameObjects = { "Part", "Model", "Script", "Sound", "Mesh" } -- Create a table of possible game object properties local gameObjectProperties = { "Name", "Position", "Rotation", "Size", "Color", "Transparency", "Anchored", "Locked", "CanCollide" } -- Create a table of possible game object values local gameObjectValues = { "MyObject", Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(1, 1, 1), Color3.new(1, 0, 0), 0, true, false, true } -- Function to create a random game object function CreateRandomGameObject() -- Pick a random object type local randomObjectType = gameObjects[math.random(#gameObjects)] -- Create the object local object = Instance.new(randomObjectType) -- Set the object's properties for _, property in pairs(gameObjectProperties) do -- Pick a random value local randomValue = gameObjectValues[math.random(#gameObjectValues)] -- Set the property object[property] = randomValue end -- Return the object return object end -- Create a random game object every 5 seconds while true do local randomObject = CreateRandomGameObject() randomObject.Parent = game.Workspace wait(5) end