You could check if the vehicle model is Bus using

local veh = GetVehiclePedIsIn(PlayerPedId())

if GetEntityModel(veh) == GetHashKey("Bus") then
    print("you in a bus you better pay")