1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--------------------------
---Teleportation jutsu----
--------------------------
tilex = 11 --(your room tilex)
tiley = 10 --(your room tiley)
---------------
-----Setup-----
---------------
kills={}
use_gate = {}
addhook("join","_join")
addhook('spawn','_spawn')
addhook('kill','kill_hook')
addhook('endround','_end')
addhook('use','use_hook')
---------------
---Functions---
---------------
function _spawn(id)
if kills[id] >= 12 then
if use_gate[id]==false then
use_gate[id]=true
local x = tilex * 32 + 16
local y = tiley * 32 + 16
parse('setpos '..id..' '..x..' '..y)
msg2(id,'\169000255000You Have Been Spawned In Armory Room')
end
end
end
function use_hook(id,event,data,x,y) -- with that function you can open the door of the armory room (only killer)
if player(id,"tilex") == 15 and player(id,"tiley")==13 then
if use_gate[id]==true then
parse("trigger roomdoor") --"roomdoor" is my dynowall name replace it with your dynowall name to be able to open the door of the room (only killer)
else
msg2(id,"\169255000000Error, You Don't Have Permission To Open The Door")
end
end
end
function kill_hook(k,v,weapon,x,x)
kills[k] = kills[k] + 1
end
function _end(mode)
local playerlist=player(0,'table')
for _,id in pairs(playerlist) do
if use_gate[id]==true then
kills[id]=0
use_gate[id]=false
end
end
end
function _join(id)
use_gate[id] = false
kills[id] = 0
end