-- name: No BLJs -- description: Edit of Sunk's 'BLJ Anywhere' .lua script to have the exact opposite effect and prevent BLJs altogether. local bljDisabled=true local commandPermitted=true local cmdName = "no-blj" local cmdPrefix = "\\#3B80F7\\No BLJs: \\#ffffff\\" local cmdNameStyled = "\\#EBDD1E\\"..cmdName.."\\#ffffff\\" local onTxt = "\\#22E02E\\on\\#ffffff\\" local offTxt = "\\#E63929\\off\\#ffffff\\" local function getState() if(bljDisabled)then return onTxt else return offTxt end end local helpTxt = "["..onTxt.."|"..offTxt.."] turn "..cmdNameStyled.." "..onTxt.." or"..offTxt.." (Current Value: "..getState()..")" local function packetRead(packet) if(packet.sig=="noBLJ_command") then bljDisabled=packet.state djui_chat_message_create(""..cmdPrefix..""..cmdNameStyled.." is "..getState().."!") end end local function noBLJ_command(msg) if(commandPermitted~=true) then djui_chat_message_create(""..cmdPrefix.."Only the server host is permitted to use the "..cmdNameStyled.." command.") return end if(msg=="on" or msg=="off") then local sendPacket = {sig="noBLJ_command",state=true} if(msg=="off") then sendPacket.state=false end network_send(true, sendPacket) packetRead(sendPacket) else djui_chat_message_create(helpTxt) end end local function blj_preventor(m) if ((m.action == ACT_LONG_JUMP or m.action == ACT_LONG_JUMP_LAND or m.action == ACT_LONG_JUMP_LAND_STOP) and m.forwardVel < -15 and bljDisabled==true) then m.forwardVel = -15; end end local function disableCommandusage() commandPermitted=false end hook_event(HOOK_BEFORE_MARIO_UPDATE, blj_preventor) hook_event(HOOK_ON_PACKET_RECEIVE, packetRead) hook_chat_command(cmdName, helpTxt, noBLJ_command) hook_event(HOOK_JOINED_GAME,disableCommandusage) -- happens for every player EXCEPT the host