{$CLEO .cs}

//-------------MAIN---------------
thread 'ScarabLaser' 
0000: NOP 

0AAC: $hMP3 = load_audiostream "CLEO\ScarabLaser.mp3"

:start0
wait 0 
if
Actor.DrivingVehicleType($PLAYER_ACTOR, #SCARAB)
else_jump @start0 
0@ = Actor.CurrentCar($PLAYER_ACTOR)

:start1
wait 0 
if   
Actor.DrivingVehicleType($PLAYER_ACTOR, #SCARAB)
else_jump @start0 

:start2
wait 0 
if 
00E1:   player 0 pressed_key 4  // Secondary fire
else_jump @start1

073C: car 0@ damage_component 1
0208: 7@ = random_float_in_ranges -1.5 1.5 
0208: 8@ = random_float_in_ranges -1.5 1.5

0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 7@ 100.0 8@
0407: store_coords_to 4@ 5@ 6@ from_car 0@ with_offset 0.0 1.98 1.55
06BC: create_M4_shoot_from 4@ 5@ 6@ target 1@ 2@ 3@ energy 1500 
0AAD: set_mp3 $hMP3 perform_action 1

wait 100 
068A: set_car 0@ repair_componentA 1
0AAD: set_mp3 $hMP3 perform_action 0
wait 100

wait 0
if
010F:   player $PLAYER_CHAR wanted_level > 0
jf @wl1
jump @go
:wl1
010D: set_player $PLAYER_CHAR wanted_level_to 1
:go
jump @start1

0A93: end_custom_thread