Here's the script.
local Admins = {"ChronoRiverton" , "ArIin"}
local laser = script.Parent.Laser
local currsim = nil
function ChkEpic(name)
for i = 1, #Admins do
if Admins[i]:lower() == name:lower() then
return true
end
end
return false
end
function CloseSim()
if currsim ~= nil then
laser.Color = BrickColor.new("Institutional white")
for i, v in ipairs(currsim:children()) do
if v:IsA("BasePart") then
laser.Part = v
local ex = Instance.new("Fire", game.Workspace)
ex.BlastRadius = 1
ex.BlastPressure = 0
ex.Position = v.Position
wait()
v:Destroy()
end
end
laser.Part = nil
currsim:Destroy()
currsim = nil
end
end
function RunSim(sim)
for _, v in ipairs(game.Lighting.Simulations:children()) do
if v.Name:lower() == sim:lower() then
local mod = Instance.new("Model", game.Workspace)
currsim = mod
mod.Name = v.Name
laser.Color = BrickColor.new("Institutional white")
for i, part in ipairs(v:children()) do
if part:IsA("BasePart") then
local cl = part:Clone()
cl.Parent = mod
laser.Part = cl
mod:MakeJoints()
wait()
end
end
laser.Part = nil
end
end
end
for i, plr in ipairs(game.Players:children()) do
plr.Chatted:connect(function(msg)
if msg:lower():sub(1,5) == "load/" then
CloseSim()
RunSim(msg:lower():sub(6))
elseif msg:lower() == "end/" then
CloseSim()
end
end)
end
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if ChkEpic(plr.Name) == true then
if msg:lower():sub(1,5) == "load/" then
CloseSim()
RunSim(msg:lower():sub(6))
elseif msg:lower() == "end/" then
CloseSim()
end
end
end)
end)

3 comments
Can you code block this.
^
It's code blocked now