For starters, I want to make a gear that increases my walkspeed and health by 30 if I press ' e '. I tried UserInput and Keypress, but failed :(. I want to do more advanced stuff with it on the future like summoning and combining with a monster (RPG).
Pretty easy!
you can add this is the code:
01 | local players = game:GetService( "Players" ) |
02 | local player = players.LocalPlayer |
03 | local mouse = player:GetMouse() |
04 | local tool = [ SPECIFY WHERE THE TOOL IS HERE ] |
05 |
06 | local equipped = false |
07 |
08 | tool.Equipped:connect( function () |
09 | equipped = true |
10 | end ) |
11 |
12 | tool.Unequipped:connect( function () |
13 | equipped = false |
14 | end ) |
15 |