Payday 2 Lua Scripts

Posts 16–30 of 147 · Page 2 of 10
I'm quite new to using scripts and can't seem to actually find a decent tutorial on how to actually use them. I mean, I get that the html text or whatever is the script, but how do I actually make it so I can use it?
Infinite equipment in other peoples games dont work

EDIT: Nevermind got it to work
Hey dude, awesome scripts.
Is it possible to give a mission item?
Like money bags or paintings?
any instruction guys. help. how do i use it ?
Anybody know a script to take off the limit of dominated guards? I would like to dominate more than one guard.
Where can i find the instant drilling and instant lockpick especially doing the bank heist mission..
Quick tutorial.

http://www.mpgh.net/forum/754-payday...-lua-hack.html
Download the .lua + .dll files within that .rar folder.

Place the script.lua and the .dll within it into the root directory of your Payday 2 folder.
Open script.lua with the notepad and put in some of these scripts. Just delete everything within and place in the scripts from this topic.

An example of mine.

( God mode may need to be activated separate from the others, to do so, delete everything but the invulnerable script )
You can edit files within the game, no need to close it down and it may crash after a game finishes and saves.


Code:
-- invulnerable
local player = managers.player:player_unit()
player:character_damage():set_invulnerable( true )

-- 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 = 4.0
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
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.player:player_unit() == self._setup.user_unit then
      self.set_ammo(self, 1.0)
   end
end

-- 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.player:player_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 (Not Host)
function PlayerManager:remove_equipment_possession( peer_id, equipment ) end

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
 
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

-- 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


-- Message On Screen
if managers.hud then
   managers.hud:show_hint( { text = "^6 Set hax0rz!" } )
end
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

Can't quite get this to work... Is this the stealth script, if it's not can anyone give me one?
Quote Originally Posted by iiPhoenix View Post
Can't quite get this to work... Is this the stealth script, if it's not can anyone give me one?
only works in offline mode for me.
Random question.
Is there a way to increase the xp reward after heist?
thanks for the tutorial. got it to work. everything works fine so far.
Im totaly new to LUA so can someone pls explane after puting the script and dll into game folder how did i get it to work ingame ?
is it bound to a key ? or did it run automaticly ?
and how can i run parts of the script like ending a mission instantly ?
I'm trying to figure out how to add the Cthulhu mask to my inventory. The OP had this code:
Code:
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
In BlackMarketTweakData.lua from the Large Lua-Script Pack in the other thread, I found this code concerning the Cthulhu mask:
Code:
self.masks.cthulhu = {}
self.masks.cthulhu.unit = "units/payday2/masks/msk_cthulhu/msk_cthulhu"
self.masks.cthulhu.name_id = "bm_msk_cthulhu"
self.masks.cthulhu.pc = 100
self.masks.cthulhu.infamous = true
self.masks.cthulhu.value = 8
I figured that I could just use the Cthulhu mask ID instead of the mask_id array in the first piece of code. I tried this script by itself but it did not yield me the mask:
Code:
managers.blackmarket:_setup_masks()
Global.blackmarket_manager.masks["bm_msk_cthulhu"].unlocked = true
managers.blackmarket:add_to_inventory("normal", "masks", "bm_msk_cthulhu", false)
end
Can someone help me out here?
Hi everyone !
This script can give me all masks please ? And is that the script can still walk with the really game ?
Thanks for your reply guys !
How do I use this:
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() ) } )
Posts 16–30 of 147 · Page 2 of 10

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us