Key sequence issues

Hello im amaro, im trying to make a key sequence mechanic, but i having issues understanding how to make it, so the idea is to press a key (g like the strongest battleground ultimate’s) and having a ui of 4 keys to make a key sequence, but the problem i dont know how to check the keys (been a example wich key to put, need to have a table local table = {w,w,e,r}) and i have to make the table inside from other module script (the ability you have) and there a table called “ultimate_keys” and inside of that table theres more tables like this ["epic_punch"] = "e,e,e,e" so then having a function traspassing those key combinations from “ultimate_keys”, so then have to check in client side, the inputs, what sequence equals the sequence, well…

So much going on that i dont know how to make this mechanic, please help, and if you asking what scripts i made, i cant, cuz im in phone right know, while writting this i cant show any scripts for that reason

Anyone there? Sorry for the long text i post

You can try this. When the player presses a key, you can check if it was the first key with if input.KeyCode == Enum.KeyCode[table[1]]. If it was, then remove the letter table.remove(table,table[1]). Then you can update the GUI accordingly when the table’s contents change. Once the table is empty, you can activate the ability

Make sure the capitalise the letter in the table or the enum won’t recognise it