Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- быдлокод для юзания карты отладки + чатбокс + карта эффектов частиц + радар --> pastebin get 8HEKiJvV /bin/.d.lua -f
- local c = require('component')
- local ser = require('serialization')
- local fs = require('filesystem')
- local comp = require('computer')
- local ev = require('event')
- local term = require('term')
- local av = c.isAvailable
- local g = c.gpu
- local xOld, yOld = g.getResolution()
- local w, h = 30, 15
- local int = 1
- local xPart, yPart, zPart = 0, 0, 0
- local radarSleep = 2
- local cbCor = 10
- local timer = 1
- local genJoke = { jokeLen = 5 }
- local textColor = '§f'
- local screen = 'main'
- local configPath, autorunPath = '/.deb_conf.cfg', '/.autorun.lua'
- local work = true
- local colors = {green = 0xff0000, darkGreen = 0x006600, red = 0x770000, gray = 0x454545, white = 0xffffff, black = 0x000000}
- local frases = { } -- фразы для шутника. { 'фраза1', 'фраза2' ... }
- function main()
- screen = 'main'
- press()
- g.setResolution(w,h)
- g.setBackground(colors.black)
- finalMenu(9,'DEBUG > MAIN')
- g.fill(4,3,1,10,'│')
- g.fill(17,3,1,8,'│')
- g.set(4,3, '┌─ WORLD')
- g.set(4,5, '├─ PLAYER')
- g.set(4,7, '├─ GM 1')
- g.set(4,9, '├─ GM 0')
- g.set(4,11, '├─ CHAT')
- g.set(4,13, '└─ CONSOLE COMMAND >>')
- g.set(17,3, '┌─ WARPS')
- g.set(17,5, '├─ PEX ADD')
- g.set(17,7, '├─ PEX REM')
- g.set(17,9, '├─ NOCLIP')
- g.set(17,11,'└─ PARTS')
- if not chatAccess then
- g.setForeground(colors.gray)
- g.set(7,11,'CHAT')
- end
- if not particleAccess then
- g.setForeground(colors.gray)
- g.set(20,11,'PARTS')
- end
- end
- function world()
- screen = 'world'
- finalMenu(9,'DEBUG > WORLD')
- g.fill(4,3,1,10,'│')
- g.fill(17,3,1,8,'│')
- g.set(4,3, '┌─ SETBLOCK')
- g.set(4,5, '├─ SETBLOCKS')
- g.set(4,7, '├─ REMITEM')
- g.set(4,9, '├─ INSITEM')
- g.set(4,11, '├─ DAYRAIN')
- g.set(4,13, '└─ SUMMON')
- g.set(17,3, '┌─ INSITEMS')
- g.set(17,5, '├─ NBTS')
- g.set(17,7, '├─ SIGNS')
- g.set(17,9, '├─ IMBPOTION')
- g.set(17,11,'└─ SOUNDS')
- end
- function signsMenu()
- screen = 'signs'
- finalMenu(9,'DEBUG > SIGNS')
- g.fill(4,3,1,11, '│')
- g.fill(17,3,1,3,'│')
- g.set(4,3, '┌─ FREE')
- g.set(4,5, '├─ BUY')
- g.set(4,7, '├─ SELL')
- g.set(4,9, '├─ DISPENSER')
- g.set(4,11,'├─ CREATIVE')
- g.set(4,13,'└─ GATE')
- g.set(17,3,'┌─ EDIT')
- g.set(17,5,'└─ CLEAR')
- end
- function player()
- screen = 'playr'
- finalMenu(9,'DEBUG > PLAYER')
- g.fill(4,3,1,9, '│')
- g.fill(17,3,1,9,'│')
- g.set(4,3, '┌─ INFO')
- g.set(4,5, '├─ TPA')
- g.set(4,7, '├─ TPAME')
- g.set(4,9, '├─ TPAMETO')
- g.set(4,11, '└─ FREEZE')
- g.set(17,3, '┌─ TPAHERE')
- g.set(17,5, '├─ TPAPTOP')
- g.set(17,7, '├─ SETHP')
- g.set(17,9, '├─ CLIPBRD')
- g.set(17,11,'└─ KICK')
- end
- function finalMenu(center,menu)
- term.clear()
- g.setForeground(colors.white)
- g.set(27,1,'[*]')
- g.set(center,1,menu)
- g.set(30,1,'|||||HIDE||||||',true)
- g.set(26,15,'EXIT')
- g.set(14,15,'ADMS')
- g.set(2,15,'MAIN')
- g.setForeground(colors.green)
- end
- function finalInputMenu(center,menu)
- term.clear()
- g.setForeground(colors.white)
- g.set(center,1,menu)
- g.setForeground(colors.green)
- g.fill(1,2,30,1,'─')
- term.setCursor(1,3)
- end
- function warps()
- screen = 'warps'
- finalMenu(9,'DEBUG > WARPS')
- if #config.warps == 0 then
- g.set(1,3,'Press [+] to add the warp...')
- end
- g.fill(1,2,29,1,'─')
- g.set(27,2,'[+]')
- local startY = 2
- for i = 1, #config.warps do
- local warpName = config.warps[i].name
- g.setForeground(colors.white)
- g.set(3,i+startY,warpName)
- g.setForeground(colors.green)
- g.set(1,i+startY,'>')
- g.setForeground(colors.gray)
- g.set(28,i+startY,'x')
- end
- end
- function addWarp()
- finalInputMenu(9,'WARPS > ADD')
- io.write('WarpName >> ')
- local newWarpName = io.read():sub(1,20)
- local x,y,z = getMyCoords()
- table.insert(config.warps,{ name = newWarpName, x = x, y = y, z = z })
- conf_S()
- end
- function teleportToWarp(warpId)
- local x = config.warps[warpId].x
- local y = config.warps[warpId].y
- local z = config.warps[warpId].z
- dbg.getPlayer(config.admin).setPosition(x,y,z)
- end
- function admins()
- screen = 'admns'
- finalMenu(5,'DEBUG > ADMINS')
- g.set(20,1,'[SCAN]')
- g.setForeground(colors.white)
- g.fill(1,2,29,1,'─')
- g.set(14,15,'EDIT')
- g.setForeground(colors.red)
- term.setCursor(1,3)
- local online = dbg.getPlayers()
- g.set(1,1,#online..' ')
- for i = 1, #online do
- local onePl = online[i]
- for c = 1, #config.admins do
- local oneAdm = config.admins[c]
- if onePl == oneAdm then
- local x1,y1,z1 = getMyCoords()
- local x2,y2,z2 = dbg.getPlayer(oneAdm).getPosition()
- local dim = dbg.getPlayer(oneAdm).getWorld().getDimensionId()
- local dist = math.sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2)
- print(oneAdm..' ('..dim..' dim, '..math.floor(dist)..'m)')
- end
- end
- end
- g.setForeground(colors.white)
- print('Press "A" for refresh...')
- end
- function editAdmins()
- screen = 'edadm'
- finalMenu(9,'EDIT ADMINS')
- if #config.admins == 0 then
- g.set(1,3,'Press [+] to add the admin...')
- end
- g.fill(1,2,29,1,'─')
- g.set(27,2,'[+]')
- local startY = 2
- for i = 1, #config.admins do
- g.setForeground(colors.green)
- g.set(1,i+startY,'>')
- g.setForeground(colors.gray)
- g.set(28,i+startY,'x')
- g.setForeground(colors.white)
- g.set(3,i+startY,config.admins[i])
- end
- g.setForeground(colors.white)
- g.set(1,h,' MAIN ADMS EXIT|')
- end
- function addAdmin()
- local newAdm = playersGet('ADMIN')
- if newAdm ~= 'main' then
- if testDuplet(config.admins,newAdm) then
- table.insert(config.admins,newAdm)
- conf_S()
- end
- end
- g.setResolution(w,h)
- end
- function adminScan()
- local online = dbg.getPlayers()
- for i = 1, #online do
- local cPl = online[i]
- local gm = dbg.getPlayer(cPl).getGameType()
- if gm == 'creative' then
- if testDuplet(config.admins,cPl) then
- table.insert(config.admins,cPl)
- conf_S()
- end
- end
- end
- end
- function testDuplet(mass,toTest)
- for i = 1, #mass do
- if toTest == mass[i] then
- return false
- end
- end
- return true
- end
- function pexAdd()
- finalInputMenu(10,'PEX > ADD')
- io.write('PEX to add, or "main"\n >> ')
- PEX = io.read()
- if PEX ~= 'main' then
- local comand = '/pex user '..config.admin..' add '..PEX
- runComand(comand)
- end
- end
- function pexRem()
- finalInputMenu(10,'PEX > REM')
- io.write('PEX to remove, or "main"\n >> ')
- PEX = io.read()
- if PEX ~= 'main' then
- local comand = '/pex user '..config.admin..' remove '..PEX
- runComand(comand)
- end
- end
- function enterCommand()
- finalInputMenu(5,'DEBUG > ENTER COMMAND')
- io.write('Console Command or "main"\n >> ')
- local comand = io.read()
- if comand ~= 'main' then
- runComand(comand)
- end
- end
- function resetChatBox()
- chat.setName(config.defaultChatBoxName)
- textColor = '§f'
- end
- function chatBox()
- term.clear()
- g.setResolution(80,2)
- g.setForeground(colors.green)
- resetChatBox()
- while true do
- term.clear()
- g.set(1,1,'CHATBOX : rename cons nick cr kk kk2 spam joke main')
- io.write('\n >> ')
- menuChat = io.read()
- if menuChat == 'cons' then
- chat.setName('§r§dSERVER§7§o')
- textColor = '§d'
- elseif menuChat == 'nick' then
- resetChatBox()
- elseif menuChat == 'rename' then
- term.clear()
- io.write('NEW CHATBOX NAME\n >> ')
- newName = io.read()
- chat.setName('§r'..newName..'§7§o')
- textColor = '§f'
- elseif menuChat == 'spam' then
- spam()
- elseif menuChat == 'kk' then
- kick()
- elseif menuChat == 'kk2' then
- kick2()
- elseif menuChat == 'cr' and particleAccess then
- crash()
- elseif menuChat == 'joke' then
- pcall(joker)
- elseif menuChat == 'main' then
- break
- else
- chat.say(textColor..menuChat)
- end
- end
- end
- function particles()
- finalInputMenu(9,'PARTICLE NAME')
- io.write('Particle, "wiki" or "main"\n >> ')
- menuParticle = io.read()
- if menuParticle ~= 'main' then
- if menuParticle == 'wiki' then
- printLink('http://minecraft-ru.gamepedia.com/Частицы')
- else
- spawn()
- end
- end
- end
- function spawn()
- screen = 'spawn'
- press('clicks')
- term.clear()
- g.setResolution(80,2)
- g.setForeground(colors.green)
- g.set(1,1,'Particle: '..menuParticle)
- g.set(33,1,' [ STOP!! ] ')
- g.set(1,2,'[-][+] [-][+] [-][+] [circle] [default]')
- g.setForeground(colors.gray)
- g.set(8,2,'-- power')
- g.set(24,2,'-- radius')
- g.set(41,2,'-- height')
- spawnDefault()
- end
- function spawnDefault()
- height = 0
- while screen == 'spawn' do
- p.spawn(menuParticle, math.random(-xPart,xPart)-0.5, math.random(-yPart,yPart)+height, math.random(-zPart,zPart)-0.5, 0, 0, 0)
- os.sleep(int)
- end
- end
- function spawn360()
- height = 0
- while screen == 'spawn' do
- for i=0, 360 do
- p.spawn(menuParticle, math.sin(math.rad(i)) * xPart-0.5, height, math.cos(math.rad(i)) * xPart-0.5)
- end
- os.sleep(0.00001)
- end
- end
- function spam()
- chat.setName('§kqwerty')
- term.clear()
- g.set(35,1,'[ STOP!! ]')
- while true do
- local br = ev.pull(0.00001)
- chat.say('§k'..math.random(100)..'qwertyqwertyqwertyqwertyqwerty')
- if br == 'touch' then
- link(35,1,'[ STOP!! ]')
- break
- end
- end
- resetChatBox()
- end
- function crash()
- term.clear()
- g.set(35,1,'[ STOP!! ]')
- while true do
- local br = ev.pull(0.00001)
- p.spawn('smoke',0,0,0,math.huge,math.huge,math.huge)
- if br == 'touch' then
- link(35,1,'[ STOP!! ]')
- break
- end
- end
- end
- function freeze()
- while true do
- local freezePlayer = playersGet('FREEZE')
- fx,fy,fz = dbg.getPlayer(freezePlayer).getPosition()
- if freezePlayer == 'main' then
- break
- else
- g.set(35,1,'[ STOP freezing '..freezePlayer..'! ]')
- while true do
- local br = ev.pull(0.00001)
- pcall(function() dbg.getPlayer(freezePlayer).setPosition(fx,fy,fz) end)
- if br == 'touch' then
- link(35,1,'[ STOP freezing '..freezePlayer..'! ]')
- break
- end
- end
- end
- end
- end
- function longStr()
- local str1 = ''
- local str2 = 'лолкекчебурек'
- for i = 1, 2500 do
- str1 = str1..str2
- end
- return str1
- end
- function kick2()
- term.clear()
- chat.setName(' ')
- g.set(35,1,'[ STOP!! ]')
- local str = longStr()
- while true do
- local br = ev.pull(0.00001)
- chat.say(str)
- if br == 'touch' then
- link(35,1,'[ STOP!! ]')
- break
- end
- end
- local str1 = ''
- resetChatBox()
- end
- function kick()
- chat.setName(' ')
- local str = longStr()
- chat.say(str)
- resetChatBox()
- end
- function tellrawKick(player)
- local str = longStr()
- dbg.runCommand('/tellraw '..player..' '..str)
- end
- function tellrawKickInput()
- while true do
- local kickPlayer = playersGet('KICK')
- if kickPlayer == 'main' then
- break
- else
- tellrawKick(kickPlayer)
- end
- end
- end
- function onTimer()
- local pls = r.getPlayers()
- chat.setName('§r§eАнтиВаниш§7§o')
- for a = 1,#pls do
- if pls[a].name ~= config.admin then chat.say('§4'..pls[a].name..' §e('..math.floor(pls[a].distance)..' m.)') end
- end
- resetChatBox()
- end
- function joker()
- chat.setName('§r§4Шутник§63000§7§o')
- if #frases ~= 0 then
- for i = 1, genJoke.jokeLen do
- table.insert(genJoke,frases[math.random(#frases)])
- end
- local joke = ' --> '..table.concat(genJoke,' ')..'))0'
- chat.say(joke)
- genJoke = { }
- else
- chat.say(' --> Чтобы сгенерировать шутку, добавьте набор фраз через запятую в массив frases = { "фраза1", "фраза2" }')
- end
- resetChatBox()
- end
- function dialog(_,_,who,message)
- if string.match(message,'сервер') ~= nil then
- chat.setName('§r§dSERVER§7§o')
- os.sleep(1)
- chat.say('§dЧего тебе, '..who..'?')
- resetChatBox()
- elseif string.match(message,'сасай') ~= nil then
- chat.setName('§r§dSERVER§7§o')
- os.sleep(1)
- chat.say('§dокай...')
- resetChatBox()
- elseif message == 'who' and who == config.admin and radarAccess then
- chat.setName('§r§eАнтиВаниш§7§o')
- local pl = r.getPlayers()
- for p = 1, #pl do
- if pl[p].name ~= config.admin then
- chat.say('§4'..pl[p].name..' §e('..math.floor(pl[p].distance)..' m.)')
- end
- end
- resetChatBox()
- elseif message == 'whereON' and who == config.admin and radarAccess then
- chat.setName('§r§eАнтиВаниш§7§o')
- chat.say('радар включён...')
- timer = ev.timer(radarSleep,onTimer,math.huge)
- elseif message == 'whereOFF' and who == config.admin and radarAccess then
- chat.setName('§r§eАнтиВаниш§7§o')
- chat.say('радар выключен...')
- resetChatBox()
- ev.cancel(timer)
- end
- end
- function autoCompletePlayer(line)
- rs = { }
- for i = 1, #players do
- s = players[i]:find(line)
- if s == 1 then
- table.insert(rs, players[i])
- end
- end
- return rs
- end
- function playersGet(playerAction)
- term.clear()
- g.setResolution(80,25)
- os.sleep(0.00001)
- g.setForeground(colors.green)
- g.fill(1,4,80,1,'─')
- g.fill(1,4,80,1,'─')
- g.set(2,3,'* enter "main" for back...')
- g.setForeground(colors.white)
- players = dbg.getPlayers()
- local startX = 1
- local startY = 4
- for i=1, #players do g.set(startX,startY+i,i..'. '..players[i])
- if i == 20 then startX = 22 startY = -16
- elseif i == 40 then startX = 44 startY = -36
- elseif i == 60 then startX = 64 startY = -56
- end
- end
- g.setForeground(colors.green)
- print('NICK FOR '..playerAction..' (can use TAB)\n >> ')
- term.setCursor(5,2)
- local targetPlayer = term.read({}, false, autoCompletePlayer):gsub("\n", "")
- return targetPlayer
- end
- function playerInfo()
- plInf = playersGet('INFO')
- if plInf ~= 'main' then
- term.clear()
- g.setResolution(w,h)
- hp = dbg.getPlayer(plInf).getHealth()
- if hp == nil then
- print('Player "'..plInf..'" is offline')
- os.sleep(2)
- else
- while true do
- local dim = dbg.getPlayer(plInf).getWorld().getDimensionName()
- local dimId = dbg.getPlayer(plInf).getWorld().getDimensionId()
- local gm = dbg.getPlayer(plInf).getGameType()
- local maxHp = dbg.getPlayer(plInf).getMaxHealth()
- local x,y,z = dbg.getPlayer(plInf).getPosition()
- local xM,yM,zM = getMyCoords()
- local dist = math.sqrt((x-xM)^2+(y-yM)^2+(z-zM)^2)
- term.clear()
- g.fill(1,2,30,1,'─')
- print(' >> Info about '..plInf..':\n\nHealth: '..math.floor(hp)..'/'..maxHp..'\nDIM: '..dim..' ('..dimId..')\nGM: '..gm..'\nX >> '..math.floor(x)..'\nY >> '..math.floor(y)..'\nZ >> '..math.floor(z)..'\ndist >> '..math.floor(dist)..'\n\nPress "R" for refresh,\nor any key to exit...')
- local _,_,_,key = ev.pull('key_down')
- if key ~= 19 then
- break
- end
- end
- end
- end
- end
- function tpa()
- local plTpa = playersGet('TPA')
- if plTpa ~= 'main' then
- term.setCursor(1,2)
- term.clearLine()
- io.write('X >> ')
- local x = io.read()
- term.setCursor(12,2)
- io.write('Y >> ')
- local y = io.read()
- term.setCursor(24,2)
- io.write('Z >> ')
- local z = io.read()
- pcall(function() dbg.getPlayer(plTpa).setPosition(tonumber(x),tonumber(y),tonumber(z)) end)
- end
- end
- function tpaMe()
- finalInputMenu(7,'COORDS FOR TPAME')
- io.write('X or "main" >> ')
- local x = io.read()
- if x ~= 'main' then
- io.write('Y >> ')
- local y = io.read()
- io.write('Z >> ')
- local z = io.read()
- pcall(function() dbg.getPlayer(config.admin).setPosition(tonumber(x),tonumber(y),tonumber(z)) end)
- end
- end
- function tpaMeTo()
- while true do
- local plTpaMe = playersGet('TPAMETO')
- if plTpaMe == 'main' then
- break
- else
- pcall(function() local x,y,z = dbg.getPlayer(plTpaMe).getPosition() if config.yCorrector then yCor = 100 else yCor = 0 end dbg.getPlayer(config.admin).setPosition(x,y+yCor,z) end)
- end
- end
- end
- function tpaHere()
- local plTpaHere = playersGet('TPAHERE')
- if plTpaHere ~= 'main' then
- pcall(function() local x,y,z = dbg.getPlayer(config.admin).getPosition() dbg.getPlayer(plTpaHere).setPosition(x,y,z) end)
- end
- end
- function tpaPtoP()
- local plForTp = playersGet('TP')
- if plForTp ~= 'main' then
- local plForTpAccept = playersGet('TPACCEPT')
- pcall(function() local x,y,z = dbg.getPlayer(plForTpAccept).getPosition() if config.yCorrector then yCor = 100 else yCor = 0 end dbg.getPlayer(plForTp).setPosition(x,y+yCor,z) end)
- end
- end
- function setHp()
- local plSetHp = playersGet('SETHP')
- if plSetHp ~= 'main' then
- term.clearLine()
- io.write('HEALTH >> ')
- local hp = io.read()
- pcall(function() dbg.getPlayer(plSetHp).setHealth(tonumber(hp)) end)
- end
- end
- function targetting(action,x,y,z)
- if not action then
- if not config.targetting then
- return x,y,z
- end
- end
- local key = 0
- term.clear()
- g.setResolution(w,4)
- g.setForeground(colors.gray)
- g.set(15,1,'(+x) to East')
- g.set(8,2,'(-z)')
- g.set(15,2,'(-x)')
- g.set(22,2,'(+z)')
- g.set(7,3,'(-y)')
- g.set(18,3,'(+y)')
- g.set(1,4,'X: Y: Z:')
- g.setForeground(colors.green)
- g.set(13,1,'W') -- + x (17)
- g.set(6,2,'A') -- - z (30)
- g.set(13,2,'S') -- - x (31)
- g.set(20,2,'D') -- + z (32)
- g.set(1,3,'SHIFT') -- - y (42)
- g.set(12,3,'SPACE') -- + y (57)
- g.set(23,3,'ENTER-->') -- exit (28)
- while true do
- if action then
- x, y, z = getMyCoords()
- end
- if key == 28 then
- if action then
- term.clear()
- g.setResolution(w,h)
- break
- else
- term.clear()
- g.setResolution(w,h)
- return x,y,z
- end
- elseif key == 17 then
- x = x + 1
- if action then
- dbg.getPlayer(config.admin).setPosition(x,y,z)
- end
- elseif key == 30 then
- z = z - 1
- if action then
- dbg.getPlayer(config.admin).setPosition(x,y,z)
- end
- elseif key == 31 then
- x = x - 1
- if action then
- dbg.getPlayer(config.admin).setPosition(x,y,z)
- end
- elseif key == 32 then
- z = z + 1
- if action then
- dbg.getPlayer(config.admin).setPosition(x,y,z)
- end
- elseif key == 42 then
- y = y - 1
- if action then
- dbg.getPlayer(config.admin).setPosition(x,y,z)
- end
- elseif key == 57 then
- y = y + 1
- if action then
- dbg.getPlayer(config.admin).setPosition(x,y,z)
- end
- end
- g.set(3,4,tostring(math.floor(x))..' ')
- g.set(13,4,tostring(math.floor(y))..' ')
- g.set(23,4,tostring(math.floor(z))..' ')
- _,_,_,key = ev.pull('key_down')
- end
- end
- function getCoords(coordsAction)
- io.write('X or "m", "p" >> ')
- Gx = io.read()
- if Gx == 'm' then
- return targetting(false,getMyCoords())
- elseif Gx == 'p' then
- local plC = playersGet(coordsAction)
- local Px, Py, Pz = dbg.getPlayer(plC).getPosition()
- if Px == nil then
- term.clearLine()
- print(' >> Player "'..plC..'" is offline')
- os.sleep(2)
- term.clear()
- g.setResolution(w,h)
- else
- term.clear()
- g.setResolution(w,h)
- return targetting(false,Px,Py,Pz)
- end
- else
- Gx = tonumber(Gx)
- io.write('Y >> ')
- Gy = tonumber(io.read())
- io.write('Z >> ')
- Gz = tonumber(io.read())
- if not Gx or not Gy or not Gz then
- print('Uncorrect Input!')
- os.sleep(2)
- return nil, nil, nil
- else
- return targetting(false,Gx,Gy,Gz)
- end
- end
- end
- function getMyCoords()
- local Mx, My, Mz = dbg.getPlayer(config.admin).getPosition()
- return math.floor(Mx), math.floor(My), math.floor(Mz)
- end
- function yn()
- local _,_,_,key = ev.pull('key_down')
- if key == 21 then
- return true
- else
- return false
- end
- end
- function setBlock()
- finalInputMenu(7,'WORLD > SETBLOCK')
- io.write('ID or "main" >> ')
- id = io.read()
- if id ~= 'main' then
- io.write('META >> ')
- meta = io.read()
- x, y, z = getCoords('SETBLOCK ID:'..id..', META:'..meta)
- end
- local result = pcall(function() dbg.getWorld().setBlock(math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z)),tonumber(id),tonumber(meta)) end)
- if result then
- print('Clear? y/n')
- if yn() then
- dbg.getWorld().setBlock(math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z)),0,0)
- end
- end
- end
- function setBlocks()
- finalInputMenu(6,'WORLD > SETBLOCKS')
- io.write('ID or "main" >> ')
- id = io.read()
- if id ~= 'main' then
- io.write('META >> ')
- meta = io.read()
- print('1st POINT:')
- xMin, yMin, zMin = getCoords('1st POINT FOR SETBLOCKS ID:'..id..', META:'..meta)
- print('2nd POINT:')
- xMax, yMax, zMax = getCoords('2nd POINT FOR SETBLOCKS ID:'..id..', META:'..meta)
- local result = pcall(function() dbg.getPlayer(config.admin).getWorld().setBlocks(math.floor(tonumber(xMin)),math.floor(tonumber(yMin)),math.floor(tonumber(zMin)),math.floor(tonumber(xMax)),math.floor(tonumber(yMax)),math.floor(tonumber(zMax)),tonumber(id),tonumber(meta)) end)
- if result then
- print('Clear? y/n')
- if yn() then
- dbg.getWorld().setBlocks(math.floor(tonumber(xMin)),math.floor(tonumber(yMin)),math.floor(tonumber(zMin)),math.floor(tonumber(xMax)),math.floor(tonumber(yMax)),math.floor(tonumber(zMax)),0,0)
- end
- end
- end
- end
- function remItem()
- finalInputMenu(8,'WORLD > REMITEM')
- io.write('SLOT or "main" >> ')
- slot = io.read()
- if slot ~= 'main' then
- io.write('COUNT >> ')
- count = io.read()
- x, y, z = getCoords('REMITEM')
- pcall(function() dbg.getWorld().removeItem(math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z)),tonumber(slot),tonumber(count)) end)
- end
- end
- function insItem()
- finalInputMenu(8,'WORLD > INSITEM')
- io.write('ID (String) or "main"\n >> ')
- id = io.read()
- if id ~= 'main' then
- io.write('DAMAGE >> ')
- dmg = io.read()
- io.write('NBT (JSON) >> ')
- tags = io.read()
- io.write('COUNT >> ')
- count = io.read()
- x, y, z = getCoords('INSITEM')
- pcall(function() dbg.getWorld().insertItem(id,tonumber(count),tonumber(dmg),tags,math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z)),1) end)
- end
- end
- function insItems()
- finalInputMenu(7,'WORLD > INSITEMS')
- io.write('ID (String) or "main"\n >> ')
- id = io.read()
- if id ~= 'main' then
- io.write('DAMAGE >> ')
- dmg = io.read()
- io.write('SLOTS FOR INS >> ')
- slots = io.read()
- x, y, z = getCoords('INSITEMS')
- pcall(function() for i = 1, tonumber(slots) do dbg.getWorld().insertItem(id,64,tonumber(dmg),'',math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z)),1) end end)
- end
- end
- function nbts()
- finalInputMenu(9,'WORLD > GETNBT')
- io.write('FILENAME or "main"\n >> ')
- fn = io.read()
- if fn ~= 'main' then
- x, y, z = getCoords('NBT')
- print('"1" - getNbt, "2" - setNbt')
- local _,_,_,key = ev.pull('key_down')
- if key == 2 then
- local result = pcall(function() nbt = dbg.getWorld().getTileNBT(math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z))) file = io.open('/'..fn,'w'):write(ser.serialize(nbt,false)):flush():close() end)
- if result then
- print('Saved in "/'..fn..'"\n\n"1" - edit, "2" - pastebin,\n"3" - copy to clipboard,\nor press any key for exit...')
- local _,_,_,key = ev.pull('key_down')
- if key == 2 then
- g.setResolution(xOld,yOld)
- os.sleep(0.00001)
- os.execute('edit /'..fn)
- print('Set nbt at current pos? y/n')
- if yn() then
- local result = pcall(function() file = io.open('/'..fn,'r') local cr = ser.unserialize(file:read(fs.size('/'..fn))) file:close() dbg.getWorld().setTileNBT(math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z)),cr) end)
- if result then
- print('\nNBT setted from "/'..fn..'"')
- os.sleep(2)
- end
- end
- elseif key == 3 then
- if av('internet') then
- term.clear()
- g.setResolution(xOld,yOld)
- os.sleep(0.00001)
- g.setForeground(colors.white)
- os.execute('pastebin put /'..fn)
- g.setForeground(colors.green)
- print('\n\npress any key...')
- ev.pull('key_down')
- else
- print('\nNot found internet card!')
- os.sleep(2)
- end
- elseif key == 4 then
- local result = pcall(function() local toSend = ser.serialize(nbt) dbg.sendToClipboard(config.admin,toSend:gsub('\"',"'")) end)
- if result then
- print('Success!')
- else
- print('Fail...(')
- end
- os.sleep(2)
- end
- end
- elseif key == 3 then
- print('"/'..fn..'": "1" - edit,\nor any key for load...')
- local _,_,_,key = ev.pull('key_down')
- if key == 2 then
- g.setResolution(xOld,yOld)
- os.sleep(0.00001)
- os.execute('edit /'..fn)
- g.setResolution(w,h)
- os.sleep(0.00001)
- end
- local result = pcall(function() file = io.open('/'..fn,'r') local cr = ser.unserialize(file:read(fs.size('/'..fn))) file:close() dbg.getWorld().setTileNBT(math.floor(tonumber(x)),math.floor(tonumber(y)),math.floor(tonumber(z)),cr) end)
- if result then
- print('NBT setted from "/'..fn..'"')
- os.sleep(2)
- end
- end
- end
- end
- function signsSet(toDo)
- term.clear()
- if toDo == 1 then
- io.write('FREE ID > ')
- local id = io.read()
- text1 = '§1[free]'
- text2 = id
- text3 = ''
- text4 = ''
- elseif toDo == 2 then
- io.write('BUY ID > ')
- local id = io.read()
- text1 = '§1[buy]'
- text2 = '64'
- text3 = id
- text4 = '$1'
- elseif toDo == 3 then
- io.write('TEXT1 > ')
- text1 = io.read()
- io.write('TEXT2 > ')
- text2 = io.read()
- io.write('TEXT3 > ')
- text3 = io.read()
- io.write('TEXT4 > ')
- text4 = io.read()
- elseif toDo == 4 then
- io.write('GATE ID > ')
- local id = io.read()
- io.write('GATE COUNT > ')
- local count = io.read()
- text1 = id
- text2 = '[Gate]'
- text3 = ''
- text4 = count
- end
- pcall(setSignText)
- end
- function setSignText()
- local x,y,z = getMyCoords()
- local signNbt = dbg.getWorld().getTileNBT(x,y,z)
- signNbt.value.Text1.value = text1
- signNbt.value.Text2.value = text2
- signNbt.value.Text3.value = text3
- signNbt.value.Text4.value = text4
- dbg.getWorld().setTileNBT(x,y,z,signNbt)
- end
- function runComand(comand)
- local pls = dbg.getPlayers()
- local randPl = pls[math.random(pls.n)]
- local d = dbg.getPlayer(randPl).getWorld()
- local posX,_,posZ = dbg.getPlayer(randPl).getPosition()
- posX, posZ = math.floor(posX+cbCor), math.floor(posZ+cbCor)
- d.setBlock(posX,0,posZ,137,0)
- local nbtCB = d.getTileNBT(posX,0,posZ)
- nbtCB.value.Command.value = comand
- nbtCB.value.CustomName.value = 'Console'
- d.setTileNBT(posX,0,posZ,nbtCB)
- d.setBlock(posX,1,posZ,152,0)
- os.sleep(0.5)
- d.setBlocks(posX,0,posZ,posX,1,posZ,7,0)
- end
- function keyController(_,_,_,code)
- if code == 18 then
- hide()
- elseif code == 30 then
- admins()
- elseif code == 16 then
- main()
- elseif code == 17 then
- warps()
- end
- end
- function install()
- term.clear()
- g.setResolution(w,h)
- g.setForeground(colors.green)
- g.fill(1,1,30,15,'░')
- g.set(11,6,'//TOUCH//')
- local _,_,_,_,_,ownerNick = ev.pull('touch')
- config = { admin = ownerNick, defaultChatBoxName = '§r§k|:|§r§2'..ownerNick..'§r§k|:|§r§7§o', admins = {}, warps = {}, activeAutorun = false, activeProtection = true, yCorrector = true, targetting = false }
- conf_S()
- g.set(5,9,'Welcome, '..config.admin..'!')
- os.sleep(2)
- end
- function conf_S()
- local file = io.open(configPath,'w')
- file:write(ser.serialize(config,false)):flush():close()
- end
- function conf_R()
- local file = io.open(configPath,'r')
- config = ser.unserialize(file:read(fs.size(configPath)))
- file:close()
- end
- function lockPress()
- ev.ignore('touch',clicker)
- ev.ignore('key_down',keyController)
- end
- function press(act)
- if act == 'keys' then
- lockPress()
- ev.listen('key_down',keyController)
- elseif act == 'clicks' then
- lockPress()
- ev.listen('touch',clicker)
- elseif act == 'lock' then
- lockPress()
- else
- lockPress()
- ev.listen('touch',clicker)
- ev.listen('key_down',keyController)
- end
- end
- function link(bX,bY,button)
- g.setForeground(colors.red)
- g.set(bX,bY,button)
- os.sleep(0.3)
- g.setForeground(colors.green)
- g.set(bX,bY,button)
- end
- function hide()
- screen = 'hide'
- press('clicks')
- g.setForeground(colors.gray)
- g.set(30,1,'|||||HIDE||||||',true)
- os.sleep(0.2)
- term.clear()
- g.fill(1,1,30,15,'░')
- end
- function accessDenied(checkNick)
- if config.activeProtection then
- press('lock')
- term.clear()
- g.setResolution(w,h)
- g.setForeground(colors.red)
- g.fill(1,1,30,15,'░')
- g.set(7,6,'ACCESS DENIED!!!')
- g.set(10,9,'GOODBYE...')
- dbg.getPlayer(checkNick).setHealth(0)
- os.sleep(1)
- if particleAccess then
- p.spawn('smoke',0,0,0,math.huge,math.huge,math.huge)
- end
- tellrawKick(checkNick)
- comp.shutdown()
- end
- end
- function keysProtector(_,_,_,_,onKey)
- if onKey ~= config.admin then
- accessDenied(onKey)
- end
- end
- function touchProtector(_,_,_,_,_,onTouch)
- if onTouch ~= config.admin then
- accessDenied(onTouch)
- end
- end
- function settings()
- screen = 'setts'
- finalMenu(7,'DEBUG > SETTINGS ')
- g.set(3,3,'AUTORUN')
- g.set(3,5,'USER PROTECT')
- g.set(3,7,'Y + 100 (TPA)')
- g.set(3,9,'TARGETTING')
- g.set(3,11,'[KEYBINDS]')
- g.setForeground(colors.gray)
- g.set(23,3,'▒▒▒▒')
- g.set(23,5,'▒▒▒▒')
- g.set(23,7,'▒▒▒▒')
- g.set(23,9,'▒▒▒▒')
- if config.activeAutorun then
- g.setForeground(colors.green)
- g.set(25,3,'██')
- else
- g.setForeground(colors.gray)
- g.set(23,3,'██')
- end
- if config.activeProtection then
- g.setForeground(colors.green)
- g.set(25,5,'██')
- else
- g.setForeground(colors.gray)
- g.set(23,5,'██')
- end
- if config.yCorrector then
- g.setForeground(colors.green)
- g.set(25,7,'██')
- else
- g.setForeground(colors.gray)
- g.set(23,7,'██')
- end
- if config.targetting then
- g.setForeground(colors.green)
- g.set(25,9,'██')
- else
- g.setForeground(colors.gray)
- g.set(23,9,'██')
- end
- end
- function saveAutorun()
- local scriptPath = debug.getinfo(2,'S').short_src
- local file = io.open(autorunPath,'w')
- file:write('os.sleep(1) os.execute("'..scriptPath..'")'):flush():close()
- end
- function swich(toSwich)
- if toSwich == 'autorun' then
- if config.activeAutorun then
- config.activeAutorun = false
- fs.remove(autorunPath)
- else
- config.activeAutorun = true
- saveAutorun()
- end
- elseif toSwich == 'protection' then
- if config.activeProtection then
- config.activeProtection = false
- else
- config.activeProtection = true
- end
- elseif toSwich == 'yCorrector' then
- if config.yCorrector then
- config.yCorrector = false
- else
- config.yCorrector = true
- end
- elseif toSwich == 'targetting' then
- if config.targetting then
- config.targetting = false
- else
- config.targetting = true
- end
- end
- conf_S()
- end
- function swichGamemode(gmm)
- g.setForeground(colors.red)
- if gmm == 1 then
- g.set(7,7, 'Y/N?')
- else
- g.set(7,9, 'Y/N?')
- end
- if yn() then
- runComand('/gamemode '..gmm..' '..config.admin)
- end
- end
- function imbPotion()
- local potionJson = '{CustomPotionEffects:[{Id:5,Amplifier:5500,Duration:100000000},{Id:6,Amplifier:5500,Duration:100000000},{Id:11,Amplifier:5500,Duration:100000000},{Id:12,Amplifier:5500,Duration:100000000},{Id:13,Amplifier:5500,Duration:100000000},{Id:23,Amplifier:5500,Duration:100000000}],display:{Name:§r§l§aТо что доктор прописал}}'
- local x,y,z = getMyCoords()
- dbg.getPlayer(config.admin).getWorld().insertItem('minecraft:potion',1,16,potionJson,x,y,z,1)
- end
- function dayrain()
- if dbg.getWorld().isRaining() then
- dbg.getWorld().setRaining(false)
- else
- dbg.getWorld().setTime(dbg.getWorld().getTime()+12000)
- end
- end
- function printLink(link)
- local result = pcall(function() dbg.sendToClipboard(config.admin,link) end)
- if result then
- print('\n'..link..'\n(copied in ClipBoard)\n\nPress any key...')
- else
- print('\n'..link..'\n\nPress any key...')
- end
- ev.pull('key_down')
- end
- function summon()
- while true do
- finalInputMenu(8,'WORLD > SUMMON')
- io.write('MobName, "wiki" or "main"\n >> ')
- local mob = io.read()
- if mob == 'main' then
- break
- elseif mob == 'wiki' then
- printLink('http://minecraft-ru.gamepedia.com/Участник:DrakD/Summon')
- else
- io.write('Count >> ')
- local count = tonumber(io.read())
- if count == nil then
- count = 1
- end
- io.write('JSON for '..mob..' >> ')
- local mobJson = io.read()
- local x, y, z = getCoords('SUMMON '..mob)
- local online = dbg.getPlayers()
- local checkAdm = true
- for i = 1, #online do
- local onePl = online[i]
- for c = 1, #config.admins do
- local oneAdm = config.admins[c]
- if onePl == oneAdm then
- checkAdm = false
- break
- end
- end
- if not checkAdm then
- break
- end
- end
- if checkAdm then
- for i = 1, count do
- res1 = pcall(function() _,res2 = dbg.runCommand('/summon '..mob..' '..x..' '..y..' '..z..' '..mobJson) end)
- end
- if res1 then
- print(res2)
- os.sleep(2)
- end
- else
- print('Break! Admin online...')
- os.sleep(2)
- end
- end
- end
- end
- function menuSounds()
- while true do
- finalInputMenu(8,'WORLD > SOUND')
- io.write('SoundName, "wiki" or "main"\n >> ')
- local sound = io.read()
- if sound == 'main' then
- break
- elseif sound == 'wiki' then
- printLink('http://www.gkrond.ru/Articles/Read/2/Imena_zvukov_i_rabota_komandy_playsound.html')
- else
- local x,y,z = getCoords('PLAY SOUND')
- pcall(function() dbg.getWorld().playSoundAt(x,y,z,sound,500) end)
- end
- end
- end
- function meow()
- g.setForeground(colors.green)
- g.set(17,1,'MEOW')
- local x,y,z = getMyCoords()
- dbg.getWorld().playSoundAt(x,y,z,'mob.cat.meow',100)
- g.setForeground(colors.white)
- g.set(17,1,'MAIN')
- end
- function clipBoard()
- clipToPlayer = ''
- while true do
- finalInputMenu(6,'PLAYER > CLIPBRD')
- io.write('Text, "pl" or "main"\n >> ')
- local text = io.read()
- if text == 'main' then
- break
- elseif text == 'pl' then
- clipToPlayer = playersGet('CLIPBRD')
- g.setResolution(w,h)
- else
- local result = pcall(function() dbg.sendToClipboard(clipToPlayer,text) end)
- end
- end
- end
- function keybinds()
- screen = 'keyb'
- finalMenu(6,'SETTINGS > KEYBINDS')
- g.set(10,4, 'MAIN [Q]')
- g.set(10,6, 'ADMINS [A]')
- g.set(10,8, 'HIDE [E]')
- g.set(10,10,'WARPS [W]')
- end
- function clicker(_,_,xC,yC)
- if xC >= 1 and yC >= 1 and screen == 'hide' then main()
- elseif xC == 30 and yC <= 15 and screen ~= 'spawn' then hide()
- elseif xC >= 26 and xC <= 30 and yC == 15 then link(26,yC,'EXIT') work = false
- elseif xC >= 1 and xC <= 6 and yC == 15 then link(2,yC,'MAIN') main()
- elseif xC >= 27 and xC <= 29 and yC == 1 and screen ~= 'setts' and screen ~= 'spawn' then link(27,yC,'[*]') settings()
- elseif xC >= 7 and xC <= 12 and yC == 3 and screen == 'main' then link(7,yC,'WORLD') world()
- elseif xC >= 17 and xC <= 20 and yC == 1 and screen == 'main' then meow()
- elseif xC >= 7 and xC <= 12 and yC == 5 and screen == 'main' then link(7,yC,'PLAYER') player()
- elseif xC >= 7 and xC <= 10 and yC == 7 and screen == 'main' then link(7,yC,'GM 1') press('lock') swichGamemode(1) main()
- elseif xC >= 7 and xC <= 10 and yC == 9 and screen == 'main' then link(7,yC,'GM 0') press('lock') swichGamemode(0) main()
- elseif xC >= 7 and xC <= 11 and yC == 11 and screen == 'main' and chatAccess then link(7,yC,'CHAT') press('lock') chatBox() main()
- elseif xC >= 20 and xC <= 24 and yC == 3 and screen == 'main' then link(20,yC,'WARPS') warps()
- elseif xC >= 14 and xC <= 17 and yC == 15 and screen ~= 'admns' then link(14,yC,'ADMS') admins()
- elseif xC >= 20 and xC <= 25 and yC == 1 and screen == 'admns' then link(20,yC,'[SCAN]') adminScan() admins()
- elseif xC >= 14 and xC <= 17 and yC == 15 and screen == 'admns' then link(14,yC,'EDIT') editAdmins()
- elseif xC >= 20 and xC <= 26 and yC == 5 and screen == 'main' then link(20,yC,'PEX ADD') press('lock') pexAdd() main()
- elseif xC >= 20 and xC <= 26 and yC == 7 and screen == 'main' then link(20,yC,'PEX REM') press('lock') pexRem() main()
- elseif xC >= 20 and xC <= 25 and yC == 9 and screen == 'main' then link(20,yC,'NOCLIP') press('lock') targetting(true) main()
- elseif xC >= 20 and xC <= 24 and yC == 11 and screen == 'main' and particleAccess then link(20,11,'PARTS') press('lock') particles() main()
- elseif xC >= 7 and xC <= 24 and yC == 13 and screen == 'main' then link(7,yC,'CONSOLE COMMAND >>') press('lock') enterCommand() main()
- elseif xC >= 7 and xC <= 10 and yC == 3 and screen == 'playr' then link(7,yC,'INFO') press('lock') playerInfo() main()
- elseif xC >= 7 and xC <= 10 and yC == 5 and screen == 'playr' then link(7,yC,'TPA') press('lock') tpa() main()
- elseif xC >= 7 and xC <= 11 and yC == 7 and screen == 'playr' then link(7,yC,'TPAME') press('lock') tpaMe() main()
- elseif xC >= 7 and xC <= 13 and yC == 9 and screen == 'playr' then link(7,yC,'TPAMETO') press('lock') tpaMeTo() main()
- elseif xC >= 7 and xC <= 12 and yC == 11 and screen == 'playr' then link(7,yC,'FREEZE') press('lock') freeze() main()
- elseif xC >= 20 and xC <= 26 and yC == 3 and screen == 'playr' then link(20,yC,'TPAHERE') press('lock') tpaHere() main()
- elseif xC >= 20 and xC <= 26 and yC == 5 and screen == 'playr' then link(20,yC,'TPAPTOP') press('lock') tpaPtoP() main()
- elseif xC >= 20 and xC <= 24 and yC == 7 and screen == 'playr' then link(20,yC,'SETHP') press('lock') setHp() main()
- elseif xC >= 20 and xC <= 26 and yC == 9 and screen == 'playr' then link(20,yC,'CLIPBRD') press('lock') clipBoard() main()
- elseif xC >= 20 and xC <= 26 and yC == 11 and screen == 'playr' then link(20,yC,'KICK') press('lock') tellrawKickInput() main()
- elseif xC >= 7 and xC <= 14 and yC == 3 and screen == 'world' then link(7,yC,'SETBLOCK') press('lock') setBlock() main()
- elseif xC >= 7 and xC <= 15 and yC == 5 and screen == 'world' then link(7,yC,'SETBLOCKS') press('lock') setBlocks() main()
- elseif xC >= 7 and xC <= 13 and yC == 7 and screen == 'world' then link(7,yC,'REMITEM') press('lock') remItem() main()
- elseif xC >= 7 and xC <= 13 and yC == 9 and screen == 'world' then link(7,yC,'INSITEM') press('lock') insItem() main()
- elseif xC >= 7 and xC <= 13 and yC == 11 and screen == 'world' then link(7,yC,'DAYRAIN') dayrain()
- elseif xC >= 7 and xC <= 12 and yC == 13 and screen == 'world' then link(7,yC,'SUMMON') press('lock') summon() main()
- elseif xC >= 20 and xC <= 27 and yC == 3 and screen == 'world' then link(20,yC,'INSITEMS') press('lock') insItems() main()
- elseif xC >= 20 and xC <= 23 and yC == 5 and screen == 'world' then link(20,yC,'NBTS') press('lock') nbts() main()
- elseif xC >= 20 and xC <= 24 and yC == 7 and screen == 'world' then link(20,yC,'SIGNS') signsMenu()
- elseif xC >= 20 and xC <= 28 and yC == 9 and screen == 'world' then link(20,yC,'IMBPOTION') imbPotion()
- elseif xC >= 20 and xC <= 25 and yC == 11 and screen == 'world' then link(20,yC,'SOUNDS') press('lock') menuSounds() main()
- elseif xC >= 7 and xC <= 10 and yC == 3 and screen == 'signs' then link(7,yC,'FREE') press('lock') signsSet(1) press() signsMenu()
- elseif xC >= 7 and xC <= 9 and yC == 5 and screen == 'signs' then link(7,yC,'BUY') press('lock') signsSet(2) press() signsMenu()
- elseif xC >= 7 and xC <= 10 and yC == 7 and screen == 'signs' then link(7,yC,'SELL') text1 = '§1[sell]' text2 = '1' text3 = '4' text4 = '$50' pcall(setSignText) signsMenu()
- elseif xC >= 7 and xC <= 15 and yC == 9 and screen == 'signs' then link(7,yC,'DISPENSER') text1 = '§3[dispenser]' text2 = '' text3 = '' text4 = '' pcall(setSignText) signsMenu()
- elseif xC >= 7 and xC <= 14 and yC == 11 and screen == 'signs' then link(7,yC,'CREATIVE') text1 = '§1[gamemode]' text2 = 'creative' text3 = '' text4 = '' pcall(setSignText) signsMenu()
- elseif xC >= 7 and xC <= 10 and yC == 13 and screen == 'signs' then link(7,yC,'GATE') press('lock') signsSet(4) press() signsMenu()
- elseif xC >= 20 and xC <= 23 and yC == 3 and screen == 'signs' then link(20,yC,'EDIT') press('lock') signsSet(3) press() signsMenu()
- elseif xC >= 20 and xC <= 24 and yC == 5 and screen == 'signs' then link(20,yC,'CLEAR') text1 = '' text2 = '' text3 = '' text4 = '' pcall(setSignText) signsMenu()
- elseif xC >= 23 and xC <= 26 and yC == 3 and screen == 'setts' then swich('autorun') settings()
- elseif xC >= 23 and xC <= 26 and yC == 5 and screen == 'setts' then swich('protection') settings()
- elseif xC >= 23 and xC <= 26 and yC == 7 and screen == 'setts' then swich('yCorrector') settings()
- elseif xC >= 23 and xC <= 26 and yC == 9 and screen == 'setts' then swich('targetting') settings()
- elseif xC >= 3 and xC <= 12 and yC == 11 and screen == 'setts' then link(3,yC,'[KEYBINDS]') keybinds()
- elseif xC >= 27 and xC <= 29 and yC == 2 and screen == 'warps' and #config.warps < 12 then link(27,yC,'[+]') press('lock') addWarp() press() warps()
- elseif xC >= 27 and xC <= 29 and yC == 2 and screen == 'edadm' then link(27,yC,'[+]') press('lock') addAdmin() press() editAdmins()
- elseif xC >= 1 and xC <= 25 and screen == 'warps' and yC >= 3 and (yC - 2) <= #config.warps then link(1,yC,'>') local warpId = yC - 2 teleportToWarp(warpId) warps()
- elseif xC == 28 and screen == 'warps' and yC >= 3 and (yC - 2) <= #config.warps then link(28,yC,'x') local warpId = yC - 2 table.remove(config.warps,warpId) conf_S() warps()
- elseif xC == 28 and screen == 'edadm' and yC >= 3 and (yC - 2) <= #config.admins then link(28,yC,'x') local admId = yC - 2 table.remove(config.admins,admId) conf_S() editAdmins()
- elseif xC >= 35 and xC <= 44 and yC == 1 and screen == 'spawn' then link(35,yC,'[ STOP!! ]') screen = 'stop'
- elseif xC >= 1 and xC <= 3 and yC == 2 and screen == 'spawn' then link(1,yC,'[-]') int = int + 0.05
- elseif xC >= 4 and xC <= 6 and yC == 2 and screen == 'spawn' then link(4,yC,'[+]') int = int * 0.1
- elseif xC >= 17 and xC <= 19 and yC == 2 and screen == 'spawn' then link(17,yC,'[-]') xPart = xPart - 1 yPart = yPart - 1 zPart = zPart - 1 if xPart <= 0 then xPart = 0 yPart = 0 zPart = 0 end
- elseif xC >= 20 and xC <= 22 and yC == 2 and screen == 'spawn' then link(20,yC,'[+]') xPart = xPart + 1 yPart = yPart + 1 zPart = zPart + 1
- elseif xC >= 34 and xC <= 36 and yC == 2 and screen == 'spawn' then link(34,yC,'[-]') height = height - 1
- elseif xC >= 37 and xC <= 39 and yC == 2 and screen == 'spawn' then link(37,yC,'[+]') height = height + 1
- elseif xC >= 51 and xC <= 58 and yC == 2 and screen == 'spawn' then link(51,yC,'[circle]') spawn360()
- elseif xC >= 60 and xC <= 68 and yC == 2 and screen == 'spawn' then link(60,yC,'[default]') spawnDefault()
- end
- end
- function run()
- if fs.exists(configPath) then
- conf_R()
- else
- install()
- end
- ev.listen('touch',touchProtector)
- ev.listen('key_down',keysProtector)
- main()
- while work do
- os.sleep(0.1)
- end
- exit()
- end
- function start()
- if not av('debug') then
- print('ERROR! Карта отладки не найдена!')
- elseif c.debug.test() == nil then
- print('ERROR! Карта отладки выключена в конфиге!')
- elseif g.getDepth() == 1 then
- print('ERROR! Монитор и видеокарта 1 тира не поддерживаются!')
- else
- dbg = c.debug
- if av('tablet') then
- if av('chat') then
- chat = c.chat
- chatAccess = true
- ev.listen('chat_message',dialog)
- else
- chatAccess = false
- end
- else
- if av('chat_box') then
- chat = c.chat_box
- chatAccess = true
- ev.listen('chat_message',dialog)
- else
- chatAccess = false
- end
- end
- if av('radar') then
- r = c.radar
- radarAccess = true
- else
- radarAccess = false
- end
- if av('particle') then
- p = c.particle
- particleAccess = true
- else
- particleAccess = false
- end
- run()
- end
- end
- function exit()
- term.clear()
- press('lock')
- ev.ignore('touch',touchProtector)
- ev.ignore('key_down',keysProtector)
- ev.ignore('chat_message',dialog)
- ev.cancel(timer)
- g.setForeground(colors.white)
- g.setResolution(xOld,yOld)
- os.sleep(0.00001)
- end
- function ev.shouldInterrupt()
- return false
- end
- start()
Add Comment
Please, Sign In to add comment