Shouldn't it be if SpiffoNumber == 1 then...?? Double signs? Single equal sign assigns a value, use double equal signs in if loops. Also, print() your random number to see its value.
Edit: Here's a little function that will spawn 5 Spiffos and print a random number to the console: local function AddSpiffo(_keyPressed) local key = _keyPressed; local numberOfItems = 5; if tostring(key) == tostring(Keyboard.KEY_M) then local player = getSpecificPlayer(0); local inventory = player:getInventory(); for loopCount = 1, numberOfItems do local SpiffoNumber = ZombRand(3) +1; print("*** Spiffo" .. SpiffoNumber); inventory:AddItem("Base.Spiffo"); end endend-- AnyKeyPressEvents.OnKeyPressed.Add(AddSpiffo);Press M ingame to spawn the Spiffos.