You don't need a custom ROM to get root.
Geohot's towelroot works for all S4 variants except your I9500 which has a different chipset. So if your firmware is I9500XXUFNB3 or older, then try:
1) Go and Download the " philz_touch_6.12.8-i9500.tar.md5 " located on this website
2) Download and extract Odin 1.85 to a folder, from:
or here: http://forum.xda-developers.com/attachment.php?attachmentid=581913
3) Put your phone in Download mode (turn off phone, then press power + home + volume down at the same time until it goes to download mode, then proceed according to the screen instructions)
- video: http://youtube.com/watch?v=5KMYhWs2fFI
4) Download Deknox Removal Script from here: http://forum.xda-developers.com/attachment.php?attachmentid=2365214&d=1383345163
Put the zip to your phone memory
5) Now go to the Philz recovery you just installed (turn off device, press power+home+volume up button until it goes into philz recovery) and flash the deknox removal zip
6) After you flash the Knox removal script you are ready to go rooting your device:
-in Philz touch, go to Philz Options / Choose Re-root system / Choose Yes Apply (SuperSu)
-Wait until it finish, Reboot and install SuperSu from playstore
-Once installed, Open SuperSu app / It will ask you to update binaries click on Update as normal (NOT TWRP)
-Once binaries are installed reboot your device
Or find a guide on XDA to your exact version of your ROM, which you can find in settings > info about your device.