Huge Script Function (RPGM MV)

In RPG MAKER MV I want to create a function that checks the difficulty and gives items accordingly.

For example, I slay a monster in EASY MODE. In the database, there's Bone, Bone+, and Hvy Bone. Since I slayed a monster in easy mode, I can get rewarded a Bone. If I was in HARD MODE, I'd get a Bone+, and if I was in VERY HARD, I'd get a HvyBone.

However, I want to create 3 scripts that work like this:

<conditional branch placed using the basic eventing & checks if the diffculty of the game is easy/normal/hard>
<i'd create 3 different scripts, one for easy item rewards, one for hard item rewards, one for very hard item rewards>
[Script]
{
Sets a chance of obtaining an item

<variable CHANCE = 1-6>
<if CHANCE = 1 get item 1>
<erase event>
else
<variable CHANCE = 1-33>
<if CHANCE = 1 get item 2>
<erase event>
else
<variable CHANCE = 1-15>
<if CHANCE = 1 get item 3>
<erase event>
else
<variable CHANCE = 1-25>
<if CHANCE = 1 get item 4>
<erase event>
else
<variable CHANCE = 1-3>
<if CHANCE = 1 get item 5>
<erase event>
else
<get item 1>
<erase event>
}

I don't know how to script but I kinda broke it down to want I'm looking for. I COULD use eventing but a script would be so much easier and organized rather than a large page that takes ages to scroll through
There is no reason why you need a script for this. It can be done with eventing. Have you tried? What happens when you try? How is this event called? I suspect you do not need to erase event after each option - that means it will only work once per map.
The script would basically require the same breakdown of the branches and random rolls as the event would need, and because you'll have to provide the data for this it would be no difference in work doing it by script/plugin or by event.
That is one of the reason Shaz suggest doing it by event instead, because with events you could do it yourself instead of waiting for a scripters.

However, here is an alternative way of handling this that might save some work:
Instead of giving the enemies different drops, you always have them drop "unidentified bone" (to use your example). Then you have an event for identifying unknown items (there are several ways to do this by map event or by common event), and that event exchanges the unidentified drops with fitting real bones depending on difficult level and random chance and whatever.

Original thread: https://forums.rpgmakerweb.com/threads/huge-script-function-rpgm-mv.88499/