Your syntax is all screwed up. You need to read a tutorial again or something so you fully understand what each thing means, but the short of it is you're missing a bunch of EndIfs and you can't use Else like that. I'm also not sure what DisableControl is doing, I think it needs to be the keycode not 0,1 whatever like it is (I'm not familiar with it though so you may be right) so like DisableControl 30 for A.
You'll also make it easier to read if you tab out and use white space accordingly like most code.
And lastly you're never re-enabling the control.
As for the basic idea of the script it's also wrong. You would want to check, in one If statement if you're pressing W or S, then disable both A and D, then have an ElseIf pressing A or D, disable both W and S.
So
Begin GameMode .... If View 3rd person If W or S pressed DisableControl A DisableControl D ElseIf A or D pressed DisableControl W DisableControl S Else EnablePlayerControls EndIf If doOnce == 0 Set doOnce to 1 EndIf Else If doOnce == 1 EnablePlayerControls Set doOnce to 0 EndIf EndIfEnd
You'd probably also want to have some logic for getting the key released to automatically enable controls rather then having to press a different button, thought I'm not sure if there is a function to do that and it would be more complicated. Nevermind IsKeyPressed already does that so just do it like so.