Thanks, but do you think this would fit with my main script?
script.Parent.ProximityPrompt.Triggered:Connect(function()
local event = math.random(1,22)
local timer = math.random(30,60)
if event == 1 then
local Police = game.ServerStorage.Police:Clone()
Police.Parent = workspace
script.Parent.Parent.Assets.Police:Play()
wait(timer)
Police:Destroy()
elseif event == 2 then
local Marine = game.ServerStorage.Marine:Clone()
Marine.Parent = workspace
wait(timer)
Marine:Destroy()
elseif event == 3 then
local Zombie = game.ServerStorage.Zombie:Clone()
Zombie.Parent = workspace
wait(timer)
Zombie:Destroy()
elseif event == 4 then
local Helicopter = game.ServerStorage.Helicopter:Clone()
Helicopter.Parent = workspace
wait(timer)
Helicopter:Destroy()
elseif event == 5 then
local battlebot = game.ServerStorage.FirePillar:Clone()
battlebot.Parent = workspace
battlebot.Position = Vector3.new(math.random(-114, 12),8,math.random(-124, 33))
wait(timer)
battlebot:Destroy()
elseif event == 6 then
local tree = game.ServerStorage.Tree:Clone()
tree.Parent = workspace
tree.Position = Vector3.new(math.random(-114, 12),8.466,math.random(-124, 33))
wait(timer)
tree:Destroy()
elseif event == 7 then
local wall = game.ServerStorage.Wall:Clone()
wall.Parent = workspace
wall.Position = Vector3.new(math.random(-114, 12),15.1,math.random(-124, 33))
wait(timer)
wall:Destroy()
elseif event == 8 then
game.Workspace.Gravity = math.random(1, 500)
elseif event == 9 then
local bunker = game.ServerStorage.BunkerClone:Clone()
bunker.Parent = workspace
bunker.Position = Vector3.new(math.random(-114, 12),8.9,math.random(-124, 33))
script.Parent.Parent.Assets.CloneBunker:Play()
wait(timer)
bunker:Destroy()
elseif event == 10 then
local stone = game.ServerStorage.Stone:Clone()
stone.Parent = workspace
stone.Position = Vector3.new(math.random(-114, 12),7.5,math.random(-124, 33))
wait(timer)
stone:Destroy()
elseif event == 11 then
local bomb = game.ServerStorage.ElectricBomb:Clone()
bomb.Parent = workspace
bomb.Position = Vector3.new(math.random(-114, 12),0.2,math.random(-124, 33))
script.Parent.Parent.Assets.ElectricBombSound:Play()
wait(timer)
bomb:Destroy()
elseif event == 12 then
local mwall = game.ServerStorage.MovingWall:Clone()
mwall.Parent = workspace
mwall.Position = Vector3.new(math.random(-114, 12),15.1,math.random(-124, 33))
wait(timer)
mwall:Destroy()
elseif event == 13 then
local force = game.ServerStorage.ForcefieldPart:Clone()
force.Parent = workspace
force.Position = Vector3.new(math.random(-114, 12),5.4,math.random(-124, 33))
wait(timer)
force:Destroy()
elseif event == 14 then
local sand = game.ServerStorage.FallingSand:Clone()
sand.Parent = workspace
sand.Position = Vector3.new(math.random(-114, 12),105,math.random(-124, 33))
wait(timer)
sand:Destroy()
elseif event == 15 then
local fire = game.ServerStorage.FirePart:Clone()
fire.Parent = workspace
fire.Position = Vector3.new(math.random(-114, 12),0.4,math.random(-124, 33))
wait(timer)
fire:Destroy()
elseif event == 16 then
local branch = game.ServerStorage.BigBranch:Clone()
branch.Parent = workspace
branch.Position = Vector3.new(math.random(-114, 12),130,math.random(-124, 33))
wait(timer)
branch:Destroy()
elseif event == 17 then
local stick = game.ServerStorage.LargeStick:Clone()
stick.Parent = workspace
stick.Position = Vector3.new(math.random(-114, 12),23.8,math.random(-124, 33))
wait(timer)
stick:Destroy()
elseif event == 18 then
local bush = game.ServerStorage.GrassBush:Clone()
bush.Parent = workspace
bush.Position = Vector3.new(math.random(-114, 12),3.993,math.random(-124, 33))
wait(timer)
bush:Destroy()
elseif event == 19 then
local truss = game.ServerStorage.Truss:Clone()
truss.Parent = workspace
truss.Position = Vector3.new(math.random(-114, 12),6,math.random(-124, 33))
wait(timer)
truss:Destroy()
elseif event == 20 then
local cloud = game.ServerStorage.Cloud:Clone()
cloud.Parent = workspace
cloud.Position = Vector3.new(math.random(-114, 12),45.8,math.random(-124, 33))
wait(timer)
cloud:Destroy()
elseif event == 21 then
local cacti = game.ServerStorage.Cactus:Clone()
cacti.Parent = workspace
cacti.Position = Vector3.new(math.random(-114, 12),4.3,math.random(-124, 33))
wait(timer)
cacti:Destroy()
elseif event == 22 then
local plat = game.ServerStorage.Platform:Clone()
plat.Parent = workspace
plat.Position = Vector3.new(math.random(-114, 12),23.9,math.random(-124, 33))
wait(timer)
plat:Destroy()
end
end)
I’m just asking, because im not very sure all that would go into the main script…