RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a advance script where players get random disaster every 10 second"
-- server script -- Create a table of disasters local disasters = { "meteor", "earthquake", "tsunami", "tornado", "volcano" } -- Create a loop that runs every 10 seconds while true do -- Pick a random disaster local disaster = disasters[math.random(#disasters)] -- Broadcast the disaster to all players game.Players:Broadcast("A " .. disaster .. " is coming!") -- Create the disaster local disasterFunction = require(game.ReplicatedStorage[disaster]) disasterFunction() -- Wait 10 seconds wait(10) end