addHook("ThinkFrame", do for player in players.iterate if not server.allowminorcommands server.allowminorcommands = 0 end if not server.operators server.operators = {[1] = server.name} end if not player.operator player.operator = 0 end if (player == server or player == admin) player.operator = 1 end if not player.mo.flying player.mo.flying = 0 end if player.mo.flying == 1 player.pflags = $1|PF_JUMPED player.pflags = $1|PF_THOKKED if (player.cmd.buttons & BT_JUMP) P_SetObjectMomZ(player.mo, 2*FRACUNIT, true) end if (player.cmd.buttons & BT_USE) P_SetObjectMomZ(player.mo, -2*FRACUNIT, true) end if not (player.cmd.buttons & BT_JUMP) and not (player.cmd.buttons & BT_USE) if player.mo.momz > -2*FRACUNIT and player.mo.momz < 1*FRACUNIT player.mo.momz = 1 else if player.mo.momz > 1*FRACUNIT player.mo.momz = player.mo.momz/8*7 end if player.mo.momz < -1*FRACUNIT player.mo.momz = player.mo.momz/2 end end end end end end) addHook("PlayerJoin", function(player) print("Welcome to the server! Type 'commandlist' for a list of commands!") print("This server is using HitCom V9.3 by HitCoder") print("Credit to MotdSpork for some shit in this script, which has been around for so long that I can't actually remember what he did...") print("but thanks anyway .w.") print("Last update on 10th July 2016.") end) /* Base for adding a console command, to save you typing the basics each time. COM_AddCommand("COMMAND", function(player, arg1) end) */ COM_AddCommand("fly", function(player) if ((player == server or player == admin) or player.operator == 1) if not (player.mo.flying == 1) player.mo.flying = 1 CONS_Printf(player, "Now flying") else player.mo.flying = 0 CONS_Printf(player, "No longer flying") end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("godmode", function(player) if ((player == server or player == admin) or player.operator == 1) if not (player.pflags & PF_GODMODE) player.pflags = $1|PF_GODMODE CONS_Printf(player, "Sissy mode on.") else player.pflags = $1 & ~PF_GODMODE CONS_Printf(player, "Sissy mode off.") end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("noclip", function(player) if ((player == server or player == admin) or player.operator == 1) if not (player.pflags & PF_NOCLIP) player.pflags = $1|PF_NOCLIP CONS_Printf(player, "NoClip on.") else player.pflags = $1 & ~PF_NOCLIP CONS_Printf(player, "NoClip off.") end else CONS_Printf(player, "You do not have permission to do this.") return end end) local serverpassword = "VonyichManuScript" COM_AddCommand("oppass", function(player, arg1) if ((player == server or player == admin)) if arg1 == nil CONS_Printf(player, "op - Make a player an operator.") return else serverpassword = arg1 end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("oplogin", function(player, arg1) if arg1 == serverpassword player.operator = 1 CONS_Printf(player, "Successfully logged in.") local loggedinplayer = player for player in players.iterate if ((player == server or player == admin) or player == admin) CONS_Printf(player, loggedinplayer + " just logged in. To unadmin/deop them, type 'deop ' or 'unadmin '") end end else CONS_Printf(player, "Incorrect login details. Try again.") return end end) COM_AddCommand("op", function(player, arg1) if ((player == server or player == admin)) if arg1 == nil CONS_Printf(player, "op - Make a player an operator.") return end for player in players.iterate if player.name == arg1 player.operator = 1 print(player.name + " is now an operator/admin") end end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("deop", function(player, arg1) if ((player == server or player == admin)) if arg1 == nil CONS_Printf(player, "deop - Take away a player's operator powers.") return end for player in players.iterate if player.name == arg1 player.operator = 0 print(player.name + " is no longer an operator/admin") end end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("commandlist", function(player, arg1) if not arg1 then CONS_Printf(player,"There are currently 4 pages of commands") CONS_Printf(player,"to show commands, please use \"commandlist \"") CONS_Printf(player, "Admins and operators are both classed as 'ADMIN', but operators can not op or admin anyone. Therefor, operators are slightly weaker than admins with what they can do.") CONS_Printf(player, "Commands are:") elseif arg1 == "1" CONS_Printf(player, "allowminorcommands - boolean (toggle) gives permissions to all players to use commands that only affect them. ") CONS_Printf(player, "getemeralds - Gets all emeralds. Avalible to admins, server, and other players if minor commands are allowed.") CONS_Printf(player, "myability - sets your ability. Avalible to Admins, Server, or everyone, if minor commands are enabled. use any ability number.") CONS_Printf(player, "setgrav - Only avalible to admins and server. Sets the global gravity.") CONS_Printf(player,"afk (boolean) - stores your player data and then sets your lives to 0 when toggled on, toggling off will restore all the data") CONS_Printf(player,"notalkhit (boolean) - toggled serverwide, when a player is talking in the chat they are made invulnerable to everything until they have stopped talking") CONS_Printf(player, "myspeed - Sets your 'Normalspeed'. Avalible to admins, server, and other players if minor commands are allowed.") elseif arg1 == "2" CONS_Printf(player, "mygravity - Sets your 'Jumpfactor' value, to replicate your gravity. Avalible to admins, server, and other players if minor commands are allowed.") CONS_Printf(player, "mylives - Sets your lives. Avalible to admins, server, and other players if minor commands are allowed.") CONS_Printf(player, "myrings - Sets your rings. Avalible to admins, server, and other players if minor commands are allowed.") CONS_Printf(player, "setlives - Sets all players' lives. Only abalible to admins and the server.") CONS_Printf(player, "setrings - Sets all players' rings. Only abalible to admins and the server.") CONS_Printf(player, "admin - Admins a specific player. Can only be used by server.") CONS_Printf(player, "op - Makes a specific player operator. Can only be used by server and admins.") elseif arg1 == "3" CONS_Printf(player, "givemeemeralds - give yourself all match emeralds. A minor command.") CONS_Printf(player, "oplogin - login as a server op or admin.") CONS_Printf(player, "oppass - set operator password. Server only.") CONS_Printf(player, "fly <0/1> - turn fly on or off. Server admin or op only.") CONS_Printf(player, "god <0/1> - turn invincible. Server admin or op only.") CONS_Printf(player, "noclip <0/1> - clip through walls. Server admin or op only.") CONS_Printf(player,"hypersonic - turns you into hypersonic and gives you supersonic properties but the hypersonic properties from 1094") elseif arg1 == "4" CONS_Printf(player,"jesus (boolean) - toggle walking on water") CONS_Printf(player,"tp - Teleport players p1 to p2. Put names in quotes if they contain spaces or semicolons.") end --CONS_Printf(player, "objectplace <0/1> - place objects. Server admin or op only.") end) COM_AddCommand("getemeralds", function(player) if ((player == server or player == admin) or player.operator == 1) for player in players.iterate P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD1) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD2) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD3) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD4) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD5) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD6) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD7) end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("tp", function(p, arg1, arg2) if p == server or p == admin or p.operator == 1 then --P_TeleportMove(arg1.mo, arg2.mo.x, arg2.mo.y, arg2.mo.z) local p1 = nil local p2 = nil for player in players.iterate if player.name == arg1 p1 = player.name else if player.name == arg2 p2 = player.name end end end if arg2 == "me" then p2 = p end if not (p1 == nil and p2 == nil) then P_TeleportMove(p1.mo,p2.mo.x,p2.mo.y,p2.mo.z) else if p1 == nil and not p2 == nil then if arg1 == "all" or arg1 == "others" then for player in players.iterate if player.mo if arg1 == "all" P_TeleportMove(player.mo, p2.mo.x,p2.mo.y,p2.mo.z) elseif not player == p then P_TeleportMove(player.mo, p2.mo.x,p2.mo.y,p2.mo.z) end end end elseif arg1 == "me" then P_TeleportMove(p.mo,p2.mo.x,p2.mo.y,p2.mo.z) end end end else CONS_Printf(player,"You do not have permission to do this.") end end) COM_AddCommand("skinglitch", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 if arg1 == nil CONS_Printf(player, "skinglitch - glitch into another skin keeping the previous skin's stats.") return end player.mo.skin = arg1 else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("myability", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 if arg1 == nil CONS_Printf(player, "myability - set your charability.") return end player.charability = tonumber(arg1) else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("givemeemeralds", function(player) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 player.powers[pw_emeralds] = 127 else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("setgrav", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) if arg1 == nil CONS_Printf(player, "setgrav - Set everyone's jumpfactor. Average is 1.") return end for player in players.iterate player.jumpfactor = tonumber(arg1)*FRACUNIT end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("allowminorcommands", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) if (arg1 == "0") for player in players.iterate server.allowminorcommands = 0 end elseif (arg1 == "1") for player in players.iterate server.allowminorcommands = 1 end else CONS_Printf(player, "allowminorcommands <1/0> enable or disable use of commands that only affect the command user theirself.") return end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("myspeed", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 if arg1 == nil CONS_Printf(player, "myspeed - Set your maximum speed limit.") return end player.normalspeed = tonumber(arg1)*FRACUNIT else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("mygravity", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 if arg1 == nil CONS_Printf(player, "mygravity - Set your own jumpfactor. Average is 1.") return end player.jumpfactor = tonumber(arg1)*FRACUNIT else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("mylives", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 if arg1 == nil CONS_Printf(player, "mylives - Set your own lives.") return end player.lives = tonumber(arg1) else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("setlives", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) if arg1 == nil CONS_Printf(player, "setlives - Set everone's lives.") return end for player in players.iterate player.lives = tonumber(arg1) end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("myrings", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 if arg1 == nil CONS_Printf(player, "myrings - Set your own rings amount.") return end player.mo.health = tonumber(arg1) + 1 player.health = tonumber(arg1) + 1 else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("setrings", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) if arg1 == nil CONS_Printf(player, "setrings - Set all players' rings amount.") return end for player in players.iterate player.mo.health = tonumber(arg1) + 1 player.health = tonumber(arg1) + 1 end else CONS_Printf(player, "You do not have permission to do this.") return end end) COM_AddCommand("admin", function(player, arg1) COM_BufInsertText(player, "op " + arg1) end) COM_AddCommand("unadmin", function(player, arg1) COM_BufInsertText(player, "deop " + arg1) end) COM_AddCommand("invime", function(player, arg1) if ((player == server or player == admin) or player.operator == 1) or server.allowminorcommands == 1 if arg1 == nil CONS_Printf(player, "invime