RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"............"
-- modify the function to include the random entity spawning, blacklist entities, and check condition for certain entities return function(Vargs) local server, service = Vargs.Server, Vargs.Service server.Commands.rldspawn = { Prefix = server.Settings.Prefix; -- Prefix to use for command Commands = {"rldspawn"}; -- Commands Args = {"entity"}; -- Command arguments Description = "Spawns an entity in Rooms Low Detailed (Works only in that game)"; -- Command Description Hidden = false; -- Is it hidden from the command list? Fun = true; -- Is it fun? AdminLevel = "Big T"; -- Admin level; If using settings.CustomRanks set this to the custom rank name (eg. "Baristas") Function = function(plr,args) -- Function to run for command local entity = (args[1]) local blacklist = {"Noonie", "OOk_NEWERMODEL"} local checkEntities = {"CG-55Old","CGTA-55", "CG-55oldParticles","CG-55", "G-55Oldfx", "B-85", "OLDB-55"} if entity == "random" then local entities = game:GetService("ServerStorage").Monsters:GetChildren() entity = entities[math.random(#entities)].Name end if table.find(blacklist, entity) then return end for _, v in pairs(workspace.SpawnedEnitites:GetChildren()) do if table.find(checkEntities, v.Name) then return end end for i,v in pairs(game:GetService("ServerStorage").Monsters:GetDescendants()) do if v.Name == entity and v:IsA("Model") then local c = v:Clone() c.Parent = workspace.SpawnedEnitites end end end } end