Giter Club home page Giter Club logo

namingstandard's Introduction

Unified Naming Convention

aka UNC, is an organization between executor developers to provide a unified scripting API for our scripters.

UNC Has Retired ๐Ÿ‘‹

Who would've thought a globally documented API would be such a hit? We sure did! UNC was a great concept and it's lifespan proved it, focusing on building an excellent API for scripters allowed for those scripters to create great scripts, making our software just that more usable.

Two years ago, UNC helped to resolve the issue of poorly named functions. Today, it's founders at (Script-Ware) have stopped engineering script execution software for Roblox where these functions are used.

You are welcome to keep using UNC as a benchmark for software, but it will eventually grow out of date with newer features. We're sorry! We hope one day we'll make it up to you.


Please go to our official website for better styled information: https://scriptunc.org/

This website has since been removed, you can find all of the same information below.

Why?

Over the years scripting has gotten more and more complex to support multiple executors. This is because of the many unique naming conventions various executors use.

Consider the following scenario. You want to know if a function belongs to the executor or not. In order for this code to be cross compatiable with all executors code like this is needed:

local is_executor_closure = is_syn_closure or is_fluxus_closure or is_sentinel_closure or is_krnl_closure or is_proto_closure or is_calamari_closure or is_electron_closure or is_elysian_closure

This is reality for scripters who want cross compatibilty in their scripts. Scripters shouldn't have to do such laborous work just to attain cross compatability. The UNC seeks to solve this problem using naming conventions everyone agrees upon and follows.

One variant of a script should naturally work on all script executors which have their environment properly fitted to the UNC.

How?

The UNC provides standards for naming conventions as well as API functionality. The standard is written in markdown on this GitHub. Edits or additions are done through pull requests. Edits and additions are manually approved by the UNC council and discussed by everyone.

Supporting UNC

As a product owner, your support of UNC by following the API will result in a far smoother experience for scripters, as they are able to work on scripts that they can confidently say will work on most products. Once you have implemented UNC's API, you can display so by adding the badge to your website, thread or application.

You can find the badge here: https://scriptunc.org/badge (This badge has since been removed from our website)

This will notify people of your alliance in providing scripters with an easier method of engineering scripts that your consumers can enjoy.

NOTICE: If you, as a product owner, do not have all of these functions but yet support the ones you do - you then support UNC! You are more than able to display the badge on your website.

Checking your environment

You can run the UNC environment checking script to see how well your executor environment supports the UNC standard. Find the script here. The script determines what is missing, and writes the results to file under workspace.

Contributing

Go here for a guide on contributing.

namingstandard's People

Contributors

3rdit avatar epixscripts avatar jdpatdiscord avatar luaoranges avatar richie0866 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

namingstandard's Issues

Question.

So let me get this, the functions 'is_fluxus_closure' is registered in our custom exploit?

Deprecate isreadonly

I believe if there is an official alternative to getting a table's readonly status with table.isfrozen, usage of a custom function for this should be discouraged.

ScriptUNC-Exists function

There isn't a function that I know of that allows you to know if the executor being used is scriptunc supported. I believe it would be a nice addition to have a function for simple usage, indicating if the current exploit is scriptunc supported.

UNC = uncsupported or false

maintain the env check already

who the hell uses getrenderproperty, setrenderproperty and isrenderobj? they are already in my environment but I see no script devs using it?

where are the other functions such as firetouchinterest, fireproximityprompt, firesignal???? you cant just add fireclickdetector and go on with it, that'd be stupid

setscriptable's "unique instance persisting" issue is with nearly every cheat, its honestly useless and that check should be removed
getcallbackvalue is a good function but i dont think it should be included in a universal environment check test script..

gethwid() function

I know that pretty much all exploits have a HWID header already, but they're all named after the exploit. All script developers that want to use this have to manually check whether the header is called "Fluxus-Fingerprint", "Oxygen-Fingerprint", etc. which is honestly just a hassle for the developers, but also makes a lot of scripts not supported on smaller exploits. A Unified HWID Header or the gethwid() function would honestly solve this problem.

crypt.decrypt/crypt.encrypt needs further standardization

A current point of contention for scripters - especially ones with special needs for whitelisting - definitely suffer from lack of standardization on this front.

UNC declares it as crypt.decrypt(data: string, key: string, IV: string?): string,
Synapse as: syn.crypt.decrypt(data: string, key: string): string, and
Script-Ware as: crypt.decrypt(data: string, key: string, iv: string, mode: string) despite existing documentation saying otherwise.

Synapse makes the standard algorithm AES-GCM, Script-Ware claims to be AES-CTR - I was unable to find documentation for Krnl, Fluxus, and Oxygen U to confirm theirs.

Some AES implementations hold the random IV in the text returned in order to reduce it to one payload instead of requiring two sets of data in order to function, but other forms do not.

[BUG] getscriptclosure

will throw "attempt to call a nil value" on getscriptclosure test, even if all the functions there actually exist, could you look into this?

RFC - Remove Environment Checker From Language Limbo

  • Feature Name: standardise_environment_checker
  • Start Date: 2022-9-10

Summary

Standardise UNCCheckEnv.lua to either be written in 100% Luau or in 100% PUC Lua 5.1, in order to improve legibility without needless sacrifice of compatibility, and vice versa.

Motivation

The current version of UNCCheckEnv.lua contains Luau features such as compound assignment (+=, *=, ..=, etc), but also unfriendly PUC Lua 5.1 idioms such as a and b or c. This sacrifices the utility of the script on 2 fronts:

  1. Compatibility issues with non Luau executors (if any such UNC compliant executors exist)
  2. Sacrifice to code legibility due to PUC Lua 5.1 idioms and lack of type information

This can be corrected by switching to complete conformance with either Luau or PUC Lua 5.1

Reference-level explanation

The implementation of this feature only affects the conformance checking script, and not the standard itself. As was discused, complete conformance to either Luau or PUC Lua 5.1 is the goal, which would be achieved by converting PUC Lua 5.1 idioms into Luau idioms/features, or vice versa. For example:

This PUC Lua 5.1 idiom:

local x = switch and a or b

Can become:

local x = if switch then a else b

With much better legibility.

The same is true with:

for key, value in ipairs(table)

As it becomes:

for key, value in table

(There initially used to be a performance drawback to the 2nd, but this is no longer the case)

And finally, this is especially important with function prototypes/signatures:

local function concat(...)

Can become:

local function concat(...: table)

Drawbacks

This may compromise legibility for the sake of compatibility, or vice versa; there is no perfect outcome in this situation, but the maintainers have the final say on what to sacrifice for what.

Rationale and alternatives

The only alternative is to do nothing, but taking a decision now is imperative. The UNC is an important standard, and it only makes sense for the conformance checker script to conform to a standard as well, leaving it in limbo is hypocritical and can cause problems for people down the road.

Prior art

0866 made a contribution that greatly improved the performance and legibility of the script from its initial iteration, but the changes were inadequate and the current iteration remains in limbo.

Unresolved questions

The main unresolved question here is if there are any UNC executors without Luau support that would get affected by a change to Luau, or are currently affected by the presence of Luau-only features in the current version of the script.

The environment check developer mixed up crypt.encrypt with crypt.custom.encrypt

crypt.encrypt that everyone uses accepts 2 args, a data and a key (both accepted as strings)
crypt.encrypt( data, key)

however, the UNC env check test did it in a horrifying way
local encrypted, iv = crypt.encrypt("test", key, nil, "CBC")
which is unacceptable, it also has mixed up args.
crypt.custom.encrypt( cipher, data, key, iv)

please do fix this, as it causes things to be really messy.

we do not need :Destroy() for Drawing.

Since :Remove() exists, I believe we do not need another alias for it, since it has always been :Remove() from the beginning.
Another thing is: getnilinstances test needs to be worked on more carefully, as the getnilinstances test will not work on such games like a basic baseplate.

We need a way to identify supported UNC components.

According to the repository's readme, an exploit doesn't actually need to support the entirety of the UNC API for it to display its participation in the consortium. Even though this kind of defeats the purpose of a unified consortium, I suppose some exploits cannot implement everything the UNC prescribes so this makes it fairer for them.

The problem this creates however is some developers will assume a UNC-branded exploit supports all UNC functions. This problem may get worse if the developer doesn't test on more than one UNC platform and ends up releasing his supposedly "UNC compatible" script, only for users to complain that it doesn't work on their exploit due to unimplemented functionality. To fix this I suggest that a function be added to return a dictionary of supported features, similarly to how the cpuid instruction tells a program the features of the CPU it's running on.

The table it returns could look like this:

{
    websockets = true,
    filesystem = true,
    profiles = false,
    -- ...
}

Then retrieved and used like this:

local supported_features = features()
if (not supported_features.websockets) then
    error("Your exploit does not support the WebSocket API.")
end

Calling a function to retrieve supported features is more intuitive than checking the environment. Anyway, the UNC was literally designed to avoid checking the environment for stuff, so this fits the bill. We could also add a third return value to identifyexecutor but then the alias becomes a bit of a misnomer since it starts checking more than just the exploit's identity.

[SUGGESTION] Improve the standard for naming functions, and maybe grouping the functions by the use of it.

The standard of naming functions should be improved to have no more confusion.
Like for example:

- No underscore characters
- Only lowercase characters

(you get the point)

and maybe some sort of like grouping of functions like:

- instance.cloneref
- instance.invalidatecache
- instance.iscached
- instance.getcallbackvalue

- closure.hook (hookfunction)
- closure.isexploitcaller (checkcaller)
- closure.iscclosure

(maybe u get the point)

but it should be designed well with user experience so it wouldn't be a hassle typing those function names. There might be a problem with grouping the functions with this names like "isexploitfunction" which needs a rename to it, but idk.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.