Number Keypad <changing pass>

Geremy and Joshua - Custom level - Apr 18, 2014 from Android
Play Edit 3 players liked this.

To change pass find the 3311# then change it whenever you want

if this:first_run() then
entities = {
{"1",16},
{"2",17},
{"3",18},
{"4",19},
{"5",20},
{"6",21},
{"7",22},
{"8",23},
{"9",24},
{"0",27},
{"←", 48}}
for ent = 1, #entities do
entities[ent][3] = world:get_entity_by_id(entities[ent][2])
end
code = ""
codes = {
--{"code", freq}
{"3311", 20}}
end

for ent = 1, #entities do
entities[ent][4], entities[ent][5] = entities[ent][3]:get_position()
entities[ent][6], entities[ent][7] = entities[ent][3]:get_bbox()
if game:poll_event(5)==true then
cx,cy=game:get_cursor()
if cx > entities[ent][4] - entities[ent][6] and cx < entities[ent][4] + entities[ent][6] and cy > entities[ent][5] - entities[ent][7] and cy < entities[ent][5] + entities[ent][7] then
if entities[ent][1] == &quot;&larr;&quot; then
code = code:sub(1,#code-1)
else
if #code < 4 then
code = code .. entities[ent][1]
end
end
entities[ent][3]:highlight()
end
end
end

for freq = 1, #code do
num = code:sub(freq,freq)
if num == &quot;0&quot; then num = 10 end
this:write_frequency(#code-freq+1,num/10)
end

if #code == 4 then
for pass = 1, #codes do
if code == codes[pass][1] then
this:write_frequency(codes[pass][2],1)
game:message(&quot;Code correct.&quot;)
code = &quot;&quot;
break
end
game:message(&quot;Incorrect code, please try again.&quot;)
code = &quot;&quot;
end
end

Downloads: 98 - Level ID: 5168