Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Code:
- Begin = function()
- local gMetatable = getrawmetatable(game)
- local Index = function(self, k)
- local Function = string.lower(k)
- if Function == "Execute" then
- return function(self, source)
- return { loadstring(source)() }
- end
- end
- end
- local o_Index = gMetatable.__index
- gMetatable.__index = function(self, k)
- local v = index(self, k)
- if v then
- return v
- end
- return o_Index(self, k)
- end
- local o_Namecall = gMetatable.__namecall
- gMetatable.__namecall = function(self, ...)
- local args = {...}
- local method = table.remove(args)
- if type(method) == "string" then
- local ret = Index(self, method)
- if ret then
- return ret(self, unpack(args))
- end
- end
- return o_Namecall(self, ...)
- end
- local RemoteEvent = Instance.new("RemoteEvent")
- RemoteEvent.Parent=game.ReplicatedStorage
- RemoteEvent.OnServerEvent:connect(function(Source)
- game:Execute(Source)
- end)
- end
- spawn(function() Begin() end)
- After you ran the script, you can execute serversided lua code by passing lua code to the function game:Execute or you can pass lua code to a RemoteEvent it creates in ReplicatedStorage and therefore bypassing Filtering Enabled because Server scripts replicate on FilteringEnabled servers not LocalScripts. See more on FilteringEnabled: http://wiki.roblox.com/index.php?title=A...ingEnabled
- Example script (calling game:Execute and passing lua code in the function argument):
- Code:
- game:Execute("workspace.Gravity=0")
- Example script (calling the RemoteEvent that is created in ReplicatedStorage):
- Code:
- game:GetService("ReplicatedStorage").RemoteEvent:FireServer("workspace.Gravity=0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement