Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VERSION 5.00
- Begin VB.Form Form1
- BackColor = &H00000000&
- BorderStyle = 1 'Fixed Single
- Caption = "Master Blaster [Version 1.0]"
- ClientHeight = 3090
- ClientLeft = 45
- ClientTop = 735
- ClientWidth = 4335
- Icon = "Form1.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 3090
- ScaleWidth = 4335
- StartUpPosition = 2 'CenterScreen
- Begin VB.Timer Timer3
- Interval = 10
- Left = 2160
- Top = 1920
- End
- Begin VB.CommandButton Command2
- Caption = "Fire"
- Height = 375
- Left = 120
- TabIndex = 5
- Top = 2280
- Visible = 0 'False
- Width = 1215
- End
- Begin VB.Timer Timer2
- Enabled = 0 'False
- Interval = 100
- Left = 2640
- Top = 1920
- End
- Begin VB.CommandButton Command1
- Caption = "Fire"
- Height = 375
- Left = 3000
- TabIndex = 4
- Top = 2280
- Visible = 0 'False
- Width = 1215
- End
- Begin VB.PictureBox Picture3
- Appearance = 0 'Flat
- BackColor = &H00000000&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 615
- Left = 3600
- Picture = "Form1.frx":014A
- ScaleHeight = 615
- ScaleWidth = 495
- TabIndex = 2
- Top = 960
- Width = 495
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- BackColor = &H00000000&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 615
- Left = 240
- Picture = "Form1.frx":0F90
- ScaleHeight = 615
- ScaleWidth = 495
- TabIndex = 0
- Top = 960
- Width = 495
- End
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Interval = 100
- Left = 1680
- Top = 1920
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- BackColor = &H00000000&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 135
- Left = 3720
- Picture = "Form1.frx":1C32
- ScaleHeight = 135
- ScaleWidth = 255
- TabIndex = 1
- Top = 1200
- Width = 255
- End
- Begin VB.PictureBox Picture4
- Appearance = 0 'Flat
- BackColor = &H80000005&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 135
- Left = 360
- Picture = "Form1.frx":1F08
- ScaleHeight = 135
- ScaleWidth = 255
- TabIndex = 3
- Top = 1200
- Width = 255
- End
- Begin VB.Menu File
- Caption = "File"
- Begin VB.Menu Restart
- Caption = "Restart"
- End
- Begin VB.Menu About
- Caption = "Controls"
- End
- Begin VB.Menu Website
- Caption = "-"
- End
- Begin VB.Menu Minimize
- Caption = "Web Site"
- End
- Begin VB.Menu fidgasg
- Caption = "Contact Me"
- End
- Begin VB.Menu stat
- Caption = "-"
- End
- Begin VB.Menu Inf3
- Caption = "Minimize"
- End
- Begin VB.Menu BoutThat
- Caption = "About"
- End
- Begin VB.Menu Exit
- Caption = "Exit"
- End
- End
- Begin VB.Menu bsdg
- Caption = "About"
- End
- Begin VB.Menu Ex
- Caption = "Exit"
- End
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
- Public GunCocked As Boolean
- Public GunCocked1 As Boolean
- Private Sub About_Click()
- MsgBox "Controls Player 1: Move Up: W, Move Down: S, Shoot: Space.", vbInformation, "Master Blaster [Version 1.0]"
- MsgBox "Controls Player 2: Move Up: U, Move Down: J, Shoot: Enter.", vbInformation, "Master Blaster [Version 1.0]"
- End Sub
- Private Sub BoutThat_Click()
- MsgBox "This is a two player shooter game. I made it because I love 2D games.", vbInformation, "Master Blaster [Version 1.0]"
- End Sub
- Private Sub bsdg_Click()
- MsgBox "This is a two player shooter game. I made it because I love 2D games.", vbInformation, "Master Blaster [Version 1.0]"
- End Sub
- Private Sub Command1_Click()
- GunCocked = False
- Timer1.Enabled = True
- Exit Sub
- End Sub
- Private Sub Command2_Click()
- GunCocked1 = False
- Timer2.Enabled = True
- End Sub
- Private Sub Ex_Click()
- End
- End Sub
- Private Sub Exit_Click()
- End
- End Sub
- Private Sub fidgasg_Click()
- On Error Resume Next
- Dim OpenSite As Long
- OpenSite = ShellExecute(0, "open", "mailto:[email protected]", 0, 0, 1)
- End Sub
- Private Sub Form_KeyPress(KeyAscii As Integer)
- If KeyAscii = 13 Then
- GunCocked = False
- Timer1.Enabled = True
- End If
- If KeyAscii = 117 And GunCocked = True Then
- Picture3.Top = Picture3.Top - 100
- Picture2.Top = Picture2.Top - 100
- End If
- If KeyAscii = 106 And GunCocked = True Then
- Picture3.Top = Picture3.Top + 100
- Picture2.Top = Picture2.Top + 100
- End If
- If KeyAscii = 85 And GunCocked = True Then
- Picture3.Top = Picture3.Top - 100
- Picture2.Top = Picture2.Top - 100
- End If
- If KeyAscii = 74 And GunCocked = True Then
- Picture3.Top = Picture3.Top + 100
- Picture2.Top = Picture2.Top + 100
- End If
- If KeyAscii = 32 Then
- GunCocked1 = False
- Timer2.Enabled = True
- End If
- If KeyAscii = 115 And GunCocked1 = True Then
- Picture1.Top = Picture1.Top + 100
- Picture4.Top = Picture4.Top + 100
- End If
- If KeyAscii = 119 And GunCocked1 = True Then
- Picture1.Top = Picture1.Top - 100
- Picture4.Top = Picture4.Top - 100
- End If
- If KeyAscii = 83 And GunCocked1 = True Then
- Picture1.Top = Picture1.Top + 100
- Picture4.Top = Picture4.Top + 100
- End If
- If KeyAscii = 87 And GunCocked1 = True Then
- Picture1.Top = Picture1.Top - 100
- Picture4.Top = Picture4.Top - 100
- End If
- End Sub
- Private Sub Form_Load()
- GunCocked = True
- GunCocked1 = True
- End Sub
- Private Sub gbds_Click()
- End Sub
- Private Sub Inf3_Click()
- Form1.WindowState = 1
- End Sub
- Private Sub Minimize_Click()
- On Error Resume Next
- Dim OpenSite As Long
- OpenSite = ShellExecute(0, "open", "http://CompulsiveCoding.com", 0, 0, 1)
- End Sub
- Private Sub Restart_Click()
- On Error Resume Next
- Dim Str As String
- Str = MsgBox("Are you sure you want to restart now?", vbYesNo + vbQuestion, "Master Blaster [Version 1.0]")
- If Str = vbYes Then
- Shell App.Path & "\Master Blaster.exe", vbNormalFocus
- Else
- Exit Sub
- End If
- End
- End Sub
- Private Sub Timer1_Timer()
- If Picture2.Left <= 0 Then
- Picture2.Left = Picture3.Left + 120
- Picture2.Top = Picture3.Top + 240
- GunCocked = True
- Timer1.Enabled = False
- End If
- If Picture4.Left >= 4420 Then
- Picture4.Left = Picture1.Left + 120
- Picture4.Top = Picture1.Top + 240
- GunCocked1 = True
- Timer2.Enabled = False
- End If
- Picture2.Left = Picture2.Left - 100
- If Collided(Picture2, Picture1) Then
- Picture2.Left = 3720
- Picture2.Top = Picture3.Top + 240
- GunCocked = True
- Picture4.Left = 360
- Picture4.Top = Picture1.Top + 240
- GunCocked1 = True
- Timer1.Enabled = False
- Timer2.Enabled = False
- MsgBox "Game Over!!", vbCritical, "Master Blaster [Ver 1.0]"
- MsgBox "Player 2 Wins!!", vbExclamation, "Master Blaster [Ver 1.0]"
- End
- Exit Sub
- Else
- Exit Sub
- End If
- End Sub
- Private Sub Timer2_Timer()
- If Picture4.Left >= 4420 Then
- Picture4.Left = Picture1.Left + 120
- Picture4.Top = Picture1.Top + 240
- GunCocked1 = True
- Timer2.Enabled = False
- End If
- If Picture2.Left <= 0 Then
- Picture2.Left = Picture3.Left + 120
- Picture2.Top = Picture3.Top + 240
- GunCocked = True
- Timer1.Enabled = False
- End If
- Picture4.Left = Picture4.Left + 100
- If Collided(Picture4, Picture3) Then
- Picture2.Left = 3720
- Picture2.Top = Picture3.Top + 240
- GunCocked = True
- Picture4.Left = 360
- Picture4.Top = Picture1.Top + 240
- GunCocked1 = True
- Timer2.Enabled = False
- Timer1.Enabled = False
- MsgBox "Game Over!!", vbCritical, "Master Blaster [Ver 1.0]"
- MsgBox "Player 1 Wins!!", vbExclamation, "Master Blaster [Ver 1.0]"
- End
- Exit Sub
- Else
- Exit Sub
- End If
- End Sub
- Private Sub Timer3_Timer()
- If Picture1.Top >= 3096 Then
- Picture1.Top = 960
- Picture1.Left = 240
- Picture4.Top = 1200
- Picture4.Left = 360
- End If
- If Picture3.Top >= 3096 Then
- Picture3.Top = 960
- Picture3.Left = 3600
- Picture2.Top = 1200
- Picture2.Left = 3720
- End If
- If Picture1.Top <= 0 Then
- Picture1.Top = 960
- Picture1.Left = 240
- Picture4.Top = 1200
- Picture4.Left = 360
- End If
- If Picture3.Top <= 0 Then
- Picture3.Top = 960
- Picture3.Left = 3600
- Picture2.Top = 1200
- Picture2.Left = 3720
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment