Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 09/03/2017
- --Last update: 09/03/2017
- system.roomSettings = {
- ["@"] = function(value)
- -- /room #test1234@Tigrounette
- print(value .. " is noob!")
- end,
- }
- system.module = "test"
- system.isRoom = tfm.get.room.name:byte(2) ~= 3
- system.roomAttributes = system.isRoom and tfm.get.room.name:match("%*?#".. system.module .. "%d+(.*)") or nil
- system.setRoom = function()
- if system.isRoom and system.roomAttributes then
- local chars = ""
- for k in next,system.roomSettings do
- chars = chars .. k
- end
- for char,value in system.roomAttributes:gmatch("(["..chars.."])([^"..chars.."]+)") do
- for k,v in next,system.roomSettings do
- if k == char then
- v(value)
- break
- end
- end
- end
- end
- end
- system.setRoom()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement