View difference between Paste ID: fJ06TFhV and A61NNzgX
SHOW: | | - or go back to the newest paste.
1-
-- Insert your victim's name (person who you would like to move) here without removing the quotation marks.
1+
tfm.exec.disableAutoNewGame(true)
2-
doll = "Sydoline"
2+
tfm.exec.disableAfkDeath(true)
3
tfm.exec.disableAutoShaman(false)
4-
-- Insert YOUR name here without removing the quotation marks.
4+
maps={0,1,2,3,4,5,6,9,11,12,13,15,16,17,18,19,20,24,25}
5-
god = "Tig"
5+
tfm.exec.newGame(0)
6-
-- That's it! You can now run the script and troll people!
6+
system.disableChatCommandDisplay("help",true)
7
8-
-- Editing the following code is not advised.
8+
ui.addPopup(1, 0, "Hello, welcome to the Haunted Game! The shaman can control mice by pressing I to jump, J to move left,K to move down , and L to move right! If you are uncomfortable with the 'I' button, you can alternatively press the 'Space' button to jump! Feel free to change maps! Have fun! Type !help for this popup to pop again!", nil, 200,100,400,true)
9
10-
-- Binding the keyboard for god(you)
10+
function eventChatCommand(name,message)
11-
-- 73 is I, the key for Up.
11+
if message=="help" then
12-
-- 75 is K, the key for Down
12+
ui.addPopup(1, 0, "Hello, welcome to the Haunted Game! The shaman can control mice by pressing I to jump, J to move left,K to move down , and L to move right! If you are uncomfortable with the 'I' button, you can alternatively press the 'Space' button to jump! Feel free to change maps! Have fun! Type !help for this popup to pop again!", name, 200,100,400,true)
13-
-- 74 is J, the key for Left.
13+
14-
-- 76 is L, the key for Right.
14+
15
16-
for name in pairs(tfm.get.room.playerList) do
16+
function eventLoop(time,remaining)
17-
-- Instead of binding each key seperately, we put them all in a group.
17+
if remaining<=0 then
18
tfm.exec.newGame(maps[math.random(#maps)])
19-
--And now the keys are binded!
19+
20-
		tfm.exec.bindKeyboard(god, k, true, true)
20+
21
22
function eventNewGame()
23-
 
23+
for name, player in pairs(tfm.get.room.playerList) do
24-
-- Listening for keyboard events.
24+
25-
-- You'll notice that move values are different because it makes the doll easier to control.
25+
		if player.isShaman then
26
		tfm.exec.bindKeyboard(name, k, true, true)
27-
function eventKeyboard(god, key, down, x, y)
27+
		print(name)
28
		end
29-
--Moves the player Up by 50 pixels
29+
30-
		tfm.exec.movePlayer(doll, 0, 0, true, 0, -50, false)
30+
31
end
32-
-- Moves the player Down by 40 pixels
32+
33-
		tfm.exec.movePlayer(doll, 0, 0, true, 0, 40, false)
33+
function eventKeyboard(name, key, down, x, y)
34
for name, player in pairs(tfm.get.room.playerList) do
35-
-- Moves the player Left by 40 pixels
35+
	if not player.isShaman then
36-
		tfm.exec.movePlayer(doll, 0, 0, true, -40, 0, false)                
36+
37
		tfm.exec.movePlayer(name, 0, 0, true, 0, -50, false)
38-
-- Moves the player Right by 40 pixels
38+
	elseif key == 32 then
39-
		tfm.exec.movePlayer(doll, 0, 0, true, 40, 0, false)                       
39+
		tfm.exec.movePlayer(name, 0, 0, true, 0, -50, false)
40
	elseif key == 75 then
41
		tfm.exec.movePlayer(name, 0, 0, true, 0, 40, false)
42
	elseif key == 74 then
43-
-- Prints out your doll's name only to you.
43+
		tfm.exec.movePlayer(name, 0, 0, true, -40, 0, false)                
44
	elseif key == 76 then 
45-
print("<font color='#FFFF00'>"..doll.."<font color='#FFFF00'> is now your doll!")
45+
		tfm.exec.movePlayer(name, 0, 0, true, 40, 0, false)  
46
	end     
47
	end                
48
end
49
end
50
51
function eventPlayerDied()
52
local i=0
53
for n,player in pairs(tfm.get.room.playerList) do
54
if not player.isDead then
55
i=i+1
56
end
57
end
58
if i==0 then
59
tfm.exec.newGame(maps[math.random(#maps)])
60
end
61
end