01 | wait(. 1 ) |
02 | --[[ |
03 | A note from script: |
04 | If you decide to take this script, make sure you take the module as well. It's in workspace. |
05 | This won't work unless this script is a LocalScript in StarterGui/StarterPack and the modulescript is in workspace. |
06 | I hope you enjoy the script and the modulescript attached to it. In the video I have showed you how to add your |
07 | own effects and such. All you need is the chatted event and then the module functions |
08 | To add aura and hat use SSJAura() and SSJHat() |
09 | Thanks for using my script |
10 | --script_ing |
11 | --]] |
12 | local mod = require(workspace.SSJModule) |
13 | local TransformationAnims = mod.TransformationAnims |
14 | local ScreenAnims = mod.ScreenAnims |
15 | local p = game.Players.LocalPlayer |
You would need to do this for a key pressed function
1 | function onKeyPress(inputObject, gameProcessedEvent) --Function |
2 | if inputObject.KeyCode = = Enum.KeyCode.R then --What key you want to be pressed |
3 | print ( "R was pressed" ) --Put the rest of the script here (what you want to do) |
4 | end |
5 | end |
6 |
7 | game:GetService( "UserInputService" ).InputBegan:connect(onKeyPress) -- Make sure you have this at the end, else it wont work |
Of course for more in-depth explanations you could check out the roblox wiki. There are even the scripting books on the page.