TTT Setting Role

In code how do i set the role of the owner of a running script. I tried looking through the ttt lua files but couldnt find it

what is the “running script”

ply:SetRole(ROLE_TRAITOR)
ply:SetCredits(5)
SendFullStateUpdate()

Sorry for late response i was busy with other things when i try this it says SetCredits and SendFullStateUpdate dont exist.

For educational purposes i am trying to make a hacking lua file. I need to change my role from there

You can’t set your role clientside… It is a serverside-only function because BKU has common sense.

I know that. But is there a way to call the command from server side? or i was thinking that if i could copy/paste the functions from the original ttt gamemode files into the lua file to essently make my own function to correctly change my role?

That’s not how it works.