Advertisement
CloneTrooper1019

Untitled

Jul 29th, 2014
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. local function CreateService(obj)
  2.     local service = {}
  3.     for _,v in pairs(obj:GetChildren()) do
  4.         if v:IsA("RemoteFunction") then
  5.             service[v.Name] = function (...)
  6.                 v:InvokeServer(...)
  7.             end
  8.         elseif v:IsA("RemoteEvent") then
  9.             service[v.Name] = v.OnClientEvent
  10.         elseif string.find(v.ClassName,"Value") then
  11.             service[v.Name] = v.Value
  12.             v.Changed:connect(function ()
  13.                 service[v.Name] = v.Value
  14.             end)
  15.         end
  16.     end
  17.     return service
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement