Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- senha="Gameplay"
- lock=true
- data={}
- tfm.exec.newGame('<C><P D="x_nekodancer/x_mondes/x_11.jpg" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="797" o="697395" X="401" Y="405" T="12" H="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="ffb062" X="400" Y="112" T="12" H="10" /><S L="800" o="ffb062" X="400" H="10" Y="6" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="697395" X="806" Y="200" T="12" H="400" /><S L="10" o="697395" X="-5" H="400" Y="200" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="800" o="ffb062" X="400" H="10" Y="14" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="801" o="697395" H="101" Y="-51" T="12" X="401" /></S><D><P C="ffad00,ffb062" Y="-290" T="117" X="1" P="0,0" /><DC Y="87" X="404" /><P C="fdfdfd" Y="238" T="90" P="0,0" X="696" /></D><O /></Z></C>')
- system.disableChatCommandDisplay("senha")
- system.disableChatCommandDisplay("lock")
- function eventNewPlayer(name)
- newData={
- ["s"]=10;
- }
- data[name]=newData;
- if lock == true then
- ui.addTextArea(8359,"<font size='48'><font face='Comic Sans MS'><font color='#0000ff'>Este cafofo está protegido por senha. Digite para entrar:",name,000,010,800,400,0x0040ff,0x0040ff,1.0,true)
- ui.addPopup(0,2,"",name,350,175,200,true)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventPlayerDied(name)
- tfm.exec.respawnPlayer(name)
- end
- function eventChatCommand(name,message)
- if message == "senha" then
- ui.addPopup(1,2,"Insira a nova senha","name",350,175,200,true)
- end
- if message == "lock" then
- if lock == true then
- lock=false
- ui.addPopup(10,0,"A sala foi desbloqueada com sucesso",name,350,175,200,true)
- else
- lock=true
- ui.addPopup(10,0,"A sala foi bloqueada com sucesso, digite !senha para mudar a senha",name,350,175,200,true)
- end
- end
- end
- function eventPopupAnswer(id,name,answer)
- if id == 0 then
- if senha == answer then
- ui.removeTextArea(8359,name)
- tfm.exec.respawnPlayer(name)
- else
- data[name].s=data[name].s-1
- if data[name].s >= 1 then
- ui.addPopup(0,2,"Senha incorreta, tente novamente!<br><br>Você ainda pode tentar mais <b>"..data[name].s.." vezes",name,350,175,200,true)
- else
- ui.addTextArea(8359,"<font size='48'><font face='Comic Sans MS'><font color='#ff0000'>Você errou muitas senhas e não está autorizado a entrar no cafofo.",name,000,010,800,400,0xffff00,0xffff00,1.0,true)
- end
- end
- end
- if id == 1 then
- senha=answer
- ui.addPopup(10,0,"A senha foi mudada para: "..answer.."",name,350,175,200,true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement