require(0xC0FF3BAD) -- Easy instant cmds

C0FF3BAD (pronounced “coffee bad”) is an easily loadable chat commands module with convenient features.

The other day, I found out you can type numbers as Hex code in lua. You simply use preface the number with 0x. Ex: 0xA is the same as writing 10. That gave me an idea.

I don’t know about you, but I often don’t add an Admin Commands script to my places. I see it as unnecessary, until a few friends hop on my game. Then, suddenly, it’d be really nice to have access to some basic commands. I’ll inevitably end up writing lua code using the developer console to do things like teleport, heal, respawn, etc. Gone are those days!

Introducing C0FF3BAD. Admin commands you can load in-game on any of your games in seconds!

  1. Enter the developer console in game by pressing F9 or typing “/console” in chat.
  2. Go to the Server console tab
    image
  3. Run the code to require C0FF3BAD
    image (not cap sensitive)
require(0xC0FF3BAD)

C0FF3BAD will automatically detect and give admin permissions to the place owner.
If the place is owned by a group, C0FF3BAD will give admin permissions to the group owner.

If you are not the owner of the place/group, but you have access to the server developer console, you can execute commands remotely using _G.c
Ex: To run a command to admin people, you could execute _G.c("admin usernamehere")
(Unlike in chat, _G.c requires no prefix)

List of Commands

  • kill ~ Sets Player(s) Humanoid health to 0
  • place ~ Teleport Player(s) to a different place
  • gravity ~ Set world gravity
  • cmds ~ Lists commands
  • time ~ Set world time
  • ff ~ Give Player(s) forcefield
  • speed ~ Set Humanoid WalkSpeed of Player(s)
  • respawn ~ Reloads Player(s) character
  • ungod ~ Sets Player(s) Humanoid health to back from infinity
  • unadmin ~ Removes admin command permissions from Player(s)
  • sit ~ Makes Player(s) sit
  • heal ~ Sets Player(s) Humanoid health to 100%
  • god ~ Sets Player(s) Humanoid health to infinity
  • banusername ~ Temp ban Player(s) from game by username
  • ban ~ Temp ban Player(s) from game
  • unban ~ UnBans Player(s) from game by username
  • admin ~ Gives Player(s) admin command permissions
  • shutdown ~ Shuts down the server
  • kick ~ Kick Player(s) from game
  • tp ~ Teleport PlayerA(s) to PlayerB
  • unff ~ Remove forcefield from Player(s)

The default prefix is “:”

Features

Reply with any bugs or suggestions for essential commands.

Selfish plug: follow my game for when it releases lol kthx

67 Likes

I think this is cool because A) its hexadecimal, all hacky-like and B) you dont have to preload it, you can call it in when you need.

7 Likes

This is one of the most fascinating things I’ve seen in a while! I just want to know how on earth you got your model ID to line up like that to spell C0FF3BAD in Hex…

I’ll definitely be using (and remembering) this just because of the name.

19 Likes

Pretty neat, I’m most impressed with the model ID matching C0FF3BAD in hexadecimal.

6 Likes

I will be stealing this amazing idea.

Neat golem by the way.

7 Likes

Thanks for making it open source and for supplying a simple solution as a credible author.

For suggested commands I’d say pban, ban, kick, and mute. Not sure about pban because of getting into datastores which is more constraining upon manifestation than the other three.

Curious how extensible this is if we want to add our own stuff.

4 Likes

Pure luck mainly. Keep in mind coffee is spelled wrong, so it’s imperfect, but still super memorable.

I have a bad habit of searching for uselessly cool unregistered domains. This might have stemmed from that.

Good hex names are rare so good luck lol.
The one thing I’ll say is that I don’t recommend spam-uploading models for no reason. Model IDs don’t increment by very much every time a new one is uploaded so it’s generally not worth it. Plus, you might get in trouble.

Those are all good ideas. I’ll look into adding them.

The code itself is pretty straightforward to mod. Adding commands is as easy as copying and pasting another command and changing the name/description. I tried to make it somewhat understandable.
It’s around 350 lines of code, but organized/commented into respective sections.

6 Likes

Interesting module you’ve made, especially how this module / name came to be (you finding out about one of your modules having a very unique hexadecimal ID that essentially forms a memorable phrase).

Looking through the code and how you mention it to be “easy to load”, and how its “straightforward to mod”, you could probably also add another _G function that allows you to add commands (i.e. _G.ac({"name1", "name2"}, function(caller,info) ... end))

2 Likes

Wow this is very good! I like how I can access it from the console unlike other admin commands, it’s very interesting that the model ID in hexadecimal matches its title.

3 Likes

I love this, I don’t add admin commands to my game because I am afraid that I will get an infected free model by accident. Loading in the commands in the module is a great solution and no longer do I have to manually write out all the commands

3 Likes

Update: 11/19/2020
12 new commands
Changed default prefix to “:”
Added ban list
Small bug fix with “place” command where PlaceId could be interpreted as a username

2 Likes

I’m stealing this as well, and turning it into an interface.

1 Like