Keymaster - Minigame
Step by step installation guide, common issues & solutions, troubleshooting guide, code snippets, common error codes, config previews, locales previews and changelogs; all in 1 easily accessible place

Translate

INSTALLATION GUIDE

1. Unzip the cd_keymaster.zip folder and place this folder in your servers resource folder.
2. Before starting the script, please read the config.lua (this is located inside the main cd_keymaster folder) and configure the script to suit your server's needs.

How do I use it?

Example 1

You can use the start the minigame by using the default settings.
1
local example = exports['keymaster']:StartKeyMaster()
2
if example then
3
print('im a winner)
4
else
5
print('i suck so bad)
6
end
Copied!

Example 2

Or you can use the start the minigame by sending customized settings in a table.
1
local CustomSettings = {
2
settings = {
3
handleEnd = true; --Send a result message if true and callback when message closed or callback immediately without showing the message
4
speed = 10; --pixels / second
5
scoreWin = 1000; --Score to win
6
scoreLose = -150; --Lose if this score is reached
7
maxTime = 60000; --sec
8
maxMistake = 5; --How many missed keys can there be before losing
9
speedIncrement = 1; --How much should the speed increase when a key hit was successful
10
},
11
keys = {"a", "w", "d", "s", "g"}; --You can hash this out if you want to use default keys in the java side.
12
}
13
14
local example = exports['keymaster']:StartKeyMaster(CustomSettings)
15
if example then
16
print('im a winner)
17
else
18
print('i suck so bad)
19
end
Copied!

Is the resource not working as expected?

  • Make sure the name of the folder is cd_keymaster.
  • Check the server console and the in-game F8 console for errors.
  • If all else fails, contact the Codesign Team in the Codesign Discord.