I absolutely love Roblox’s Windsock; it was very clear there was a ton of love put into that Widget even though its usage is rarely seen.
I was interested in seeing how it worked - in the past, you would simply just open up the plugin file - but now because of optimizations and in the effort of shorter load times in Studio, those files have been signed and the code pre-compiled into its byte-code.
For the majority of the work I utilized @Maximum_ADHD’s Roblox Client Tracker, they’ve implemented Unluau by atrexus into the pipeline which allows for these byte-code files to be roughly decompiled - and in the case they couldn’t be - just the bytecode instead.
However, after having decompiled the bytecode files myself there was a bug where the Windsock would become distorted randomly. Then @boatbomber shared this GitHub which - in contrast to Maximum_ADHD’s repository - actually had the fully decompiled files.
I compared my decompiled code to that of the newly automated one, and found this single character difference that fixed my problem.
We now have a fully working Windsock:
(Speeds/Directions shown are <1, 1, 0> at 50sps, <0, 1, 1> at 25sps, and <0, -1, 0.5> at 100sps)
The file is below and I hope to see more Windsocks in games everywhere, front-page or not!
Windsock.rbxl (55.4 KB)
Note: Barely any of this is commented and it is merely formatted to be readable. I myself don’t have much grasp of what is actually being done so attempting to explain it via comments would be futile; however, I have attempted to appropriately name all the variables to make proper documentation or repurposing easier.