Macros in lego?!?!?
Key Required VerifiedUniversal

Macros in lego?!?!?

Universal ScriptEmptynessEmptyness 33.3K views 70 executesUpdated Apr 17, 2022
5.0/ 5(1 votes)
10100% Positive
Lua Script•137 lines (2813 chars)
local autopressKey = "j"
local m = game.Players.LocalPlayer:GetMouse()

print("AutoPress Keybind is: ", autopressKey)

wantedkeys = {}
table.insert(wantedkeys, "a")
table.insert(wantedkeys, "w")
table.insert(wantedkeys, "d")
table.insert(wantedkeys, " ")
table.insert(wantedkeys, "w")
table.insert(wantedkeys, "w")
table.insert(wantedkeys, "s")

list = {}
list[" "] = "0x20"
list["!"] = "0x21"
list['"'] = "0x22"
list["#"] = "0x23"
list["$"] = "0x24"
list["%"] = "0x25"
list["&"] = "0x26"
list["'"] = "0x27"
list["("] = "0x28"
list[")"] = "0x29"
list["*"] = "0x2a"
list["+"] = "0x2b"
list[","] = "0x2c"
list["-"] = "0x2d"
list["."] = "0x2e"
list["/"] = "0x2f"
list["0"] = "0x30"
list["1"] = "0x31"
list["2"] = "0x32"
list["3"] = "0x33"
list["4"] = "0x34"
list["5"] = "0x35"
list["6"] = "0x36"
list["7"] = "0x37"
list["8"] = "0x38"
list["9"] = "0x39"
list[":"] = "0x3a"
list[";"] = "0x3b"
list["<"] = "0x3c"
list["="] = "0x3d"
list[">"] = "0x3e"
list["?"] = "0x3f"
list["@"] = "0x40"
list["A"] = "0x41"
list["B"] = "0x42"
list["C"] = "0x43"
list["D"] = "0x44"
list["E"] = "0x45"
list["F"] = "0x46"
list["G"] = "0x47"
list["H"] = "0x48"
list["I"] = "0x49"
list["J"] = "0x4a"
list["K"] = "0x4b"
list["L"] = "0x4c"
list["M"] = "0x4d"
list["N"] = "0x4e"
list["O"] = "0x4f"
list["P"] = "0x50"
list["Q"] = "0x51"
list["R"] = "0x52"
list["S"] = "0x53"
list["T"] = "0x54"
list["U"] = "0x55"
list["V"] = "0x56"
list["W"] = "0x57"
list["X"] = "0x58"
list["Y"] = "0x59"
list["Z"] = "0x5a"
list["["] = "0x5b"
list["]"] = "0x5d"
list["^"] = "0x5e"
list["_"] = "0x5f"
list["`"] = "0x60"
list["a"] = "0x61"
list["b"] = "0x62"
list["c"] = "0x63"
list["d"] = "0x64"
list["e"] = "0x65"
list["f"] = "0x66"
list["g"] = "0x67"
list["h"] = "0x68"
list["i"] = "0x69"
list["j"] = "0x6a"
list["k"] = "0x6b"
list["l"] = "0x6c"
list["m"] = "0x6d"
list["n"] = "0x6e"
list["o"] = "0x6f"
list["p"] = "0x70"
list["q"] = "0x71"
list["r"] = "0x72"
list["s"] = "0x73"
list["t"] = "0x74"
list["u"] = "0x75"
list["v"] = "0x76"
list["w"] = "0x77"
list["x"] = "0x78"
list["y"] = "0x79"
list["z"] = "0x7a"
list["{"] = "0x7b"
list["|"] = "0x7c"
list["}"] = "0x7d"
list["~"] = "0x7e"

transformed = {}

for i, v in pairs(wantedkeys) do
   for x, y in pairs(list) do
       if v == x then
           table.insert(transformed, y)
       end
   end
end

m.KeyDown:connect(
   function(key)
       key = string.lower(key)
       if key == autopressKey then
           for a, b in pairs(transformed) do
               local virtualUser = game:GetService("VirtualUser")
               virtualUser:CaptureController()
               if click == false then
                   return
               end
               virtualUser:SetKeyDown(b)
               wait(1) --change time held down
               virtualUser:SetKeyUp(b)
           end
       end
   end
)

Features & Information

macro this was a challenge a guy wanted me to try
#macro

Community Comments (3)

RDXMRDXMApr 17, 2022(edited)

What is this for?

flyerrayflyerrayApr 18, 2022(edited)

pooping without an ******* is what its meant for

EmptynessEmptynessApr 19, 2022(edited)

macros

More Scripts for Universal Scripts