Here's the code I would want you to convert/idk for me pls:
Spoiler
function string.split(str,pat) -- Splitting strings (sentences) into separate words
local t = {}
for word in string.gmatch(str,pat or "[^%s]+") do
t[#t+1] = word
end
return t
end
heal = {}
ffa = true
settings = true
ctf = true
mixctf = true
dom = true
mixdom = true
addhook("join","_sp")
function _sp(id)
heal[id] = {}
heal[id].timer = 2
heal[id].regen = 0
end
addhook("say","_s")
function _s(id,txt)
local arg = txt:split()
if arg[1] == "!heal" then
for _, id in pairs (player(0,"table")) do
heal[id].regen = tonumber(arg[2])
end
return 1
elseif arg[1] == "!ffa" then
if ffa == true then
parse("restart")
parse("sv_name lone | FFA/DM")
parse("sv_gamemode 1")
parse("mp_radar 0")
parse("mp_freezetime 5")
parse("mp_autoteambalance 0")
parse("sv_specmode 1")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!settings" then
if settings == true then
parse("restart")
parse("sv_name lone | Standard")
parse("sv_gamemode 0")
parse("mp_radar 1")
parse("mp_respawndelay 0")
parse("mp_freezetime 3")
parse("mp_autoteambalance 1")
parse("sv_specmode 1")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
parse("mp_startmoney 16000")
end
return 1
elseif arg[1] == "!ctf" then
if ctf == true then
parse("restart")
parse("sv_name lone | CTF/Con")
parse("sv_gamemode 3")
parse("mp_freezetime 3")
parse("sv_specmode 2")
parse("mp_autoteambalance 0")
parse("mp_dispenser_money 1000")
parse("mp_building_limit Turret 9")
parse("mp_building_limit Dispenser 9")
parse("mp_building_limit Teleporter Entrance 9")
parse("mp_building_limit Teleporter Exit 9")
parse("mp_building_limit Gate Field 9")
parse("mp_building_limit Supply 9")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!mixctf" then
if mixctf == true then
parse("restart")
parse("sv_name lone | Mix/Match CTF")
parse("sv_gamemode 3")
parse("sv_password match")
parse("sv_specmode 2")
parse("mp_autoteambalance 0")
parse("mp_freezetime 7")
parse("mp_startmoney 6000")
parse("mp_dispenser_money 500")
parse("mp_building_limit Turret 3")
parse("mp_building_limit Dispenser 1")
parse("mp_building_limit Teleporter Entrance 1")
parse("mp_building_limit Teleporter Exit 1")
parse("mp_building_limit Gate Field 9")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!dom" then
if dom == true then
parse("restart")
parse("sv_name lone | Domination")
parse("sv_gamemode 2")
parse("mp_freezetime 3")
parse("sv_specmode 2")
parse("mp_autoteambalance 0")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!mixdom" then
if mixdom == true then
parse("sv_restart")
parse("sv_name lone | Mix/Match Domination")
parse("sv_password match")
parse("mp_autoteambalance 0")
parse("mp_freezetime 7")
parse("sv_specmode 2")
parse("mp_respawndelay 3")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
end
end
addhook("second","_sec")
function _sec()
for _,id in pairs (player(0,"tableliving")) do
if heal[id] then
if heal[id].timer == 0 then
parse("sethealth "..id.." "..player(id,"health")+heal[id].regen)
elseif heal[id].timer > 0 then
heal[id].timer = heal[id].timer - 1
end
end
end
end
addhook("hit","_h")
function _h(id, s)
if heal[id] then
heal[id].timer = 2
end
end
local t = {}
for word in string.gmatch(str,pat or "[^%s]+") do
t[#t+1] = word
end
return t
end
heal = {}
ffa = true
settings = true
ctf = true
mixctf = true
dom = true
mixdom = true
addhook("join","_sp")
function _sp(id)
heal[id] = {}
heal[id].timer = 2
heal[id].regen = 0
end
addhook("say","_s")
function _s(id,txt)
local arg = txt:split()
if arg[1] == "!heal" then
for _, id in pairs (player(0,"table")) do
heal[id].regen = tonumber(arg[2])
end
return 1
elseif arg[1] == "!ffa" then
if ffa == true then
parse("restart")
parse("sv_name lone | FFA/DM")
parse("sv_gamemode 1")
parse("mp_radar 0")
parse("mp_freezetime 5")
parse("mp_autoteambalance 0")
parse("sv_specmode 1")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!settings" then
if settings == true then
parse("restart")
parse("sv_name lone | Standard")
parse("sv_gamemode 0")
parse("mp_radar 1")
parse("mp_respawndelay 0")
parse("mp_freezetime 3")
parse("mp_autoteambalance 1")
parse("sv_specmode 1")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
parse("mp_startmoney 16000")
end
return 1
elseif arg[1] == "!ctf" then
if ctf == true then
parse("restart")
parse("sv_name lone | CTF/Con")
parse("sv_gamemode 3")
parse("mp_freezetime 3")
parse("sv_specmode 2")
parse("mp_autoteambalance 0")
parse("mp_dispenser_money 1000")
parse("mp_building_limit Turret 9")
parse("mp_building_limit Dispenser 9")
parse("mp_building_limit Teleporter Entrance 9")
parse("mp_building_limit Teleporter Exit 9")
parse("mp_building_limit Gate Field 9")
parse("mp_building_limit Supply 9")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!mixctf" then
if mixctf == true then
parse("restart")
parse("sv_name lone | Mix/Match CTF")
parse("sv_gamemode 3")
parse("sv_password match")
parse("sv_specmode 2")
parse("mp_autoteambalance 0")
parse("mp_freezetime 7")
parse("mp_startmoney 6000")
parse("mp_dispenser_money 500")
parse("mp_building_limit Turret 3")
parse("mp_building_limit Dispenser 1")
parse("mp_building_limit Teleporter Entrance 1")
parse("mp_building_limit Teleporter Exit 1")
parse("mp_building_limit Gate Field 9")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!dom" then
if dom == true then
parse("restart")
parse("sv_name lone | Domination")
parse("sv_gamemode 2")
parse("mp_freezetime 3")
parse("sv_specmode 2")
parse("mp_autoteambalance 0")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
return 1
elseif arg[1] == "!mixdom" then
if mixdom == true then
parse("sv_restart")
parse("sv_name lone | Mix/Match Domination")
parse("sv_password match")
parse("mp_autoteambalance 0")
parse("mp_freezetime 7")
parse("sv_specmode 2")
parse("mp_respawndelay 3")
parse("mp_idlekick 0")
parse("mp_kickpercent 0")
parse("mp_mapvoteratio 0")
parse("mp_tkpunish 0")
end
end
end
addhook("second","_sec")
function _sec()
for _,id in pairs (player(0,"tableliving")) do
if heal[id] then
if heal[id].timer == 0 then
parse("sethealth "..id.." "..player(id,"health")+heal[id].regen)
elseif heal[id].timer > 0 then
heal[id].timer = heal[id].timer - 1
end
end
end
end
addhook("hit","_h")
function _h(id, s)
if heal[id] then
heal[id].timer = 2
end
end
Heres a link to Hajt's Admin Script:
http://www.unrealsoftware.de/files_show.php?file=17245
TLDR: pls convert my code to hajt's code so i can copy paste it into the script so it works pls ty