hiiii! make this code shorter pls: import pygame,random,sys
# [pygame.init()] is a function that initializes all the imported Pygame modules that require initialization.
pygame.init()
WIDTH,HEIGHT=600,400
screen=pygame.display.set_mode((WIDTH,HEIGHT))
pygame.display.set_caption("Cube Runnin'")
font_small=pygame.font.SysFont(None,24);font_med=pygame.font.SysFont(None,36)
font_large=pygame.font.SysFont(None,48);font_xlarge=pygame.font.SysFont(None,72)
WHITE=(255,255,255);BLUE=(0,0,255);DARK_BLUE=(0,0,139) # New double points powerup color
DARKER_DOUBLE_POINTS=(0,0,100) # Darker dark blue for double points
RED=(255,0,0);DARK_RED=(180,0,0);GREEN=(0,255,0);YELLOW=(255,255,0) # Shield color
BLACK=(0,0,0);GRAY=(200,200,200);TRANSPARENT_BLACK_180=(0,0,0,180)
SPEED_GLOW_COLOR=(50,255,50);SUPER_SHINY_PINK=(255,100,180) # supershield pink glow color
OPSHIELD_COLOR=(180,30,90) # opshield dark pink
clock=pygame.time.Clock()
FPS=60;floor_height=40;player_size=20;gravity=1;jump_speed=15;base_move_speed=5
STATE_MENU,STATE_PLAYING,STATE_PAUSED,STATE_GAMEOVER=range(4)
POWERUP_DURATION_FRAMES=FPS*30;SHIELD_DURATION_FRAMES=FPS*10;SUPERSHIELD_DURATION_FRAMES=FPS*30;OPSHIELD_DURATION_FRAMES=FPS*45
OPSHIELD_HITS=6
# def is a keyword used to define a function. Functions are reusable blocks of code that perform a specific task.
def draw_text_with_outline(surf,text,font,c,o,x,y,center=True):
    ts,os=font.render(text,1,c),font.render(text,1,o)
    # the if statement is used for conditional execution of code.
    r=ts.get_rect(center=(x,y)) if center else ts.get_rect(topleft=(x,y))
    # the for loop is used to iterate over a sequence (like a range) and execute a block of code for each element in that sequence.
    for p in [(r.x-1,r.y),(r.x+1,r.y),(r.x,r.y-1),(r.x,r.y+1)]:surf.blit(os,p)
    surf.blit(ts,r)
class Player:
    def __init__(self):
        self.rect=pygame.Rect(WIDTH//2,HEIGHT-floor_height-player_size,player_size,player_size);self.dy=0;self.on_floor=True
        self.can_double_jump=self.double_jump_available=False;self.speed_boost=self.shield_active=False
        self.supershield_active=self.opshield_active=self.double_points_active=False
        self.supershield_hits_left=3;self.opshield_hits_left=OPSHIELD_HITS
    def jump(self):
        if self.on_floor:self.dy,self.on_floor,self.double_jump_available=-jump_speed,False,self.can_double_jump
        elif self.double_jump_available:self.dy,self.double_jump_available=-jump_speed,False
    def move(self,dx):self.rect.x=max(0,min(WIDTH-player_size,self.rect.x+dx))
    def update(self,floors):
        self.dy+=gravity;self.rect.y+=self.dy;cf=None
        for f in floors:
            if self.rect.colliderect(f.rect)and self.dy>=0 and self.rect.bottom-self.dy<=f.rect.top:self.rect.bottom,self.dy,self.on_floor,cf=f.rect.top,0,True,f;break
        else:self.on_floor=False
        if cf and self.dy==0 and cf.damage():floors.remove(cf)
        if self.rect.y>HEIGHT-floor_height-player_size:self.rect.y,self.dy,self.on_floor=HEIGHT-floor_height-player_size,0,True
        self.rect.x=max(0,min(WIDTH-player_size,self.rect.x))
    def draw(self,surf):
        if self.speed_boost:
            gr=player_size*2;gl=pygame.Surface((gr*2,gr*2),pygame.SRCALPHA)
            pygame.draw.circle(gl,(*SPEED_GLOW_COLOR,100),(gr,gr),gr);surf.blit(gl,(self.rect.centerx-gr,self.rect.centery-gr))
        if self.opshield_active:pygame.draw.ellipse(surf,OPSHIELD_COLOR,self.rect.inflate(18,18),5)
        if self.supershield_active:pygame.draw.ellipse(surf,SUPER_SHINY_PINK,self.rect.inflate(14,14),4)
        if self.shield_active:pygame.draw.ellipse(surf,YELLOW,self.rect.inflate(10,10),3)
        pygame.draw.rect(surf,BLUE,self.rect)
class Floor:
    def __init__(self,y):
        self.rect=pygame.Rect(0,y,WIDTH,floor_height);self.max_health=5;self.health=self.max_health
    def draw(self,surf):
        r=self.health/self.max_health
        c=tuple(int(RED[i]*r+DARK_RED[i]*(1-r))for i in range(3))
        pygame.draw.rect(surf,c,self.rect)
        w,h=self.rect.width*.3,6;x,y=(WIDTH-w)/2,self.rect.top-h-4
        pygame.draw.rect(surf,BLACK,(x,y,w,h),1)
        inner_w=w*(self.health/self.max_health)
        pygame.draw.rect(surf,GREEN,(x+1,y+1,inner_w-2,h-2))
    def damage(self):
        self.health-=1;return self.health<=0
class PowerUp:
    def __init__(self,x,y,pt):
        self.rect=pygame.Rect(x,y,player_size,player_size)
        self.power_type=pt
        self.fall_speed=random.randint(3,6)
    def apply(self,player,timers):
        d={'double_jump':(('can_double_jump',True),'double_jump'),'speed_boost':(('speed_boost',True),'speed_boost'),
           'shield':(('shield_active',True),'shield'),'supershield':(('supershield_active',True),'supershield'),
           'opshield':(('opshield_active',True),'opshield'),'double_points':(('double_points_active',True),'double_points')}
        if self.power_type in d:
            a,k=d[self.power_type]
            setattr(player,a[0],a[1])
            timers[k]={'shield':SHIELD_DURATION_FRAMES,'supershield':SUPERSHIELD_DURATION_FRAMES,'opshield':OPSHIELD_DURATION_FRAMES}.get(k,POWERUP_DURATION_FRAMES)
            if self.power_type=='supershield':player.supershield_hits_left=3
            elif self.power_type=='opshield':player.opshield_hits_left=OPSHIELD_HITS
    def update(self):self.rect.y+=self.fall_speed
    def draw(self,surf):
        pt,r=self.power_type,player_size
        if pt in ("double_jump","speed_boost","shield","double_points"):
            c={"double_jump":BLUE,"speed_boost":GREEN,"shield":YELLOW,"double_points":DARKER_DOUBLE_POINTS}[pt]
            pygame.draw.rect(surf,c,self.rect)
        elif pt in ("supershield","opshield"):
            c=SUPER_SHINY_PINK if pt=="supershield" else OPSHIELD_COLOR
            glow=pygame.Surface((r*4,r*4),pygame.SRCALPHA)
            for i in range(3,0,-1):
                alpha=(30 if pt=="supershield" else 40)*i
                rect=pygame.Rect(r-i*6,r-i*6,self.rect.width+i*12,self.rect.height+i*12)
                pygame.draw.rect(glow,(*c[:3],alpha),rect,border_radius=4)
            surf.blit(glow,(self.rect.x-r*1.5,self.rect.y-r*1.5))
            pygame.draw.rect(surf,c,self.rect,border_radius=4)
        else:pygame.draw.rect(surf,WHITE,self.rect)
class KillBlock:
    def __init__(self,x,y):
        self.size=60;self.rect=pygame.Rect(x,y,self.size,self.size);self.fall_speed=random.randint(4,7)
    def update(self):
        self.rect.y+=self.fall_speed
        if self.rect.top>HEIGHT:self.rect.x=random.randint(0,WIDTH-self.size);self.rect.y=-self.size;self.fall_speed=random.randint(4,7)
    def draw(self,surf):pygame.draw.rect(surf,BLACK,self.rect) # killblocks black as requested
def draw_paused_overlay(surf):
    o=pygame.Surface((WIDTH,HEIGHT),pygame.SRCALPHA);o.fill(TRANSPARENT_BLACK_180);surf.blit(o,(0,0))
    draw_text_with_outline(surf,"PAUSED",font_xlarge,WHITE,BLACK,WIDTH//2,HEIGHT//3)
    draw_text_with_outline(surf,"Press ESC to Resume",font_med,WHITE,BLACK,WIDTH//2,HEIGHT//2)
def draw_powerup_timers(surf,timers):
    x,y,bw,bh,g=WIDTH-160,10,120,16,6
    for p in timers:
        pygame.draw.rect(surf,BLACK,(x,y,bw,bh))
        mf={'shield':SHIELD_DURATION_FRAMES,'supershield':SUPERSHIELD_DURATION_FRAMES,'opshield':OPSHIELD_DURATION_FRAMES}.get(p,POWERUP_DURATION_FRAMES)
        pr=timers[p]/mf
        clrs={'speed_boost':GREEN,'double_jump':BLUE,'shield':YELLOW,'supershield':SUPER_SHINY_PINK,'opshield':OPSHIELD_COLOR,'double_points':DARKER_DOUBLE_POINTS}
        pygame.draw.rect(surf,clrs.get(p,WHITE),(x+2,y+2,int((bw-4)*pr),bh-4))
        lbl=f"{p.replace('_',' ').title()}: {timers[p]//FPS}s"
        draw_text_with_outline(surf,lbl,font_small,WHITE,BLACK,x+bw//2,y+2+bh//2)
        y+=bh+g
def main():
    state=STATE_MENU;paused=False
    player=Player()
    floors=[Floor(HEIGHT-(i+1)*floor_height)for i in range(10)]
    powerups=[]
    kill_blocks=[KillBlock(random.randint(0,WIDTH-60),random.randint(-600,-60))for _ in range(3)]
    score=score_timer=0;ms=base_move_speed
    timers={k:0 for k in ['double_jump','speed_boost','shield','supershield','opshield','double_points']}
    cons_shields=0;high_score=0
    btn=pygame.Rect(WIDTH//2-100,HEIGHT//2-25,200,50)
    def reset_game():
        nonlocal player,floors,powerups,kill_blocks,score,score_timer,ms,timers,cons_shields
        player=Player()
        floors=[Floor(HEIGHT-(i+1)*floor_height)for i in range(10)]
        powerups=[]
        kill_blocks=[KillBlock(random.randint(0,WIDTH-60),random.randint(-600,-60))for _ in range(3)]
        score=score_timer=0;ms=base_move_speed
        timers={k:0 for k in timers};cons_shields=0
    while True:
        clock.tick(FPS)
        for e in pygame.event.get():
            if e.type==pygame.QUIT:pygame.quit();sys.exit()
            if state==STATE_MENU:
                if e.type==pygame.MOUSEBUTTONDOWN and e.button==1 and btn.collidepoint(pygame.mouse.get_pos()):reset_game();state=STATE_PLAYING;paused=False
                elif e.type==pygame.KEYDOWN and e.key==pygame.K_SPACE:reset_game();state=STATE_PLAYING;paused=False
            elif state==STATE_PLAYING:
                if e.type==pygame.KEYDOWN:
                    if not paused and e.key in (pygame.K_SPACE,pygame.K_w,pygame.K_UP):player.jump()
                    elif e.key==pygame.K_ESCAPE:paused=not paused
            elif state==STATE_GAMEOVER and e.type==pygame.KEYDOWN and e.key==pygame.K_r:state=STATE_MENU
        keys=pygame.key.get_pressed()
        if state==STATE_PLAYING and not paused:
            dx=(keys[pygame.K_d]or keys[pygame.K_RIGHT])*ms-(keys[pygame.K_a]or keys[pygame.K_LEFT])*ms
            if timers['speed_boost']>0:dx*=2
            player.move(dx);player.update(floors)
            if random.randint(1,200)==1:powerups.append(PowerUp(random.randint(0,WIDTH-player_size),-player_size,random.choices(["double_jump","speed_boost","shield","supershield","opshield","double_points"],weights=[20,20,20,1,0.05,5])[0]))
            for pu in powerups[:]:
                pu.update()
                if pu.rect.top>HEIGHT:
                    pu.rect.x=random.randint(0,WIDTH-player_size);pu.rect.y=-player_size;pu.fall_speed=random.randint(3,6)
                elif player.rect.colliderect(pu.rect):
                    pu.apply(player,timers)
                    score+=2 if player.double_points_active else 1
                    if pu.power_type=="shield":
                        cons_shields+=1
                        if cons_shields==6:player.opshield_active=True;player.opshield_hits_left=OPSHIELD_HITS;timers['opshield']=OPSHIELD_DURATION_FRAMES;cons_shields=0
                    elif pu.power_type=="opshield":cons_shields=0
                    else:cons_shields=0
                    powerups.remove(pu)
            for kb in kill_blocks:
                kb.update()
                if player.rect.colliderect(kb.rect):
                    if player.opshield_active:
                        player.opshield_hits_left-=1
                        if player.opshield_hits_left<=0:player.opshield_active=False;timers['opshield']=0
                        reset_kb=True
                    elif player.supershield_active:
                        player.supershield_hits_left-=1
                        if player.supershield_hits_left<=0:player.supershield_active=False;timers['supershield']=0
                        reset_kb=True
                    elif player.shield_active:
                        player.shield_active=False;timers['shield']=0
                        reset_kb=True
                    else:
                        if score>high_score:high_score=score
                        state=STATE_GAMEOVER
                        reset_kb=False
                    if reset_kb and state!=STATE_GAMEOVER:
                        kb.rect.x=random.randint(0,WIDTH-kb.size)
                        kb.rect.y=-kb.size
                        kb.fall_speed=random.randint(4,7)
            for k,t in timers.items():
                if t>0:
                    timers[k]-=1
                    if timers[k]==0:
                        if k=='double_jump':player.can_double_jump=player.double_jump_available=False
                        elif k=='speed_boost':player.speed_boost=False
                        elif k=='shield':player.shield_active=False
                        elif k=='supershield':player.supershield_active=False;player.supershield_hits_left=3
                        elif k=='opshield':player.opshield_active=False;player.opshield_hits_left=OPSHIELD_HITS
                        elif k=='double_points':player.double_points_active=False
            score_timer+=1
            if score_timer>=10:score+=(2 if player.double_points_active else 1);score_timer=0
        screen.fill(WHITE)
        if state==STATE_MENU:
            draw_text_with_outline(screen,"Cube Runnin'",font_large,BLACK,WHITE,WIDTH//2,HEIGHT//4)
            pygame.draw.rect(screen,GRAY,btn)
            draw_text_with_outline(screen,"PLAY GAME",font_med,BLACK,WHITE,WIDTH//2,HEIGHT//2-12)
            draw_text_with_outline(screen,"Move: A/D or Arrows, Jump: W/Up/Space",font_small,BLACK,WHITE,WIDTH//2,HEIGHT//2+50)
            draw_text_with_outline(screen,"Avoid falling red blocks! Collect powerups!",font_small,BLACK,WHITE,WIDTH//2,HEIGHT//2+80)
            draw_text_with_outline(screen,f"High Score: {high_score}",font_med,BLACK,WHITE,WIDTH//2,HEIGHT//2+140)
        elif state==STATE_PLAYING:
            [f.draw(screen)for f in floors];[kb.draw(screen)for kb in kill_blocks];[pu.draw(screen)for pu in powerups]
            player.draw(screen)
            draw_text_with_outline(screen,f"Score: {score}",font_med,BLACK,WHITE,60,20,center=False)
            draw_text_with_outline(screen,f"High Score: {high_score}",font_med,BLACK,WHITE,60,50,center=False)
            act={k:v for k,v in timers.items()if v>0}
            if act:draw_powerup_timers(screen,act)
            if paused:draw_paused_overlay(screen)
        elif state==STATE_GAMEOVER:
            draw_text_with_outline(screen,"GAME OVER",font_xlarge,RED,BLACK,WIDTH//2,HEIGHT//3)
            draw_text_with_outline(screen,f"Final Score: {score}",font_med,BLACK,WHITE,WIDTH//2,HEIGHT//2)
            draw_text_with_outline(screen,f"High Score: {high_score}",font_med,BLACK,WHITE,WIDTH//2,HEIGHT//2+40)
            draw_text_with_outline(screen,"Press R to Restart",font_med,BLACK,WHITE,WIDTH//2,HEIGHT//2+80)
        pygame.display.flip()
if __name__=="__main__":main()