πŸ‘ [HELPFUL PREMADE LUA SCRIPTS FOR PEOPLE] / [PLACE TO ASK FOR MORE LUA FROM PEOPLE]

Posts 16–30 of 48 Β· Page 2 of 4
The text made my eyes hurt, fixed it up a little if you wanna use this in original post, go ahead.


Infinite Equipment

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


Code:
-- Infinite Equipment (Not Host)
function PlayerManager:remove_equipment_possession( peer_id, equipment ) end
Super Jump ( edit value '470' for desired jump height )

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

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

Code:
-- 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
Spawn A.I ( Must not have full team )


Code:
function FollowUnit()

local new_objective

local valid_criminals = {}
for pl_key, pl_record in pairs( managers.groupai:state():all_player_criminals() ) do
if pl_record.status ~= "dead" then
table.insert( valid_criminals, pl_key )
end
end

if #valid_criminals > 0 then
local follow_unit = managers.groupai:state():all_player_criminals()[ valid_criminals[ math.random( #valid_criminals ) ] ].unit -- pick a random player
new_objective = { 
type = "follow",
follow_unit = follow_unit,
scan = true,
is_default = true
}
end
return new_objective
end


function SpawnMob()

local spawn_point = managers.network:game():get_next_spawn_point()

local spawn_pos = spawn_point.pos_rot[1]
local spawn_rot = spawn_point.pos_rot[2]

local unit_name = Idstring( "units/payday2/characters/npc_criminals_suit_1/dallas/npc_criminal_suit_dallas" )
local myobjective = FollowUnit()

local spawn_ai = { 
init_state = "idle",
objective = myobjective
}

local unit = World:spawn_unit( unit_name, spawn_pos, spawn_rot )

unit:movement():set_character_anim_variables()

unit:brain():set_spawn_ai( spawn_ai )
unit:brain():set_active( true )
managers.network:session():send_to_peers_synched( "set_unit", unit, "random", "", 0 )

end


if Network:is_server() then
SpawnMob()
managers.hud:show_hint( { text = "AI Summoned- be weary, he's got a taste for flesh" } )
end
God mode


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


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
Allow interaction with anything (ECM jammers, picking locks, deploying shaped charges, etc)


Code:
-- Allow interaction with anything (ECM jammers, picking locks, deploying shaped charges, etc) 
BaseInteractionExt._has_required_upgrade = function(self) return true end 
BaseInteractionExt._has_required_deployable = function(self) return true end 
BaseInteractionExt.can_interact = function(self, player) return true end
Inablity to get caught or obtain suspicion


Code:
-- Guards and Camera
function GroupAIStateBase:_clbk_switch_enemies_to_not_cool( ) end
function PlayerMovement:on_suspicion( observer_unit, status ) end
function GroupAIStateBase:on_criminal_suspicion_progress( u_suspect, u_observer, status ) end
function GroupAIStateBase:criminal_spotted( unit ) end
function GroupAIStateBase:report_aggression( unit ) end
function PlayerMovement:on_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 GroupAIStateBase:on_police_called( called_reason ) end
function GroupAIStateBase:on_police_weapons_hot( called_reason ) end
function GroupAIStateBase:on_gangster_weapons_hot( called_reason ) end
function GroupAIStateBase:on_enemy_weapons_hot( is_delayed_callback ) end
function GroupAIStateBase:_clbk_switch_enemies_to_not_cool( ) end


Set level (1-100)


Code:
-- level
managers.experience:_set_current_level (25)
Instant deploy


Code:
-- Instant deploy 
PlayerManager.selected_equipment_deploy_timer = function(self) return 0 end
No movement penalties


Code:
-- No movement penalty/speed increase 
PlayerManager.body_armor_movement_penalty = function(self) return 2 en

Weapon spread ( bullets don't stray from your Cross-hair )


Code:
-- Weapon spread 
NewRaycastWeaponBase._get_spread = function(self) return 0 end
Weapon recoil


Code:
-- Weapon recoil 
NewRaycastWeaponBase.recoil_multiplier = function(self) return 0 end
Instant reload, change value '2000' for speed of reload


Code:
-- Weapon reload speed 
NewRaycastWeaponBase.reload_speed_multiplier = function(self) return 2000 end
Weapon fire rate ( edit value '10' for speed of bullets to be fired )


Code:
-- Weapon fire rate 
NewRaycastWeaponBase.fire_rate_multiplier = function(self) return 10 end
Speed of swapping between weapons ( edit value '2000' for desired speed )


Code:
-- Weapon swap speed 
PlayerStandard._get_swap_speed_multiplier = function(self) return 2000 end
Unlimited cable ties


Code:
-- Infinite cable ties 
function PlayerManager:remove_special( name ) end
Steam Achievement


Code:
--steam achievement
if managers.achievment then
for id,_ in pairs(managers.achievment.achievments) do
managers.achievment:award(id)
end
end
Could anyone make a lua script with all masks and weapons?
I`ve tried myself but no luck :/..
Quote Originally Posted by FORGETME86 View Post
The thing is most of the other threads do not have working ones and are mostly broken so i made a new thread that i put all the ones i tested and that do work into one so before you go on here and post something read what i have wrote before you comment.... this is a place to ask for more LUA and were i will be updating more working LUA scripts i find for payday 2
The other threads DO have working LUA codes. Most of the time its users who cannot use them properly!. I have read what you have wrote.. and it just says.. "Here is a list of codes that I have found elsewhere and now I'm making a useless thread".

The other threads are constantly updating. I standby there is no need for any more threads

Missing codes that other threads have: carry tweaks, one hit kills (weapon damage)

For a more uptodate thread check out: Payday 2 full release LUA hack.
Useless thread?.... when people found it to be useful i dont know what your trying to do either troll or just be a dick just move one kid damn

---------- Post added at 08:29 PM ---------- Previous post was at 08:27 PM ----------

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



This should work for masks it worked for me when i used it

---------- Post added at 08:30 PM ---------- Previous post was at 08:29 PM ----------

-- unlock all weapons
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

And this also worked for me when i used it soo idk hope they both work man if not ill try to find you more

---------- Post added at 08:31 PM ---------- Previous post was at 08:30 PM ----------

Thank you
Quote Originally Posted by FORGETME86 View Post
Useless thread?.... when people found it to be useful i dont know what your trying to do either troll or just be a dick just move one kid damn[COLOR="Silver"]
To be fair, every script posted here is posted within the others 3-4 topics.
Is any way to remove money? I mean, I have 170 millions and I don't want so much money, I tried with managers.money:_add_to_total (-100000000) but nothing happened, help please.
Is there a script to unlock all attachments?
Quote Originally Posted by ChrisDud3 View Post
Is there a script to unlock all attachments?
Code:
local player = managers.player:player_unit()

if managers.menu then
	managers.menu:set_debug_menu_enabled(true)
end

if managers.hud then
managers.hud:show_hint( { text = "active" } )
end

-- weapon mods
for mod_id,_ in pairs(tweak_data.blackmarket.weapon_mods) do
        tweak_data.blackmarket.weapon_mods[ mod_id ].unlocked = true
        managers.blackmarket:add_to_inventory("normal", "weapon_mods", mod_id, false)
end
Quote Originally Posted by extremegreed View Post
Code:
local player = managers.player:player_unit()

if managers.menu then
	managers.menu:set_debug_menu_enabled(true)
end

if managers.hud then
managers.hud:show_hint( { text = "active" } )
end

-- weapon mods
for mod_id,_ in pairs(tweak_data.blackmarket.weapon_mods) do
        tweak_data.blackmarket.weapon_mods[ mod_id ].unlocked = true
        managers.blackmarket:add_to_inventory("normal", "weapon_mods", mod_id, false)
end
hmm, didn't work for me. I've tried as host and as not host, and it hasn't given me all attachments. Any ideas as to why?
Quote Originally Posted by ChrisDud3 View Post
hmm, didn't work for me. I've tried as host and as not host, and it hasn't given me all attachments. Any ideas as to why?
can be a stupid question,but you press insert inside a game match,not on game menu?

make sure your script have only working codes,a wrong code can make the entire script useless.
Would anyone be able to add/make a script that adds specific masks? I'm looking to add the Dallas Mask, Dallas Begins Mask, Wolf Mask, and Wolf Begins mask.
Quote Originally Posted by BigNigKFC View Post
Would anyone be able to add/make a script that adds specific masks? I'm looking to add the Dallas Mask, Dallas Begins Mask, Wolf Mask, and Wolf Begins mask.
here,remove the ones you dont want.

Code:
-- player instance

local player = managers.player:player_unit()

-- text on screen

if managers.hud then
managers.hud:show_hint( { text = "Hello World!!" } )
end

local masks = {}
masks["skull"] = 'preorder'
masks["wolf_clean"] = 'infamous'
masks["hoxton_clean"] = 'infamous'
masks["dallas_clean"] = 'infamous'
masks["chains_clean"] = 'infamous'
masks["dallas"] = 'infamous'
masks["hoxton"] = 'infamous'
masks["chains"] = 'infamous'
masks["wolf"] = 'infamous'
masks["cthulhu"] = 'infamous'
masks["grin"] = 'infamous'
masks["dillinger_death_mask"] = 'infamous'
masks["alienware"] = 'normal'
masks["greek_tragedy"] = 'normal'
masks["jaw"] = 'normal'
masks["hockey"] = 'normal'
masks["troll"] = 'normal'
masks["gagball"] = 'normal'
masks["tounge"] = 'normal'
masks["zipper"] = 'normal'
masks["biglips"] = 'normal'
masks["clowncry"] = 'normal'
masks["mr_sinister"] = 'normal'
masks["clown_56"] = 'normal'
masks["dripper"] = 'normal'
masks["buha"] = 'normal'
masks["shogun"] = 'normal'
masks["oni"] = 'normal'
masks["monkeybiss"] = 'normal'
masks["babyrhino"] = 'normal'
masks["hog"] = 'normal'
masks["outlandish_a"] = 'normal'
masks["outlandish_b"] = 'normal'
masks["outlandish_c"] = 'normal'
masks["bullet"] = 'normal'
masks["shrunken"] = 'normal'
masks["brainiack"] = 'normal'
masks["zombie"] = 'normal'
masks["scarecrow"] = 'normal'
masks["mummy"] = 'normal'
masks["vampire"] = 'normal'
masks["day_of_the_dead"] = 'normal'
masks["dawn_of_the_dead"] = 'normal'
masks["demon"] = 'normal'
masks["stonekisses"] = 'normal'
masks["demonictender"] = 'normal'

managers.blackmarket:_setup_masks()
for name,quality in pairs(masks) do
	Global.blackmarket_manager.masks[ name ].unlocked = true
	managers.blackmarket:add_to_inventory( quality, "masks", name, false )
end
Quote Originally Posted by extremegreed View Post
here,remove the ones you dont want.

Code:
-- player instance

local player = managers.player:player_unit()

-- text on screen

if managers.hud then
managers.hud:show_hint( { text = "Hello World!!" } )
end

local masks = {}
masks["skull"] = 'preorder'
masks["wolf_clean"] = 'infamous'
masks["hoxton_clean"] = 'infamous'
masks["dallas_clean"] = 'infamous'
masks["chains_clean"] = 'infamous'
masks["dallas"] = 'infamous'
masks["hoxton"] = 'infamous'
masks["chains"] = 'infamous'
masks["wolf"] = 'infamous'
masks["cthulhu"] = 'infamous'
masks["grin"] = 'infamous'
masks["dillinger_death_mask"] = 'infamous'
masks["alienware"] = 'normal'
masks["greek_tragedy"] = 'normal'
masks["jaw"] = 'normal'
masks["hockey"] = 'normal'
masks["troll"] = 'normal'
masks["gagball"] = 'normal'
masks["tounge"] = 'normal'
masks["zipper"] = 'normal'
masks["biglips"] = 'normal'
masks["clowncry"] = 'normal'
masks["mr_sinister"] = 'normal'
masks["clown_56"] = 'normal'
masks["dripper"] = 'normal'
masks["buha"] = 'normal'
masks["shogun"] = 'normal'
masks["oni"] = 'normal'
masks["monkeybiss"] = 'normal'
masks["babyrhino"] = 'normal'
masks["hog"] = 'normal'
masks["outlandish_a"] = 'normal'
masks["outlandish_b"] = 'normal'
masks["outlandish_c"] = 'normal'
masks["bullet"] = 'normal'
masks["shrunken"] = 'normal'
masks["brainiack"] = 'normal'
masks["zombie"] = 'normal'
masks["scarecrow"] = 'normal'
masks["mummy"] = 'normal'
masks["vampire"] = 'normal'
masks["day_of_the_dead"] = 'normal'
masks["dawn_of_the_dead"] = 'normal'
masks["demon"] = 'normal'
masks["stonekisses"] = 'normal'
masks["demonictender"] = 'normal'

managers.blackmarket:_setup_masks()
for name,quality in pairs(masks) do
	Global.blackmarket_manager.masks[ name ].unlocked = true
	managers.blackmarket:add_to_inventory( quality, "masks", name, false )
end
Thanks a bunch!
Quote Originally Posted by extremegreed View Post
here,remove the ones you dont want.

Code:
-- player instance

local player = managers.player:player_unit()

-- text on screen

if managers.hud then
managers.hud:show_hint( { text = "Hello World!!" } )
end

local masks = {}
masks["skull"] = 'preorder'
masks["wolf_clean"] = 'infamous'
masks["hoxton_clean"] = 'infamous'
masks["dallas_clean"] = 'infamous'
masks["chains_clean"] = 'infamous'
masks["dallas"] = 'infamous'
masks["hoxton"] = 'infamous'
masks["chains"] = 'infamous'
masks["wolf"] = 'infamous'
masks["cthulhu"] = 'infamous'
masks["grin"] = 'infamous'
masks["dillinger_death_mask"] = 'infamous'
masks["alienware"] = 'normal'
masks["greek_tragedy"] = 'normal'
masks["jaw"] = 'normal'
masks["hockey"] = 'normal'
masks["troll"] = 'normal'
masks["gagball"] = 'normal'
masks["tounge"] = 'normal'
masks["zipper"] = 'normal'
masks["biglips"] = 'normal'
masks["clowncry"] = 'normal'
masks["mr_sinister"] = 'normal'
masks["clown_56"] = 'normal'
masks["dripper"] = 'normal'
masks["buha"] = 'normal'
masks["shogun"] = 'normal'
masks["oni"] = 'normal'
masks["monkeybiss"] = 'normal'
masks["babyrhino"] = 'normal'
masks["hog"] = 'normal'
masks["outlandish_a"] = 'normal'
masks["outlandish_b"] = 'normal'
masks["outlandish_c"] = 'normal'
masks["bullet"] = 'normal'
masks["shrunken"] = 'normal'
masks["brainiack"] = 'normal'
masks["zombie"] = 'normal'
masks["scarecrow"] = 'normal'
masks["mummy"] = 'normal'
masks["vampire"] = 'normal'
masks["day_of_the_dead"] = 'normal'
masks["dawn_of_the_dead"] = 'normal'
masks["demon"] = 'normal'
masks["stonekisses"] = 'normal'
masks["demonictender"] = 'normal'

managers.blackmarket:_setup_masks()
for name,quality in pairs(masks) do
	Global.blackmarket_manager.masks[ name ].unlocked = true
	managers.blackmarket:add_to_inventory( quality, "masks", name, false )
end
Would this work with remove masks/materials/colors/patterns? I have all of them and would like to remove pretty much all of'em.
Quote Originally Posted by BigNigKFC View Post
Thanks a bunch!
no problem sir,and before you ask (if you going of course) here is the code to unlock the skull.

Code:
-- player instance

local player = managers.player:player_unit()

-- text on screen

if managers.hud then
managers.hud:show_hint( { text = "Hello World!!" } )
end

local masks = {}
masks["skull"] = 'infamous'

managers.blackmarket:_setup_masks()
for name,quality in pairs(masks) do
	Global.blackmarket_manager.masks[ name ].unlocked = true
	managers.blackmarket:add_to_inventory( quality, "masks", name, false )
end
notice I have changed masks["skull"] = 'preorder' to masks["skull"] = 'infamous'

Quote Originally Posted by BigNigKFC View Post
Would this work with remove masks/materials/colors/patterns? I have all of them and would like to remove pretty much all of'em.

Code:
local player = managers.player:player_unit()

if managers.hud then
managers.hud:show_hint( { text = "Scripts Enabled" } )
for i=1, 1000 do
for mat_id,_ in pairs(tweak_data.blackmarket.masks) do	
managers.blackmarket:remove_item("normal", "masks", mat_id, false)
managers.blackmarket:remove_item("infamous", "masks", mat_id, false)
end
for mat_id,_ in pairs(tweak_data.blackmarket.materials) do	
managers.blackmarket:remove_item("normal", "materials", mat_id, false)
managers.blackmarket:remove_item("infamous", "materials", mat_id, false)
end
for mat_id,_ in pairs(tweak_data.blackmarket.textures) do	
managers.blackmarket:remove_item("normal", "textures", mat_id, false)
managers.blackmarket:remove_item("infamous", "textures", mat_id, false)
end
for mat_id,_ in pairs(tweak_data.blackmarket.colors) do	
managers.blackmarket:remove_item("normal", "colors", mat_id, false)
managers.blackmarket:remove_item("infamous", "colors", mat_id, false)
end
for mat_id,_ in pairs(tweak_data.blackmarket.weapon_mods) do	
managers.blackmarket:remove_item("normal", "weapon_mods", mat_id, false)
end
end
end
will remove 1000 pieces of masks,weapon mods,colours,patterns,materials
Posts 16–30 of 48 Β· Page 2 of 4
This thread is closed for replies.

Similar Threads

Talk with us