Advertisement
FNCxPro

FSM 2.01

May 30th, 2015
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.84 KB | None | 0 0
  1. --[[
  2.  
  3.     *********************
  4.     * FireySparklySmoke *
  5.     *********************
  6.          Version 2.01
  7.       Made by Relative :D
  8.    
  9.     Commands:
  10.       fireAll - unfireAll { Fires/unfires everything in the workspace. }
  11.       smokeAll - unsmokeAll { Smoke/unsmokes everything in the workspace. }
  12.       spAll - unspAll     { Sparkles/unsparkles everything in the workspace. }
  13.       ffAll - unffAll       { Forcefields/unforcefields everything(every player) in the workspace. }
  14.    
  15.     Changes:
  16.       * Version 2.00
  17.         + Second major release
  18.           ( built off of V1)
  19.          
  20.       * Version 2.01
  21.         + Adds ffAll / unffAll
  22.           { Forcefields/unforcefields everything(every player) in the workspace. }
  23.         - Disable chat integration; broken.
  24. ]]--
  25. local function getWorkspace()
  26.  local tbl = {}
  27.  local wspc = game["Workspace"]
  28.  for i,v in pairs(wspc:GetChildren()) do
  29.   tbl[i] = v
  30.  end
  31.  return tbl
  32. end
  33. local function getIt(tab)
  34.   local tbl = {}
  35.   for i,v in pairs(tab:GetChildren()) do
  36.     tbl[i] = v
  37.   end
  38.   return tbl
  39. end
  40. local function fireAll()
  41.   local wsp = getWorkspace()
  42.   crashprotect(function()
  43.     for i = 1, #wsp do
  44.       local child = wsp[i]
  45.       local fire = Instance.new("Fire", child)
  46.       fire.Size = 400000000000
  47.     end
  48.   end)
  49. end
  50. local function unfireAll()
  51.   local wsp = getWorkspace()
  52.   crashprotect(function()
  53.     for i = 1, #wsp do
  54.       local child = wsp[i]
  55.       local children = getIt(child)
  56.       for i = 1, #children do
  57.         local ch = children[i]
  58.         if ch:IsA("Fire") then
  59.           ch:remove()
  60.         end
  61.       end
  62.     end
  63.   end)
  64. end
  65.  
  66. local function spAll()
  67.   local wsp = getWorkspace()
  68.   crashprotect(function()
  69.     for i = 1, #wsp do
  70.       local child = wsp[i]
  71.       local sparkles = Instance.new("Sparkles", child)
  72.     end
  73.   end)
  74. end
  75. local function unspAll()
  76.   local wsp = getWorkspace()
  77.   crashprotect(function()
  78.     for i = 1, #wsp do
  79.       local child = wsp[i]
  80.       local children = getIt(child)
  81.       for i = 1, #children do
  82.         local ch = children[i]
  83.         if ch:IsA("Sparkles") then
  84.           ch:remove()
  85.         end
  86.       end
  87.     end
  88.   end)
  89. end
  90.  
  91. local function smokeAll()
  92.   local wsp = getWorkspace()
  93.   crashprotect(function()
  94.     for i = 1, #wsp do
  95.       local child = wsp[i]
  96.       local smoke = Instance.new("Smoke", child)
  97.       smoke.Size = 400000000000
  98.       smoke.RiseVelocity = 400000000000
  99.     end
  100.   end)
  101. end
  102. local function unsmokeAll()
  103.   local wsp = getWorkspace()
  104.   crashprotect(function()
  105.     for i = 1, #wsp do
  106.       local child = wsp[i]
  107.       local children = getIt(child)
  108.       for i = 1, #children do
  109.         local ch = children[i]
  110.         if ch:IsA("Smoke") then
  111.           ch:remove()
  112.         end
  113.       end
  114.     end
  115.   end)
  116. end
  117.  
  118. local function ffAll()
  119.   local wsp = getWorkspace()
  120.   crashprotect(function()
  121.     for i = 1, #wsp do
  122.       local child = wsp[i]
  123.       local ff = Instance.new("ForceField", child)
  124.     end
  125.   end)
  126. end
  127. local function unffAll()
  128.   local wsp = getWorkspace()
  129.   crashprotect(function()
  130.     for i = 1, #wsp do
  131.       local child = wsp[i]
  132.       local children = getIt(child)
  133.       for i = 1, #children do
  134.         local ch = children[i]
  135.         if ch:IsA("ForceField") then
  136.           ch:remove()
  137.         end
  138.       end
  139.     end
  140.   end)
  141. end
  142.  
  143.  
  144. --[[
  145.  
  146.     **********
  147.     * Parser *
  148.     **********
  149.    
  150. ]]--
  151. local function parse(msg)
  152.   if msg == "smokeAll" then
  153.     smokeAll()
  154.   elseif msg == "unsmokeAll" then
  155.     unsmokeAll()
  156.   elseif msg == "spAll" then
  157.     spAll()
  158.   elseif msg == "unspAll" then
  159.     unspAll()
  160.   elseif msg == "fireAll" then
  161.     fireAll()
  162.   elseif msg == "unfireAll" then
  163.     unfireAll()
  164.   elseif msg == "ffAll" then
  165.     ffAll()
  166.   elseif msg == "unffAll" then
  167.     unffAll()
  168.   end
  169. end
  170.  
  171. --[[
  172.  (BROKEN INTEGRATION)
  173. game.Players.LocalPlayer.Chatted:connect(function(cmd)
  174.   if cmd:sub(1,1)==";" then
  175.     local msg = cmd:sub(2)
  176.     parse(msg)
  177.   end
  178. end)
  179. ]]--
  180. SetCommandCallback(function(msg)
  181.   parse(msg)
  182. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement