I need help with a Code Executer

What would I require? :grinning_face_with_smiling_eyes:

@Unknownstaffmembe :grinning_face_with_smiling_eyes:

I need to use wrapper since I cannot use loadstring in a localscript

Hi, sorry for the late reply, here is a picture gif of the command line in the developer console,

also, if you’d like to use a wrapper, I’d recommend looking into some of the posts from here Search results for 'lua wrapper #resources' - DevForum | Roblox.

couldnt find any :frowning: can you get an ID? please

Here’s a pretty nice lua wrapper

and, it’s sandboxed too so, exploiters won’t have access to certain functions/methods if they do somehow (unlikely if you handle remotes correctly and do checks) gain server sided access.

Can you send it to me from the roblox website link? and can you show me how to use it?

Oh and I do not use github lol

Personally I wouldn’t really recommend using H6x if you are a beginner because even though its designed to be pretty easy to use it would be easy to misuse it too, its made to be a tool for creating a sandbox yourself so you can let people write code.

(H6x also uses loadstring underneath by the way, as do most games that run inputted code on Roblox)

It’s not really good if you just want to be able to run some code, its designed for people who know a little bit about how things like getfenv, getmetatable, etc can be abused, and how different instances in Roblox might be abused. It’s not really a beginner tool at all.

There is no Roblox website link, the file download for H6x is uploaded directly to the devforum. The reason for this is that the project is still in relatively early stages, so, it doesn’t make much sense for me to upload it yet and make it easily accessible. You can import it into studio like any normal Roblox model file (by dragging and dropping or by right clicking an instance and selecting Open from File)

GitHub is just a location to host code, you don’t need to use GitHub to use the code that’s hosted there. Its not much different from uploading something to Google drive or Dropbox other than for the person writing the code and people who want to contribute to it and submit things.

Small note about this, H6x is technically sandboxed but it is not going to stop people from doing malicious things in your game unless you set it up that way. It’s more a tool to create a sandbox vs being its own sandbox.

H6x is basically meant to do the heavy lifting of security and knowing all the little quirks about different features in the engine, but, if you tell the sandbox “hey give this script access to literally everything” its just going to “securely” give it access to literally everything (which is obviously not very secure, its basically just as effective as loadstring at that point)

1 Like

Well do you have any solutions on how I can execute code on a local script to make my local and server replicator of firing code?

Do you think you can go on studio with me and help? Or insert the code? please

What is getfenv() by the way? lol

Roblox doesn’t provide any way of executing code locally (since exploiters could just use Roblox’s code for that to run their scripts) so you won’t really be able to.

You can run server code with the dev console in your games (press F9 in game and go to the Server logs, there is a bar at the bottom where you can type or paste in lua code to run, and, then you can just hit enter and it’ll run)

If you want to run client code from the dev console you’d have to load it from Roblox. You can do that by creating a ModuleScript and calling it MainModule (this tells Roblox that its the main module so you can use require and give the id of it once you upload it). You can put a LocalScript inside of the MainModule, and in your MainModule you can Parent the LocalScript somewhere where it will run for you. Then just save the ModuleScript to Roblox by right clicking it and selecting Save to Roblox, that way you can require it. You just need to copy its id, and then you can run require(assetId) and the module will run.

One way that might be easy to do all of that would be to use game.CreatorId and do Players:GetPlayerFromUserId(game.CreatorId), or you can give it a specific player if you make the module return a function to parent the local script instead. You can parent the local script to player.Backpack and it will run for them. So, then, when you want to run some local code, you can edit it in studio, right click on MainModule, and select Save to Roblox, then you can require the asset id.

(P.s. when you require a module it gets cached, so, if you update it, and try to require it again after you’ve already required it in that server it will be the old module… I can help you come up with a better but maybe more confusing way if you want, that wouldn’t use modules but would still involve uploading a script)

I can’t really do this, but, I don’t think H6x is actually what you want anyways, since you said in your post you just want to run code for yourself. H6x is meant for the few games that will want to run other people’s code in them.

1 Like

You can read about it on the devhub here: Lua Globals (roblox.com)

Just press Ctrl+F and you can type in getfenv and it’ll show up

1 Like

Yes not my command bar thing with F9 I will show you right here



I want the client to work :slight_smile:

There isn’t really a way to do that, you kind of just have to deal with uploading your scripts to Roblox and then you can load them with require(assetId) or you can use InsertService:LoadAssetVersion() which can load something you upload to Roblox, like a LocalScript that you can put into your Backpack, so, that way you can run local code.

Also, if you join your game, press F9, it will open the developer console which is a console you can use, it lets you run code. That’s what @Unknownstaffmembe was showing you and that’s what I was trying to say before:

If you are a developer of a game (so, if you have edit access) you can use this in any of your games, its part of Roblox, there isn’t anything you have to download or add.

Then how come I see other people do it with client code?

Like in Void Script Builder? Void Script Builder is the one example of a game I know of that can run local code.

I believe Void Script Builder has a website set up and they can tell their website to upload a local script to Roblox, and then they can load the script once its uploaded via InsertService. That’s how one of their moderators explained it to me.

I know they also used to use a lua in lua executor (basically the code for the lua itself but rewritten in lua instead of C, so, “lua in lua”) a long time ago but those are really outdated and I don’t know of any that work very well and you probably can’t find them easily.