Want more features on Pastebin? Sign Up, it's FREE!
Guest

Payday 2 LUA Script

By: a guest on Sep 3rd, 2013  |  syntax: Lua  |  size: 9.39 KB  |  views: 4,099  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. -- Player Instance
  2. local player = managers.player:player_unit()
  3.  
  4. -- Steam Achievements
  5. if managers.achievment then
  6.         for id,_ in pairs(managers.achievment.achievments) do
  7.                 managers.achievment:award(id)
  8.         end
  9. end
  10.  
  11. -- God Mode
  12. if player then
  13.    player:character_damage():set_invulnerable( true )
  14. end
  15.  
  16. -- Throwing Distance
  17. local car_arr = {
  18.         'being',
  19.         'mega_heavy',
  20.         'heavy',
  21.         'medium',
  22.         'light',
  23.         'coke_light'
  24. }
  25.  
  26. for i, name in ipairs(car_arr) do
  27.         tweak_data.carry.types[ name ].throw_distance_multiplier = 10.0
  28. end
  29.  
  30. -- Everything But Weapons
  31. for i=1, 7 do
  32.         managers.lootdrop:debug_drop( 1000, true, i )
  33. end
  34.  
  35. -- Weapon Mods
  36. NewRaycastWeaponBase._get_spread = function(self) return 0 end
  37. NewRaycastWeaponBase.recoil_multiplier = function(self) return 0 end
  38. NewRaycastWeaponBase.reload_speed_multiplier = function(self) return 5000 end
  39. NewRaycastWeaponBase.fire_rate_multiplier = function(self) return 5000 end
  40. PlayerStandard._get_swap_speed_multiplier = function(self) return 5000 end
  41. NewRaycastWeaponBase.damage_multiplier = function(self) return 5000 end
  42.  
  43. BaseInteractionExt._has_required_upgrade = function(self) return true end
  44. BaseInteractionExt._has_required_deployable = function(self) return true end
  45. BaseInteractionExt._get_timer = function(self) return 0 end
  46. BaseInteractionExt.can_interact = function(self, player) return true end
  47.  
  48. -- Infinite Ammo Clip
  49. if not _fireWep then
  50.    _fireWep = NewRaycastWeaponBase.fire
  51. end
  52. function NewRaycastWeaponBase:fire( from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )
  53.    _fireWep( self, from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )
  54.    
  55.    if managers.player:player_unit() == self._setup.user_unit then
  56.       self.set_ammo(self, 1.0)
  57.    end
  58. end
  59.  
  60. -- Infinite Ammo and No Reload
  61. RaycastWeaponBase.ammo_info = function(self)
  62. self._ammo_max_per_clip = 99999
  63. self._ammo_remaining_in_clip = 99999
  64. self._ammo_total = 99999
  65. self._ammo_max = 99999
  66. return self._ammo_max_per_clip, self._ammo_remaining_in_clip, self._ammo_total, self._ammo_max
  67. end
  68. BlackMarketGui.get_weapon_ammo_info = function(self, weapon_id, comparision_data)
  69. return 100, 100
  70. end
  71.  
  72. -- Money and Level
  73. managers.experience:_set_current_level (9999)
  74. managers.skilltree:_set_points(9999)
  75. managers.money:_add_to_total(9999)
  76. managers.money:_set_offshore(9999)
  77.  
  78. -- Infinite Saw
  79. if not _fireSaw then
  80.    _fireSaw = SawWeaponBase.fire
  81. end
  82. function SawWeaponBase:fire( from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )
  83.    _fireSaw( self, from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )
  84.  
  85.    if managers.player:player_unit() == self._setup.user_unit then
  86.       self.set_ammo(self, 1.0)
  87.    end
  88. end
  89.  
  90. -- Infinite Cable Ties
  91. if not _rmSpecial then
  92.    _rmSpecial = PlayerManager.remove_special
  93. end
  94. function PlayerManager:remove_special( name ) end
  95.  
  96. -- Infinite Equipment
  97. if not _rmEquipment then
  98.    _rmEquipment = PlayerManager.remove_equipment
  99. end
  100. function PlayerManager:remove_equipment( equipment_id ) end
  101.  
  102. -- Infinite Equipment (Not Host)
  103. function PlayerManager:remove_equipment_possession( peer_id, equipment ) end
  104.  
  105. -- Debug Menu
  106. if managers.menu then
  107. managers.menu:set_debug_menu_enabled(true)
  108. end
  109.  
  110. -- All Weapons Unlocked
  111. local wep_arr = {
  112.    'new_m4', 'glock_17', 'mp9', 'r870', 'glock_18c', 'amcar', 'm16', 'olympic', 'ak74', 'akm', 'akmsu', 'saiga', 'ak5', 'aug', 'g36', 'p90', 'new_m14', 'deagle', 'new_mp5', 'colt_1911', 'mac10', 'serbu', 'huntsman', 'b92fs', 'new_raging_bull',  'saw'
  113. }
  114. for i, name in ipairs(wep_arr) do
  115.    if not managers.upgrades:aquired(name) then
  116.       managers.upgrades:aquire(name)
  117.    end
  118. end
  119.  
  120. -- Guards and Camera
  121. function GroupAIStateBase:_clbk_switch_enemies_to_not_cool() end
  122. function PlayerMovement:on_suspicion( observer_unit, status ) end
  123. function GroupAIStateBase:on_criminal_suspicion_progress( u_suspect, u_observer, status ) end
  124. function GroupAIStateBase:criminal_spotted( unit ) end
  125. function GroupAIStateBase:report_aggression( unit ) end
  126. function PlayerMovement:on_uncovered( enemy_unit ) end
  127. function SecurityCamera:_upd_suspicion( t ) end
  128. function SecurityCamera:_sound_the_alarm( detected_unit ) end
  129. function SecurityCamera:_set_suspicion_sound( suspicion_level ) end
  130. function SecurityCamera:clbk_call_the_police() end
  131. function CopMovement:anim_clbk_police_called( unit ) end
  132. function CopLogicArrest._upd_enemy_detection( data ) end
  133. function CopLogicArrest._call_the_police( data, my_data, paniced ) end
  134. function CopLogicIdle.on_alert( data, alert_data ) end
  135. function CopLogicBase._get_logic_state_from_reaction( data, reaction )
  136.    return "idle"
  137. end
  138. function GroupAIStateBase:sync_event( event_id, blame_id ) end
  139. function GroupAIStateBase:on_police_called( called_reason ) end
  140. function GroupAIStateBase:on_police_weapons_hot( called_reason ) end
  141. function GroupAIStateBase:on_gangster_weapons_hot( called_reason ) end
  142. function GroupAIStateBase:on_enemy_weapons_hot( is_delayed_callback ) end
  143. function GroupAIStateBase:_clbk_switch_enemies_to_not_cool() end
  144.  
  145. -- Player Mods
  146. PlayerStandard._get_walk_headbob = function(self) return 0 end
  147. PlayerStandard._can_stand = function(self) return true end
  148. PlayerManager.remove_equipment = function(self, equipment_id) end
  149. PlayerInventory.remove_selection = function(self, selection_index, instant) end
  150. PlayerManager.selected_equipment_deploy_timer = function(self) return 0 end
  151. PlayerManager.chk_minion_limit_reached = function(self) return false end
  152. PlayerManager.spread_multiplier = function(self) return 0 end
  153. PlayerMovement.is_stamina_drained = function(self) return false end
  154. PlayerStandard._can_run_directional = function(self) return true end
  155.  
  156. -- Super Jump
  157. PlayerStandard._perform_jump = function(self, jump_vec)
  158. local v = math.UP * 470
  159. if self._running then
  160. v = math.UP * 2000
  161. end
  162. self._unit:mover():set_velocity( v )
  163. end
  164.  
  165. -- Player Armor
  166. PlayerDamage.get_real_armor = function(self)
  167. return Application:digest_value( 100, false )
  168. end
  169.  
  170. -- Unlock All Masks
  171. managers.blackmarket:_setup_masks()
  172. for mask_id,_ in pairs(tweak_data.blackmarket.masks) do
  173. Global.blackmarket_manager.masks[mask_id].unlocked = true
  174. managers.blackmarket:add_to_inventory("normal", "masks", mask_id, false)
  175. end
  176.  
  177. -- Ammo and Health
  178. local player = managers.player:player_unit()
  179. if alive(player) then
  180. player:base():replenish()
  181. end
  182.  
  183. -- Weapon Accessories, Color Palettes, and Mask Vinyls
  184. for i=1, 7 do
  185. managers.lootdrop:debug_drop( 1000, true, i )
  186. end
  187. game_state_machine:change_state_by_name( "victoryscreen", { num_winners = 2, personal_win = alive( managers.player:player_unit() ) } )
  188.  
  189. -- End Mission
  190. game_state_machine:change_state_by_name( "victoryscreen", { num_winners = 2, personal_win = alive( managers.player:player_unit() ) } )
  191.  
  192. -- Teleport Player
  193. function GameState:freeflight_drop_player( pos, rot )
  194.         if( managers.player ) then
  195.                 managers.player:warp_to( pos, rot )
  196.         end
  197. end
  198.  
  199. -- Message On Screen
  200. if managers.hud then
  201.    managers.hud:show_hint( { text = "LUA Hack Loaded!" } )
  202. end
  203.  
  204. -- Unload Some Scripts
  205. managers.player:player_unit():character_damage():set_invulnerable( false )
  206.  
  207. if _wSpread then
  208.    NewRaycastWeaponBase._get_spread = _wSpread
  209.    _wSpread = nil
  210. end
  211.  
  212. if _wRecoil then
  213.    NewRaycastWeaponBase.recoil_multiplier = _wRecoil
  214.    _wRecoil = nil
  215. end
  216.  
  217. if _wReload then
  218.    NewRaycastWeaponBase.reload_speed_multiplier = _wReload
  219.    _wReload = nil
  220. end
  221.  
  222. if _wFireRate then
  223.    NewRaycastWeaponBase.fire_rate_multiplier = _wFireRate
  224.    _wFireRate = nil
  225. end
  226.  
  227. if _wSwap then
  228.    PlayerStandard._get_swap_speed_multiplier = _wSwap
  229.    _wSwap = nil
  230. end
  231.  
  232. if _fireWep then
  233.    NewRaycastWeaponBase.fire = _fireWep
  234.    _fireWep = nil
  235. end
  236.  
  237. if _fireSaw then
  238.    SawWeaponBase.fire = _fireSaw
  239.    _fireSaw = nil
  240. end
  241.  
  242. if _rmSpecial then
  243.    PlayerManager.remove_special = _rmSpecial
  244.    _rmSpecial = nil
  245. end
  246.  
  247. if _rmEquipment then
  248.    PlayerManager.remove_equipment = _rmEquipment
  249.    _rmEquipment = nil
  250. end
  251.  
  252. if _rmEquipmentP then
  253.    PlayerManager.remove_equipment_possession = _rmEquipmentP
  254.    _rmEquipmentP = nil
  255. end
  256.  
  257. -- Message On Screen
  258. if managers.hud then
  259.    managers.hud:show_hint( { text = "LUA Hack Unloaded!" } )
  260. end
  261.  
  262. -- Spawning Jobs
  263. managers.crimenet._debug_mass_spawning = true
  264. managers.crimenet._active_jobs = {}
  265. managers.crimenet._presets = {}
  266.  
  267. local t = {}
  268. local difficulty_id = (5)
  269. local difficulty = tweak_data:index_to_difficulty( difficulty_id )
  270. table.insert(t, { job_id = "ukrainian_job_prof", difficulty_id = difficulty_id, difficulty = difficulty } )
  271.  
  272. local j = 0
  273. while(j < tweak_data.gui.crime_net.debug_options.mass_spawn_limit) do
  274.         local job_data = t[1]
  275.         table.insert( managers.crimenet._presets, job_data )
  276.         j = j+1
  277. end
  278.  
  279. -- Jobs ID's (Change Job ID to the Job you want)
  280. "welcome_to_the_jungle", (Big Oil)
  281. "welcome_to_the_jungle_prof",
  282. "framing_frame",
  283. "framing_frame_prof",
  284. "watchdogs",
  285. "watchdogs_prof",
  286. "alex", (Rats)
  287. "alex_prof",
  288. "firestarter",
  289. "firestarter_prof",
  290. "ukrainian_job",
  291. "ukrainian_job_prof",
  292. "jewelry_store",
  293. "jewelry_store_prof",
  294. "four_stores",
  295. "four_stores_prof",
  296. "nightclub",
  297. "nightclub_prof",
  298. "mallcrasher",
  299. "mallcrasher_prof",
  300. "branchbank_deposit",
  301. "branchbank_deposit_prof",
  302. "branchbank_cash",
  303. "branchbank_cash_prof",
  304. "branchbank_gold",
  305. "branchbank_gold_prof",
  306. "branchbank",
  307. "branchbank_prof"
clone this paste RAW Paste Data