Advertisement
Bolodefchoco_LUAXML

[Script] Lua Explorer

Jan 16th, 2016
805
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.51 KB | None | 0 0
  1. --Creator: Bolodefchoco
  2. --Made in: 16/01/2016
  3. --Last update: 05/06/2016
  4. --[[ Notes:
  5.     Does:
  6.         Permite que você navegue pela syntax lua completa. Se Type for igual a Table você poderá clicar na Function correspondente.
  7. ]]--
  8.  
  9. menu=function(n,path)
  10.     mice[n].path=path
  11.     local t1,t2,t3 = "","",""
  12.     if path then
  13.         for i,v in next,path do
  14.             if i ~= "menu" and i ~= "_G" and i ~= "mice" and i:sub(1,5) ~= "event" then
  15.                 t1=t1..(type(v)=="table" and "<a href='event:"..i.."'>"..i.."</a>" or i)..'\n'
  16.                 t2=t2..type(v)..'\n'
  17.                 t3=t3..(tostring(v)==i and "-" or (#tostring(v)>25 and tostring(v):sub(0,25) or tostring(v)))..'\n'
  18.             end
  19.         end
  20.     end
  21.     ui.addTextArea(0,"",n,50,30,700,364,0x324650,0x324650,1,true)
  22.     ui.addTextArea(1,"<p align='center'><font face='lucida console' size='25'>Lua",n,50,30,700,nil,1,1,0,true)
  23.     ui.addTextArea(2,"<p align='center'>Function",n,100,80,200,17,0x212F36,0x212F36,1,true)
  24.     ui.addTextArea(3,"<p align='center'>"..t1,n,100,110,200,280,0x212F36,0x212F36,1,true)
  25.     ui.addTextArea(4,"",n,100,32,1,360,0x324650,0x324650,1,true)
  26.     ui.addTextArea(5,"<p align='center'>Type",n,300,80,200,17,0x212F36,0x212F36,1,true)
  27.     ui.addTextArea(6,"<p align='center'>"..t2,n,300,110,200,280,0x212F36,0x212F36,1,true)
  28.     ui.addTextArea(7,"<p align='center'>Value",n,500,80,200,17,0x212F36,0x212F36,1,true)
  29.     ui.addTextArea(8,"<p align='center'>"..t3,n,500,110,200,280,0x212F36,0x212F36,1,true)
  30.     ui.addTextArea(9,"",n,300,32,1,360,0x324650,0x324650,1,true)
  31.     ui.addTextArea(10,"",n,500,32,1,360,0x324650,0x324650,1,true)
  32.     ui.addTextArea(11,"",n,700,32,1,360,0x324650,0x324650,1,true)
  33.     ui.addTextArea(12,"<a href='event:_G'>_G</a>"..(mice[n].cbk and mice[n].cbk or ""),n,450,37,250,17,0x212F36,0x212F36,1,true)
  34. end
  35.  
  36. eventTextAreaCallback=function(i,n,c)
  37.     if c:sub(1,2) == "@_" then
  38.         for k,v in next,mice[n].allClicks do
  39.             if k <= tonumber(c:sub(3)) then
  40.                 menu(n,v[1])
  41.                 mice[n].cbk = v[2]
  42.             end
  43.         end
  44.     elseif c~="_G" then
  45.         mice[n].cbk = mice[n].cbk and mice[n].cbk .. (not mice[n].cbk:find(c) and ".<a href='event:@_"..(#mice[n].allClicks+1).."'>" .. c .. "</a>" or "") or "."..c
  46.         table.insert(mice[n].allClicks,{mice[n].path,mice[n].cbk and mice[n].cbk or ""})
  47.         if c~=tostring(mice[n].path) then
  48.             pcall(function() menu(n,mice[n].path[c]) end)
  49.         else
  50.             menu(n,mice[n].path)
  51.         end
  52.     else
  53.         mice[n].cbk=""
  54.         menu(n,_G)
  55.     end
  56. end
  57.  
  58. mice={}
  59. eventNewPlayer=function(n)
  60.     mice[n]={
  61.         path = "",
  62.         cbk = nil,
  63.         allClicks = {},
  64.     }
  65.     menu(n,_G)
  66. end
  67. table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement