Advertisement
vlatkovski

quick instance

Aug 31st, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. function quick()
  2.     local t, __t = {}, nil
  3.     t.new = function(n,p)
  4.         __t = Instance.new(n,p)
  5.         return t
  6.     end
  7.     t.attr = function(p,v)
  8.         if not __t then return end
  9.         __t[p] = v
  10.         return t
  11.     end
  12.     t.call = function(f,...)
  13.         if not __t then return end
  14.         __t[f](__t,...)
  15.         return t
  16.     end
  17.     setmetatable(t,{
  18.         __index = function(t,i)
  19.             return __t[i]
  20.         end;
  21.         __newindex = function(t,i,v)
  22.             __t[i] = v
  23.             return t
  24.         end;
  25.     })
  26.     return t
  27. end
  28.  
  29.  
  30. quick().new("Sound",workspace).attr("Name","").attr("Volume",1).attr("Pitch",1).attr("SoundId","rbxassetid://"..291247168).call("Play")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement