diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm
index 4d54909b27d..f44fa115c39 100644
--- a/code/datums/ai_laws.dm
+++ b/code/datums/ai_laws.dm
@@ -5,6 +5,7 @@
var/list/inherent = list()
var/list/supplied = list()
var/list/ion = list()
+ var/mob/living/silicon/owner
/datum/ai_laws/default/asimov
name = "Three Laws of Robotics"
@@ -169,3 +170,20 @@
if (length(law) > 0)
who << "[number]. [law]"
number++
+
+/datum/ai_laws/proc/clear_zeroth_law(var/force) //only removes zeroth from antag ai if force is 1
+ if(force)
+ src.zeroth = null
+ src.zeroth_borg = null
+ return
+ else
+ if(src.owner.mind.special_role)
+ return
+ else
+ src.zeroth = null
+ src.zeroth_borg = null
+ return
+
+/datum/ai_laws/proc/associate(var/mob/living/silicon/M)
+ if(!owner)
+ owner = M
\ No newline at end of file
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 801e2f82332..907b4db38e1 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -109,12 +109,14 @@
if(istype(P, /obj/item/weapon/aiModule/core/full)) //Allows any full core boards to be applied to AI cores.
var/obj/item/weapon/aiModule/core/M = P
laws.clear_inherent_laws()
+ laws.clear_zeroth_law(0)
for(var/templaw in M.laws)
laws.add_inherent_law(templaw)
usr << "Law module applied."
if(istype(P, /obj/item/weapon/aiModule/reset/purge))
laws.clear_inherent_laws()
+ laws.clear_zeroth_law(0)
usr << "Laws cleared applied."
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index deef2e3e927..ff828898c6a 100644
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -239,11 +239,13 @@ AI MODULES
/obj/item/weapon/aiModule/reset/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
target.clear_inherent_laws()
+ target.clear_zeroth_law(0)
/******************* Full Core Boards *******************/
/obj/item/weapon/aiModule/core/full/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender) //These boards replace inherent laws.
target.clear_inherent_laws()
+ target.clear_zeroth_law(0)
..()
/******************** Asimov ********************/
diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm
index aed6b5c06a4..dff65c21de8 100644
--- a/code/modules/mob/living/silicon/laws.dm
+++ b/code/modules/mob/living/silicon/laws.dm
@@ -40,3 +40,8 @@
if(2)
var/datum/ai_laws/lawtype = pick(typesof(/datum/ai_laws/default) - /datum/ai_laws/default)
laws = new lawtype()
+ laws.associate(src)
+
+/mob/living/silicon/proc/clear_zeroth_law(var/force)
+ laws_sanity_check()
+ laws.clear_zeroth_law(force)
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 72ffbf68fd2..33ebf6c73e4 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -583,6 +583,7 @@
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
clear_supplied_laws()
clear_inherent_laws()
+ clear_zeroth_law(0)
laws = new /datum/ai_laws/syndicate_override
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] : [user.name]([user.key]) emagged [name]([key])")