Payday 2 Lua Scripts

Posts 31–45 of 147 · Page 3 of 10
I do not, sorry.
Quote Originally Posted by Atari1337 View Post
Awesome job compiling all these! Do you have a recent LUA dump of the game?
Here is code for almost instant drilling (including the thermal lance). There has to be a more elegant way to set timer = 0.01 than replacing the entire drill start function (I don't claim to know coding...), but I can't argue with results.

Code:
--Fast Drilling
function TimerGui:_set_jamming_values() return end
function TimerGui:start( timer )
	timer = 0.01
	if self._jammed then
		self:_set_jammed( false )
		return
	end
	
	if not self._powered then
		self:_set_powered( true )
		return
	end
	
	if self._started then
		return
	end
	
	self:_start( timer )
	if managers.network:session() then
		managers.network:session():send_to_peers_synched( "start_timer_gui", self._unit, timer )
	end
end
Here is code to remove the cash penalty for killing civs.

Code:
 MoneyManager.get_civilian_deduction = function(self) return 0 end
Finally, for people having issues with crashing when they try to open a safe/door due to not having C4, just delete the following from your scripts file. This will let the game check to see if you have C4 before blindly trying to use it.

Code:
BaseInteractionExt._has_required_deployable = function(self) return true end
Quote Originally Posted by RabidFubar View Post
Here is code for almost instant drilling (including the thermal lance). There has to be a more elegant way to set timer = 0.01 than replacing the entire drill start function (I don't claim to know coding...), but I can't argue with results.

Code:
--Fast Drilling
function TimerGui:_set_jamming_values() return end
function TimerGui:start( timer )
	timer = 0.01
	if self._jammed then
		self:_set_jammed( false )
		return
	end
	
	if not self._powered then
		self:_set_powered( true )
		return
	end
	
	if self._started then
		return
	end
	
	self:_start( timer )
	if managers.network:session() then
		managers.network:session():send_to_peers_synched( "start_timer_gui", self._unit, timer )
	end
end
Here is code to remove the cash penalty for killing civs.

Code:
 MoneyManager.get_civilian_deduction = function(self) return 0 end
Finally, for people having issues with crashing when they try to open a safe/door due to not having C4, just delete the following from your scripts file. This will let the game check to see if you have C4 before blindly trying to use it.

Code:
BaseInteractionExt._has_required_deployable = function(self) return true end
Do you have skype i would like to talk with you
Quote Originally Posted by RabidFubar View Post
Here is code for almost instant drilling (including the thermal lance). There has to be a more elegant way to set timer = 0.01 than replacing the entire drill start function (I don't claim to know coding...), but I can't argue with results.

Code:
--Fast Drilling
function TimerGui:_set_jamming_values() return end
function TimerGui:start( timer )
	timer = 0.01
	if self._jammed then
		self:_set_jammed( false )
		return
	end
	
	if not self._powered then
		self:_set_powered( true )
		return
	end
	
	if self._started then
		return
	end
	
	self:_start( timer )
	if managers.network:session() then
		managers.network:session():send_to_peers_synched( "start_timer_gui", self._unit, timer )
	end
end
Here is code to remove the cash penalty for killing civs.

Code:
 MoneyManager.get_civilian_deduction = function(self) return 0 end
Finally, for people having issues with crashing when they try to open a safe/door due to not having C4, just delete the following from your scripts file. This will let the game check to see if you have C4 before blindly trying to use it.

Code:
BaseInteractionExt._has_required_deployable = function(self) return true end
Thanks for sharing the instant drilling code!
Quote Originally Posted by NyskLin3 View Post
Infinite equipment in other peoples games dont work

EDIT: Nevermind got it to work
Nevermind still not working? Using this with sentrys btw in another persons game
Any idea on how to unlock a specific mask if possible? Thanks in advance.
Is there a way to increase your spending cash by a set amount?
Quote Originally Posted by iBulle View Post
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
Hey man. I can see you are the most ultimate awesome code/lua guy ever.
Do you know exactly how to remove all mask customization (like materials, color, patterns)?
I hacked loot card to drop 5000 times, mostly for weapon attachments, but I got a bunch of these which I really want OUT. Also, I want them out for the sake of anti-ban
the code for instantdrilling is only working for the \/ault door. not for lockpicking or drilling doors. It just doesnt work :S
God mode doesn't want to activate for me, i've only kept the cable ties code and it works good but not the god mode...

Edit: i have kept the god mode code too.
alright thanks,,

i need a code for a lot of Cash now, all things I tried crashed my game. None worked when it comes to Cash
Is lua scripts disable achievements ? Cause i can't have the most wanted achievement
is there a script to give extra bags of money? like add it to your person as if he is carrying one?
Quote Originally Posted by NyskLin3 View Post
Infinite equipment in other peoples games dont work

EDIT: Nevermind got it to work
How do you got it to work ? I put both scripts for infinite equipement, but when I am not the host, I have limited equipement.
How can I remove skillpoints that I added with script?
Posts 31–45 of 147 · Page 3 of 10

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us