function line(a, c, xh, vertical) if a < c and vertical == false then for i = 0,c,1 do bullet = CreateProjectile( "collision", i, xh, -1) end end if c < a and vertical == false then for i = 0,a,1 do bullet = CreateProjectile( "collision", i, xh, -1) end end if vertical == true and a < c then for i = a,c,1 do bullet = CreateProjectile( "collision", xh, i, -1) end end if vertical == true and c < a then for i = c,a,1 do bullet = CreateProjectile( "collision", xh, i, -1) end end bullet.ppcollision = true end function box(a,b,c,d) line(a,c,b,false) line(a,c,d,false) line(b,d,a,true) line(b,d,c,true) end function OnHit(bullet) if Input.Up > 0 then Player.Move( 0, -2, false) end if Input.Down > 0 then Player.Move( 0, 2, false) end if Input.Left > 0 then Player.Move( 2, 0, false) end if Input.Right > 0 then Player.Move( -2, 0, false) end end