-- This script enables money drops on players using the Kiddons Mod Menu

-- Define the money drop function
function dropMoney(player)
    -- Set the amount of money to drop
    local amount = 1000000

    -- Get the player's position
    local playerPos = GetEntityCoords(GetPlayerPed(player))

    -- Create the money pickup
    local moneyPickup = CreatePickupRotate(GetHashKey("PICKUP_MONEY_CASE"), playerPos.x, playerPos.y, playerPos.z, 0, 0, 0, 512, amount, 2, true, GetHashKey("PICKUP_MONEY_SECURITY_CASE"))

    -- Set the pickup to be collectible by all players
    NetworkRegisterEntityAsNetworked(moneyPickup)
    NetworkSetNetworkIdDynamic(moneyPickup, true)
    SetNetworkIdCanMigrate(moneyPickup, true)
    SetNetworkIdExistsOnAllMachines(moneyPickup, true)

    -- Set the pickup to be visible to all players
    SetEntityVisible(moneyPickup, true)

    -- Set the pickup to be interactable by all players
    SetEntityCanBeDamaged(moneyPickup, false)
    SetEntityCanBeTargetedWithoutLos(moneyPickup, true)
    SetEntityCollision(moneyPickup, true, true)

    -- Set the pickup to be automatically collected after a certain time
    SetPickupRegenerationTime(moneyPickup, 30000)

    -- Attach the pickup to the player
    AttachEntityToEntity(moneyPickup, GetPlayerPed(player), GetPedBoneIndex(GetPlayerPed(player), 57005), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true)

    -- Display a notification to the player
    SetNotificationTextEntry("STRING")
    AddTextComponentString("You received a money drop!")
    DrawNotification(false, false)
end

-- Register the command to trigger the money drop
RegisterCommand("moneydrop", function(source, args)
    -- Check if the player has permission to use the command
    if IsPlayerAceAllowed(source, "command.moneydrop") then
        -- Check if a player ID was provided as an argument
        if args[1] ~= nil then
            -- Get the player ID from the argument
            local player = tonumber(args[1])

            -- Check if the player ID is valid
            if player ~= nil and player > 0 and player <= 32 then
                -- Trigger the money drop for the specified player
                dropMoney(player)
            else
                -- Display an error message if the player ID is invalid
                print("Invalid player ID!")
            end
        else
            -- Display an error message if no player ID was provided
            print("No player ID provided!")
        end
    else
        -- Display an error message if the player doesn't have permission to use the command
        print("You don't have permission to use this command!")
    end
end)

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: