Skip to content

Instantly share code, notes, and snippets.

View howmanysmall's full-sized avatar
😎
pobam L+

howmanysmall

😎
pobam L+
  • 03:19 (UTC -06:00)
View GitHub Profile
$Key = "HKCU:\Software\ROBLOX Corporation\Environments\roblox-player"
while ($true)
{
$CurrentValue = (Get-ItemProperty -Path $Key -Name "LaunchExp").LaunchExp
if ($CurrentValue -eq "InApp")
{
#Write-Output "Value is InApp."
Set-ItemProperty -Path $Key -Name "LaunchExp" -Value "InBrowser"
}
@howmanysmall
howmanysmall / Lzw2.lua
Last active December 31, 2022 23:33
Fastest (?) Lzw on Luau
local Memoize = require(script.Memoize)
local StringRep = require(script.StringRep)
--[=[
A utility library for compressing strings with LZW. This was made as fast
as possible by using fun tricks like *lots* of memoization.
@class Lzw
]=]
local Lzw = {}
@howmanysmall
howmanysmall / Maid.lua
Created December 29, 2022 20:23
A barebones Janitor for the Maid API.
local Janitor = require("Janitor")
--[=[
Manages the cleaning of events and other things. Useful for
encapsulating state and make deconstructors easy.
See the [Five Powerful Code Patterns talk](https://developer.roblox.com/en-us/videos/5-powerful-code-patterns-behind-top-roblox-games)
for a more in-depth look at Maids in top games.
```lua
local RunService = game:GetService("RunService")
local EventConnection = require(script.Parent.EventConnection)
local Roact = require(script.Parent.Roact)
local t = require(script.Parent.t)
local RotatingViewport = Roact.Component:extend("RotatingViewport")
RotatingViewport.defaultProps = {
AnchorPoint = Vector2.new(),
Position = UDim2.new(),
local NilDependency = newproxy(true)
local Metatable = getmetatable(NilDependency)
function Metatable:__tostring()
return "NilDependency"
end
local function GetDependencies(...)
local Length = select("#", ...)
local Dependencies = table.create(Length)
local function NumberEntry(labelText: string, defaultValue: number, onChanged: (value: number) -> (), parent: Instance)
local text = Fusion.Value(tostring(defaultValue))
local value = Fusion.Value(defaultValue)
return Fusion.New("Frame") {
AutomaticSize = Enum.AutomaticSize.X,
BackgroundColor3 = Color3.fromRGB(54, 54, 54),
Name = "Container",
Parent = parent,
Size = UDim2.fromOffset(200, 30),
function _0x2a79(_0x1a4ffc, _0x56d61f) {
var _0xd85fee = _0xd85f();
return _0x2a79 = function(_0x2a79ae, _0x51a556) {
_0x2a79ae = _0x2a79ae - 0xdc;
var _0xfe095f = _0xd85fee[_0x2a79ae];
return _0xfe095f;
}, _0x2a79(_0x1a4ffc, _0x56d61f);
}
function _0xd85f() {
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local HttpService = game:GetService("HttpService")
local RunService = game:GetService("RunService")
local Janitor = require(ReplicatedStorage.Knit.Util.Janitor)
local Roact = require(ReplicatedStorage.Shared.Vendor.Roact)
local RoactHooked = require(ReplicatedStorage.Shared.Vendor.RoactHooked)
local UDim2 = require(ReplicatedStorage.Shared.Utility.DataTypes.UDim2)
local FUZZ = 0.2
local function ConvertToHSLColor(Color: Color3)
local Min = math.min(Color.R*255, Color.G*255, Color.B*255)/255
local Max = math.max(Color.R*255, Color.G*255, Color.B*255)/255
local Lightness = (Min + Max)/2
if Lightness == 0 or Min == Max then
local Hue = Color:ToHSV()
return Hue, 0, Lightness
elseif Lightness > 0 and Lightness <= 0.5 then
local Hue = Color:ToHSV()
local function GetService(ServiceName: string)
return game:GetService(ServiceName)
end
local ServicesMetatable = {}
function ServicesMetatable:__index(Index)
local Success, Object = pcall(GetService, Index)
local Service = Success and Object
self[Index] = Service
return Service