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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
parse("mp_wpndmg knife 0")
parse("mp_wpndmg machete 50")
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i] = 0
	end
	return array
end
points = initArray(32)
hp = initArray(32)
killer = initArray(32)
nojoink = initArray(32)
addhook("drop","df_nodrop")
function df_nodrop()
	return 1
end
addhook("die","df_nodropdie")
function df_nodropdie()
	return 1
end
addhook("buy","df_nobuy")
function df_nobuy()
	return 1
end
addhook("team","killerset")
	function killerset(id)
		if player(id,"team")==1 then
		parse("equip "..id.." 84")
		parse("equip "..id.." 69")
		parse("speedmod "..id.." 10")
	end
end
addhook("kill","pointget")
	function pointget(killer)
	points[killer] = points[killer] + 1
end
addhook("ms100","pointhud")
	function pointhud()
		for _, id in pairs(player(0,"table")) do
		parse('hudtxt2 '..id..' 1 "©000255000 Points: '..points[id]..'" 10 410 0')
	end
end
addhook("startround","randomchoose")
	function randomchoose()
	local killerz=player(0,"tableliving")
	nojoink[killerz[math.random(1,#killerz)]]=1
end
addhook("endround","endofround")
	function endofround()
		for i=1,32 do
		if player(i,"exists") and player(i,"health")>0 then parse("killplayer "..i) end
			if player(i,"exists") and nojoink[i]==1 then msg("©255000000The next Killer is: "..player(i,"name").."!@C")
		end
	end
end
addhook("die","whendie")
function whendie(id)
	if nojoink[id]==1 then
		killer[id]=1
		parse("maket "..id)
		killer[id]=0
		nojoink[id]=0
	elseif nojoink[id]==0 then
		killer[id]=1
		parse("makect "..id)
		killer[id]=0
	end
end
addhook("serveraction","menustart")
	function menustart(id,action)
		if action ==1 then
		menu(id,"Select one,Quick potions,Hp Upgrade| 10 for 60 points")
	end
end
addhook("menu","menutx")
	function menutx(id,t,b)
		if t=="Select one" then
			if b==1 then
			menu(id,"Quick Potions,10 Health Potion| 2 Points,20 Health Potion| 4 Points,35 Health Potion| 7 Points,50 Health Potion|10 Points,75 Health Potions|13 Points,100 Health Potion| 17 Points")
		elseif b==2 then
				if hp[id]>9 then
				msg2 (id,"©255000000You Can't Buy More Hp Upgrades!@C")
			elseif hp[id]<=10 then
					if points[id]<=60 then
					msg2(id,"©255000000You Don't Have Enough Points!@C")
				elseif points[id]>=60 then
					points[id]=points[id]-60
					msg2(id,"©000255000You Have Bought Hp Upgrade!@C")
					hp[id]=hp[id]+1
						if hp[id]<=1 then
						parse("setmaxhealth "..id.." 110")				
					elseif hp[id]<=2 and hp[id]>=1 then
						parse("setmaxhealth "..id.." 120")
					elseif hp[id]<=3 and hp[id]>=2 then
						parse("setmaxhealth "..id.." 130")
					elseif hp[id]<=4 and hp[id]>=3 then
						parse("setmaxhealth "..id.." 140")
					elseif hp[id]<=5 and hp[id]>=4 then
						parse("setmaxhealth "..id.." 150")
					elseif hp[id]<=6 and hp[id]>=5 then
						parse("setmaxhealth "..id.." 160")
					elseif hp[id]<=7 and hp[id]>=6 then
						parse("setmaxhealth "..id.." 170")
					elseif hp[id]<=8 and hp[id]>=7 then
						parse("setmaxhealth "..id.." 180")
					elseif hp[id]<=9 and hp[id]>=8 then
						parse("setmaxhealth "..id.." 190")
					elseif hp[id]<=10 and hp[id]>=9 then
						parse("setmaxhealth "..id.." 200")
					end					
				end
			end	
		end
	end
end