addHook("PreThinkFrame", function() for player in players.iterate do //You gotta be a player if player.fakeroll == nil then //If player.fakeroll doesn't exist then player.fakeroll = 0 //make it exist end player.mo.rollangle = (player.mo.rollangle - player.fakeroll) end end) addHook("ThinkFrame", function() for player in players.iterate do //you gotta be a player if P_IsObjectOnGround(player.mo) and player.speed > 2000000 then //you gotta be running on the ground player.fakeroll = ((player.mo.angle - R_PointToAngle(player.mo.x, player.mo.y)) / 2) //The actual angle script if player.fakeroll > 200000000 then //if you're going too far to the left then player.fakeroll = 200000000 //cap your angle end if player.fakeroll < -200000000 then //if you're going too far to the right then player.fakeroll = -200000000 //cap your angle end else //if you're not running or you're not on the ground then player.fakeroll = 0 //become vertical again end end end) addHook("PostThinkFrame", function() for player in players.iterate do //You gotta be a player player.mo.rollangle = (player.mo.rollangle + player.fakeroll) end end) //Enable the code below to draw some random crap (for debug reasons only) //hud.add(function(v) // for player in players.iterate do // v.drawNum(160, 5, player.mo.rollangle, V_ORANGEMAP|V_30TRANS) // v.drawNum(160, 15, player.mo.angle, V_ORANGEMAP|V_30TRANS) // v.drawNum(160, 25, R_PointToAngle(player.mo.x, player.mo.y), V_ORANGEMAP|V_30TRANS) // v.drawNum(160, 35, player.speed, V_ORANGEMAP|V_30TRANS) // end //end)