Advertisement
julioCCs

SimplestGodMode.vb

Dec 9th, 2012
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.85 KB | None | 0 0
  1. Imports System ' basic imports
  2. Imports GTA ' basic imports
  3. Imports System.Windows.Forms ' needed to have access to "keys" enumeration, for example
  4.  
  5. Public Class SimplestGodMode
  6.     Inherits Script
  7.    
  8.     private bGod as boolean = false
  9.     private bSemiGod as boolean = false
  10.     private iTimeScript as int16 = 0
  11.        
  12.     Public Sub New()
  13.         Me.interval = 10       
  14.     End Sub
  15.        
  16.     private sub msg(sMsg as string, time as int32)
  17.         Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", sMsg, time, 1)
  18.     end sub
  19.    
  20.     Private Sub keyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
  21.         if e.key = keys.f7 then
  22.             bGod = not bGod
  23.            
  24.             turnGod
  25.            
  26.             if bGod then
  27.                 msg("God mode On", 2000)
  28.                 bSemiGod = false
  29.             else
  30.                 msg("God mode Off", 2000)
  31.             end if
  32.         end if
  33.         if e.key = keys.f8 then
  34.             bSemiGod = not bSemiGod
  35.            
  36.             turnGod
  37.            
  38.             if bSemiGod then
  39.                 msg("Semi God mode On", 2000)
  40.                 bGod = false
  41.             else
  42.                 msg("Semi God mode Off", 2000)
  43.             end if
  44.         end if
  45.     End Sub
  46.        
  47.     Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
  48.         iTimeScript += me.interval
  49.        
  50.         if iTimeScript >= 1000 then
  51.             turnGod
  52.             iTimeScript = 0
  53.         end if
  54.        
  55.         Heal
  56.     end sub    
  57.  
  58.     private sub turnGod
  59.         if bGod then
  60.             player.character.makeproofto(true, true, true, true, true)         
  61.             player.character.WillFlyThroughWindscreen = false
  62.             player.character.CanBeKnockedOffBike = false
  63.             player.character.CanBeDraggedOutOfVehicle = false
  64.         else
  65.             player.character.makeproofto(false, false, false, false, false)
  66.             player.character.WillFlyThroughWindscreen = true
  67.             player.character.CanBeKnockedOffBike = true
  68.             player.character.CanBeDraggedOutOfVehicle = true
  69.         end if
  70.     end sub
  71.    
  72.     private sub Heal
  73.         if bSemiGod then player.character.health += 1
  74.     end sub
  75. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement