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
MovingCamera={
	{
		{1,1},
		{33,9},
		{34,36},
		{13,28},
		{14,6}
	},
	{
		{27,63},
		{16,49},
		{27,63},
		{37,49},
		{17,62},
		{34,52}
	},
	{
		{3,89},
		{22,89},
		{20,108},
		{55,108},
		{55,131},
		{20,142},
		{43,90}
	}
}
CamSet={0,0}
function distance(x1,y1,x2,y2)
	return math.floor(math.sqrt((x2-x1)^2+(y2-y1)^2))
end
addhook("always","Auah_Dark")
function Auah_Dark()
	if MoveCam==true then
		if CamSet[1]==0 and CamSet[2]==0 then
			CamSet[1]=1
			CamSet[2]=math.random(1,#MovingCamera)
			setpos(1,MovingCamera[CamSet[2]][1][1]*32+16,MovingCamera[CamSet[2]][1][2]*32+16)
		elseif CamSet[1]==#MovingCamera[CamSet[2]] then
			MoveCam=false
			local tmp=image("gfx/block.bmp",320,240,2)
			imagescale(tmp,21,21)
			imagealpha(tmp,0)
			tween_alpha(tmp,1000,1)
			timerEx(1000,tween_alpha,1,tmp,1000,0)
			timerEx(2000,freeimage,1,tmp)
			timerEx(2000,loadstring("MoveCam=true"),1)
			CamSet[1]=0
			CamSet[2]=0
		else
			local x,y=player(1,"x"),player(1,"y")
			local a=math.abs(math.atan2(MovingCamera[CamSet[2]][CamSet[1]+1][2]-MovingCamera[CamSet[2]][CamSet[1]][2],MovingCamera[CamSet[2]][CamSet[1]+1][1]-MovingCamera[CamSet[2]][CamSet[1]][1])-(math.pi/2))
			x = x + math.cos(a) * (distance(MovingCamera[CamSet[2]][CamSet[1]][1]*32+16,MovingCamera[CamSet[2]][CamSet[1]][2]*32+16,MovingCamera[CamSet[2]][CamSet[1]+1][1]*32+16,MovingCamera[CamSet[2]][CamSet[1]+1][2]*32+16)/250)
			y = y + math.sin(a) * (distance(MovingCamera[CamSet[2]][CamSet[1]][1]*32+16,MovingCamera[CamSet[2]][CamSet[1]][2]*32+16,MovingCamera[CamSet[2]][CamSet[1]+1][1]*32+16,MovingCamera[CamSet[2]][CamSet[1]+1][2]*32+16)/250)
			setpos(1,x,y)
			hudtxt(9,"\""..distance(x,y,MovingCamera[CamSet[2]][CamSet[1]+1][1]*32+16,MovingCamera[CamSet[2]][CamSet[1]+1][2]*32+16).." "..CamSet[1].." "..CamSet[2].." "..MovingCamera[CamSet[2]][CamSet[1]][1].." "..MovingCamera[CamSet[2]][CamSet[1]][2].."\"",0,0,0)
			if math.sqrt(((MovingCamera[CamSet[2]][CamSet[1]+1][1]*32+16)-x^2)+((MovingCamera[CamSet[2]][CamSet[1]+1][2]*32+16)-y)^2)<=32 then
				CamSet[1]=CamSet[1]+1
			end
		end
	end
end
EDIT: MoveCam variable would triggered somewhere else on code at my Reverser lua