Well, I got bored enough to see how I'd write the script. You didn't properly explain how the heist or roll things should work, so I ignored them completely. The giveaway explanation was a bit lacking too, but I wrote it anyway.

To limit the channels where the script works, all you need to do is to change the join event:
on *:join:#: { = all channels.
on *:join:#mychannel,#theirchannel,#nooneschannel: { = Those three channels only.
Code:
on *:start:unset %eggsonline.*

on *:text:!ticket:#: {
  var %h = eggs. $+ #,%p $hget(%h,$nick),%w @eggs. $+ #
  if ($hget(%h)) {
    if (!$window(%w)) .notice $nick Giveaway is not active currently, so you can't buy tickets.
    elseif (%p >= 50) {
      hadd %h $nick $calc(%p -50)
      aline %w $nick
      .notice $nick Ticket bought! You now have $iif($fline(%w,$nick,0) == 1,1 ticket,$bytes($v1,b) tickets) and $iif($hget(%h,$nick) == 1,1 egg.,$bytes($v1,b) eggs.)
    }
    else .notice $nick You need more eggs to buy a ticket! You currently have %p $iif(%p == 1,egg.,eggs.)
  }
}

on *:text:!eggs:#: {
  var %h = eggs. $+ #,%w @eggs. $+ #
  if ($hget(%h)) {
    if ($window(%w)) .notice $nick You currently have $iif($hget(%h,$nick) == 1,1 egg,$bytes($v1,b) eggs) and $fline(%w,$nick,0) tickets in the giveaway.
    else .notice $nick You currently have $iif($hget(%h,$nick) == 1,1 egg.,$bytes($v1,b) eggs.)
  }
}

menu channel {
  -
  Egg options
  .$iif(%eggsonline. [ $+ [ # ] ],Go offline,Go online):$iif(%eggsonline. [ $+ [ # ] ],unset,set) %eggsonline. [ $+ [ # ] ] 1
  .-
  .$iif($window(@eggs. $+ #),Conclude the giveaway): {
    var %w = @eggs. $+ #,%t $line(%w,0)
    if (%t > 0) msg # Giveaway is over: the winner is $line(%w,$rand(1,%t)) $+ !
    else msg # Giveaway is over: not enough participants.
    window -c %w
  }
  .$iif(!$window(@eggs. $+ #),Start a giveaway): {
    window -h @eggs. $+ #
    msg # A giveaway has started! You can buy tickets by typing !TICKET for 50 eggs each.
  }
  .-
  .Give everyone eggs: {
    var %h = eggs. $+ #
    if ($input(How many eggs would you give to the eggheads of # $+ ?,buqe,Eggs,50) > 0) noop $hfind(%h,*,0,w,hinc %h $1 $v1)
  }
  -
}

on *:join:#: {
  var %h = eggs. $+ #
  if ($nick == $me) {
    hfree -w %h
    hmake %h 100
    .timereggs. $+ # 1 600 addeggs #
  }
  elseif ($hget(%h)) && ($hget(%h,$nick) == $null) hadd %h $nick 100
}

on *:part:#:if ($nick == $me) saveeggs #

on *:kick:#:if ($knick == $me) saveeggs #

on *:disconnect: {
  var %x = 1
  while ($chan(%x)) { saveeggs $v1 | inc %x }
}

alias -l saveeggs {
  var %h = eggs. $+ $1
  if ($hget(%h)) {
    hsave -i %h Eggs.db $1
    hfree -w %h
    .timereggs. $+ # off
  }
}

alias -l addeggs {
  var %x = 1,%h eggs. $+ $1,%p $iif(%eggsonline. [ $+ [ $1 ] ],10,2)
  if ($hget(%h)) {
    while ($nick($1,%x)) { hinc %h $nick($1,%x) %p | inc %x }
    hsave -i %h Eggs.db $1
  }
}

raw 366:*:checkforneweggs $2

alias -l checkforneweggs {
  var %h = eggs. $+ $1,%x 1
  if ($hget(%h)) {
    while ($nick($1,%x)) { if ($hget(%h,$nick($1,%x)) == $null) hadd %h $nick($1,%x) 100 | inc %x }
    hsave -i %h Eggs.db $1
  }
}


When you join a channel, it creates a hash table called "eggs.<CHANNEL>" and a timer called "eggs.<CHANNEL>". The timer executes "addeggs" alias once every 10 minutes, and gives everyone 2 or 10 "eggs," depending on your status.

To set your status to online/offline: open the channel menu --> Egg options --> Go online/offline. You can also start a giveaway or give eggs to everyone via that same menu.

The way the giveaway works is that it creates a hidden @window for the channel (@eggs.<CHANNEL>), and each time a user says "!TICKET" it adds their name to the window. So a person buying 10 tickets would have their name 10 times in the list, and the the script just does $rand(1,<number of lines>) and picks the winner. More names in the list = the higher chance to win.

There's also an "!EGGS" command that will show the user how many eggs (and tickets) they have.



It should be easy for anyone to extend the script to do whatever they want. Each channel gets "eggs.<CHANNEL>" hash table, item names in the hash table are user names and the item values are the number of eggs they have.