addEventHandler ( 'onClientGUIClick', mycheck,root ( )
if guiCheckBoxGetSelected ( mycheck) == true then
triggerServerEvent ( 'Ex', localPlayer,true )
elseif guiCheckBoxGetSelected ( mycheck) == false then
triggerServerEvent ( 'Ex', localPlayer,false )
end
end )
--- Server
addEvent ( 'Ex', true )
addEventHandler ( 'Ex', root,
function ()
if getElementData ( source, "root" ) == NoDmg
setElementData(source,"root",NoDmg)
end
setElementData(source,"root",true)
end
)
addEventHandler ( 'onPlayerDamage',root ( )
if getElementData ( source,'root' ) == NoDmg then
cancelEvent ( )
end
end )