Payday 2 Lua Scripts

Posts 1–15 of 147 · Page 1 of 10
Payday 2 Lua Scripts
[HTML]-- Player Instance
local player = managers.playerlayer_unit()

-- Steam Achievements
if managers.achievment then
for id,_ in pairs(managers.achievment.achievments) do
managers.achievment:award(id)
end
end

-- God Mode
if player then
player:character_damage():set_invulnerable( true )
end

-- Throwing Distance
local car_arr = {
'being',
'mega_heavy',
'heavy',
'medium',
'light',
'coke_light'
}

for i, name in ipairs(car_arr) do
tweak_data.carry.types[ name ].throw_distance_multiplier = 10.0
end

-- Everything But Weapons
for i=1, 7 do
managers.lootdrop:debug_drop( 1000, true, i )
end

-- Weapon Mods
NewRaycastWeaponBase._get_spread = function(self) return 0 end
NewRaycastWeaponBase.recoil_multiplier = function(self) return 0 end
NewRaycastWeaponBase.reload_speed_multiplier = function(self) return 5000 end
NewRaycastWeaponBase.fire_rate_multiplier = function(self) return 5000 end
PlayerStandard._get_swap_speed_multiplier = function(self) return 5000 end
NewRaycastWeaponBase.damage_multiplier = function(self) return 5000 end

BaseInteractionExt._has_required_upgrade = function(self) return true end
BaseInteractionExt._has_required_deployable = function(self) return true end
BaseInteractionExt._get_timer = function(self) return 0 end
BaseInteractionExt.can_interact = function(self, player) return true end

-- Infinite Ammo Clip
if not _fireWep then
_fireWep = NewRaycastWeaponBase.fire
end
function NewRaycastWeaponBase:fire( from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )
_fireWep( self, from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )

if managers.playerlayer_unit() == self._setup.user_unit then
self.set_ammo(self, 1.0)
end
end

-- Infinite Ammo and No Reload
RaycastWeaponBase.ammo_info = function(self)
self._ammo_max_per_clip = 99999
self._ammo_remaining_in_clip = 99999
self._ammo_total = 99999
self._ammo_max = 99999
return self._ammo_max_per_clip, self._ammo_remaining_in_clip, self._ammo_total, self._ammo_max
end
BlackMarketGui.get_weapon_ammo_info = function(self, weapon_id, comparision_data)
return 100, 100
end

-- Money and Level
managers.experience:_set_current_level (9999)
managers.skilltree:_set_points(9999)
managers.money:_add_to_total(9999)
managers.money:_set_offshore(9999)

-- Infinite Saw
if not _fireSaw then
_fireSaw = SawWeaponBase.fire
end
function SawWeaponBase:fire( from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )
_fireSaw( self, from_pos, direction, dmg_mul, shoot_player, spread_mul, autohit_mul, suppr_mul, target_unit )

if managers.playerlayer_unit() == self._setup.user_unit then
self.set_ammo(self, 1.0)
end
end

-- Infinite Cable Ties
if not _rmSpecial then
_rmSpecial = PlayerManager.remove_special
end
function PlayerManager:remove_special( name ) end

-- Infinite Equipment
if not _rmEquipment then
_rmEquipment = PlayerManager.remove_equipment
end
function PlayerManager:remove_equipment( equipment_id ) end

-- Infinite Equipment (Not Host)
function PlayerManager:remove_equipment_possession( peer_id, equipment ) end

-- Debug Menu
if managers.menu then
managers.menu:set_debug_menu_enabled(true)
end

-- All Weapons Unlocked
local wep_arr = {
'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'
}
for i, name in ipairs(wep_arr) do
if not managers.upgrades:aquired(name) then
managers.upgrades:aquire(name)
end
end

-- Guards and Camera
function GroupAIStateBase:_clbk_switch_enemies_to_not_cool( ) end
function PlayerMovementn_suspicion( observer_unit, status ) end
function GroupAIStateBasen_criminal_suspicion_progress( u_suspect, u_observer, status ) end
function GroupAIStateBase:criminal_spotted( unit ) end
function GroupAIStateBase:report_aggression( unit ) end
function PlayerMovementn_uncovered( enemy_unit ) end
function SecurityCamera:_upd_suspicion( t ) end
function SecurityCamera:_sound_the_alarm( detected_unit ) end
function SecurityCamera:_set_suspicion_sound( suspicion_level ) end
function SecurityCamera:clbk_call_the_police() end
function CopMovement:anim_clbk_police_called( unit ) end
function CopLogicArrest._upd_enemy_detection( data ) end
function CopLogicArrest._call_the_police( data, my_data, paniced ) end
function CopLogicIdle.on_alert( data, alert_data ) end
function CopLogicBase._get_logic_state_from_reaction( data, reaction )
return "idle"
end
function GroupAIStateBase:sync_event( event_id, blame_id ) end
function GroupAIStateBasen_police_called( called_reason ) end
function GroupAIStateBasen_police_weapons_hot( called_reason ) end
function GroupAIStateBasen_gangster_weapons_hot( called_reason ) end
function GroupAIStateBasen_enemy_weapons_hot( is_delayed_callback ) end
function GroupAIStateBase:_clbk_switch_enemies_to_not_cool( ) end

-- Player Mods
PlayerStandard._get_walk_headbob = function(self) return 0 end
PlayerStandard._can_stand = function(self) return true end
PlayerManager.remove_equipment = function(self, equipment_id) end
PlayerInventory.remove_selection = function(self, selection_index, instant) end
PlayerManager.selected_equipment_deploy_timer = function(self) return 0 end
PlayerManager.chk_minion_limit_reached = function(self) return false end
PlayerManager.spread_multiplier = function(self) return 0 end
PlayerMovement.is_stamina_drained = function(self) return false end
PlayerStandard._can_run_directional = function(self) return true end

-- Super Jump
PlayerStandard._perform_jump = function(self, jump_vec)
local v = math.UP * 470
if self._running then
v = math.UP * 2000
end
self._unit:mover():set_velocity( v )
end

-- Player Armor
PlayerDamage.get_real_armor = function(self)
return Application:digest_value( 100, false )
end

-- Unlock All Masks
managers.blackmarket:_setup_masks()
for mask_id,_ in pairs(tweak_data.blackmarket.masks) do
Global.blackmarket_manager.masks[mask_id].unlocked = true
managers.blackmarket:add_to_inventory("normal", "masks", mask_id, false)
end

-- Ammo and Health
local player = managers.playerlayer_unit()
if alive(player) then
player:base():replenish()
end

-- Weapon Accessories, Color Palettes, and Mask Vinyls
for i=1, 7 do
managers.lootdrop:debug_drop( 1000, true, i )
end
game_state_machine:change_state_by_name( "victoryscreen", { num_winners = 2, personal_win = alive( managers.playerlayer_unit() ) } )

-- End Mission
game_state_machine:change_state_by_name( "victoryscreen", { num_winners = 2, personal_win = alive( managers.playerlayer_unit() ) } )

-- Teleport Player
function GameState:freeflight_drop_player( pos, rot )
if( managers.player ) then
managers.player:warp_to( pos, rot )
end
end

-- Message On Screen
if managers.hud then
managers.hud:show_hint( { text = "LUA Hack Loaded!" } )
end[/HTML]

[HTML]-- Unload Some Scripts
managers.playerlayer_unit():character_damage():set_invulnerable( false )

if _wSpread then
NewRaycastWeaponBase._get_spread = _wSpread
_wSpread = nil
end

if _wRecoil then
NewRaycastWeaponBase.recoil_multiplier = _wRecoil
_wRecoil = nil
end

if _wReload then
NewRaycastWeaponBase.reload_speed_multiplier = _wReload
_wReload = nil
end

if _wFireRate then
NewRaycastWeaponBase.fire_rate_multiplier = _wFireRate
_wFireRate = nil
end

if _wSwap then
PlayerStandard._get_swap_speed_multiplier = _wSwap
_wSwap = nil
end

if _fireWep then
NewRaycastWeaponBase.fire = _fireWep
_fireWep = nil
end

if _fireSaw then
SawWeaponBase.fire = _fireSaw
_fireSaw = nil
end

if _rmSpecial then
PlayerManager.remove_special = _rmSpecial
_rmSpecial = nil
end

if _rmEquipment then
PlayerManager.remove_equipment = _rmEquipment
_rmEquipment = nil
end

if _rmEquipmentP then
PlayerManager.remove_equipment_possession = _rmEquipmentP
_rmEquipmentP = nil
end

-- Message On Screen
if managers.hud then
managers.hud:show_hint( { text = "LUA Hack Unloaded!" } )
end[/HTML]


[HTML]-- Spawning Jobs
managers.crimenet._debug_mass_spawning = true
managers.crimenet._active_jobs = {}
managers.crimenet._presets = {}

local t = {}
local difficulty_id = (5)
local difficulty = tweak_data:index_to_difficulty( difficulty_id )
table.insert(t, { job_id = "ukrainian_job_prof", difficulty_id = difficulty_id, difficulty = difficulty } )

local j = 0
while(j < tweak_data.gui.crime_net.debug_options.mass_spawn_ limit) do
local job_data = t[1]
table.insert( managers.crimenet._presets, job_data )
j = j+1
end

-- Jobs ID's (Change Job ID to the Job you want)
"welcome_to_the_jungle", (Big Oil)
"welcome_to_the_jungle_prof",
"framing_frame",
"framing_frame_prof",
"watchdogs",
"watchdogs_prof",
"alex", (Rats)
"alex_prof",
"firestarter",
"firestarter_prof",
"ukrainian_job",
"ukrainian_job_prof",
"jewelry_store",
"jewelry_store_prof",
"four_stores",
"four_stores_prof",
"nightclub",
"nightclub_prof",
"mallcrasher",
"mallcrasher_prof",
"branchbank_deposit",
"branchbank_deposit_prof",
"branchbank_cash",
"branchbank_cash_prof",
"branchbank_gold",
"branchbank_gold_prof",
"branchbank",
"branchbank_prof"[/HTML]

I do not take any credit for these.

I've put them all in a notepad so you can download it without going back to the thread.

-- Note
Some scripts only work as host.
There will be some scripts that aren't on the notepad as it updates.

-- Virus Scan
Lua Scripts.rar - Jotti's malware scan
https://www.virustotal.com/en/file/d...is/1376811774/
Lua Scripts_mpgh.net.rar3 KB · 14,186 downloads Clean
can you tell me or link me that gives me a tutorial on how to use this. Thanks

Edit, did some further searching and found what i needed
Nice work dude
I'll add all the scripts into script.lua and update it when more come out or if some get patched.
Quote Originally Posted by MixNova View Post
I'm trying to find out instant drill
You can simply use the lin trainer posted here,it works witout any issues
Edit:I can't get the job spawner to work.something may be missing can someone tell me how to set it up?
Is there anyway to directly SET your current $ Value? Or increase the offshore?
They set amount has been patched, but you can add cash and it also adds to your offshore.
managers.money:_add_to_total(9999) or managers.money:_set_offshore(9999)
Quote Originally Posted by LeRaz0r View Post
Is there anyway to directly SET your current $ Value? Or increase the offshore?
Awesome job compiling all these! Do you have a recent LUA dump of the game?
I made a function you can use to add as many of all specific items you want (Because "-- Everything But Weapons" spams loot cards which gets you alot of maybe unwanted money or attachments). Enjoy!

[HTML]
-------------------------------------------------------------------------
-- GiVE iTEMS ("masks", "materials", "textures", "colors", "weapon_mods")
-- example: giveitems( 50, "masks")
-------------------------------------------------------------------------
function giveitems( times, type )
for i=1, times do
for mat_id,_ in pairs(tweak_data.blackmarket[type]) do
if _.infamous then
managers.blackmarket:add_to_inventory("infamous", type, mat_id, false)
elseif _.dlc then
managers.blackmarket:add_to_inventory("preorder", type, mat_id, false)
else
managers.blackmarket:add_to_inventory("normal", type, mat_id, false)
end
end
managers.blackmarket:remove_item("normal", "materials", "plastic", false)
managers.blackmarket:remove_item("normal", "colors", "nothing", false)
end
end

giveitems( 2, "weapon_mods" )
giveitems( 5, "masks" )
giveitems( 5, "materials" )
giveitems( 5, "textures" )
giveitems( 5, "colors" )
[/HTML]
Quote Originally Posted by ogR1sH View Post
I made a function you can use to add as many of all specific items you want (Because "-- Everything But Weapons" spams loot cards which gets you alot of maybe unwanted money or attachments). Enjoy!
Is there away to get rid of weapon mods?
(like lets say i accidentally gave myself to many mods is there any way to make it 0?)
Thank you!
Quote Originally Posted by SeekerWolf View Post
Is there away to get rid of weapon mods?
(like lets say i accidentally gave myself to many mods is there any way to make it 0?)
Thank you!
[HTML]
for mat_id,_ in pairs(tweak_data.blackmarket.weapon_mods) do
managers.blackmarket:remove_item("normal", "weapon_mods", mat_id, false)
managers.blackmarket:remove_item("preorder", "weapon_mods", mat_id, false)
end
[/HTML]

Not tested, but should remove one instance of every mod when executed.
Quote Originally Posted by ogR1sH View Post
[HTML]
for mat_id,_ in pairs(tweak_data.blackmarket.weapon_mods) do
managers.blackmarket:remove_item("normal", "weapon_mods", mat_id, false)
end
[/HTML]

Not tested, but should remove one instance of every mod when executed.
It worked thank you, only mod that didnt go down was the pre-order military red dot sight
Quote Originally Posted by SeekerWolf View Post
It worked thank you, only mod that didnt go down was the pre-order military red dot sight
Try the updated code or just change "normal" to "preorder" in the "remove_item" line!
Quote Originally Posted by ogR1sH View Post
Try the updated code or just change "normal" to "preorder" in the "remove_item" line!
Thank you very much it worked :]
Posts 1–15 of 147 · Page 1 of 10

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us