hi
i foundd script and i want running this script with GUIButton
I have tried but I don't know how i do this , please can someone help me
this is the script
[Client-Side]
addEventHandler ( "onClientPlayerDamage",root,
function ()
if getElementData(source,"invincible") then
cancelEvent()
end
end)
addEventHandler("onClientPlayerStealthKill",localPlayer,
function (targetPlayer)
if getElementData(targetPlayer,"invincible") then
cancelEvent()
end
end)
[server-Side]
function toggleGodMode(thePlayer)
local account = getPlayerAccount(thePlayer)
if (not account or isGuestAccount(account)) then return end
local accountName = getAccountName(account)
if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then
if getElementData(thePlayer,"invincible") then
setElementData(thePlayer,"invincible",false)
outputChatBox("God Mode is now Disabled.",thePlayer,0,255,0)
else
setElementData(thePlayer,"invincible",true)
outputChatBox("God Mode is now Enabled.",thePlayer,0,255,0)
end
end
end
addCommandHandler("godmode",toggleGodMode)