execute store result score random itemcount run random value 1..4
execute if score random itemcount matches 1 run effect give @s slowness 5
execute if score random itemcount matches 2 run effect give @s weakness 5
execute if score random itemcount matches 3 run effect give @s poison 5
execute if score random itemcount matches 4 run effect give @s wither 5
scoreboard players reset random