Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Code reader:
- LocalScript:
- lines = script.Parent.Line_Sections
- code = {}
- Data = 'print("Hello world!")'
- sender = game:GetService("ReplicatedStorage"):WaitForChild("SendCode")
- m = 'Trying to access the message when message is nil.'
- function Protected(m)
- error(m)
- end
- Data = ''
- for i, v in pairs(script.Parent.Line_Sections:GetChildren()) do
- wait()
- Data = Data..' '..v.Text
- end
- sender:FireServer(Data)
- sender.OnClientEvent:connect(function(me)
- if me ~= true then
- m = me
- pcall(Protected)
- end
- end)
- ServerScript:
- local sender = game:GetService('ReplicatedStorage'):WaitForChild('SendCode')
- local code = 'print("Hello world!")'
- sender.OnServerEvent:connect(function(plr, txt)
- code = txt
- local function Pro()
- loadstring(tostring(code))()
- end
- local s, m = pcall(Pro)
- if s then
- sender:FireClient(plr, true)
- else
- sender:FireClient(plr, tostring(m))
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement