Automatic Autofill - Module

It’s as simple as:

local AutofillManager = require(game.ReplicatedStorage.AutofillHandler)
local TextBox = script.Parent

AutofillManager:LinkObject(TextBox, {"Red", "Yellow", "Green", "Blue", "Black", "Rainbow"})

Features:

  • Textbox position tracking
  • Auto layering (Frame always goes above selection) (Toggleable)
  • Accurate autofill results
  • Tab + Enter key shortcuts (Toggleable)
  • Arrow key navigation (Up and down selection) (Toggleable)
  • Multiple result sources (Easy to combine instances, numbers, strings, etc. as possible results)
  • Class type filtering (Whitelist specific instance classes)
  • Easy to change frame and result styles (Located under main module)
  • Highlight color customization
  • Easy to link and unlink textboxes from the module

Important Notes

  • All instances use :GetChildren() when looking for results
  • Class filter is a whitelist, not a blacklist
  • Currently only Instances, numbers and strings are supported for results
  • Singular results aren’t required to be in a table
Examples
Result example


Color example


Filter example

image

Arrow key navigation

Function uses: (? stands for optional)

AutofillManager:LinkObject(TextBox, {Results}, {ClassFilter}?, HighlightColor3?, OffsetVector2?)

AutofillManager:UnlinkObject(TextBox)

Please leave constructive criticism/feedback or questions in the replies if you can!

26 Likes

Hi
Where can I get the module?

2 Likes

Oops, sorry I somehow forgot to link it.
It should be added now.

2 Likes

Easy to use and works like a charm.
Thanks for this!

2 Likes

Small nitpick:
at line 7 and 11 of ‘ClickDetection’, you don’t use WaitForChild(). This can cause an error sometimes if the respective children aren’t loaded in yet. Also in the AutoFillHandler modulescript there’s some accesses that don’t use waitforchild. It’s an easy fix though.

2 Likes

Alright, I’ll look at that later and see if I should add that.
I updated the module adding a little fix with an invalid character causing errors and lots of notes throughout the main module.

2 Likes

UPDATE:

  • Added arrow key navigation that can be toggled
  • Added optional position offsets (Part of :LinkObject)
  • Fixed some small bugs

At least I can make typing codes easier

image

2 Likes

i tried making it find players inside of the player service but it gave me the last error in the module instead can someone help me?

try creating this

local AutofillManager = require(game.ReplicatedStorage.AutofillHandler)
local PlayerNames = {}

game:GetService("Players").PlayerAdded:Connect(function(player)
   table.insert(PlayerNames, player.Name)
end)

game:GetService("Players").PlayerRemoving:Connect(function(player)
   table.remove(PlayerNames, table.find(PlayerNames, player.Name))
end)

AutofillManager:LinkObject(TextBoxName, PlayerNames)

Also make sure to account for player removing.

1 Like

I’m pretty sure it should account for updates by itself as long as you put game.Players in the possible results. Also it will search for children automatically.

1 Like

Try this:
AutofillManager:LinkObject(TextBox, game.Players, {"Player"})

uuhhh game.Players work exactly as game:GetService("Players")

I never said it wasn’t?
I’m just saying that if you put game.Players (or game:GetService("Players")) as a result, then the autofill results will update automatically when instances are added.
Also you can filter the results to only show Player instances.

it works thanks! i really needed this!

1 Like

Hey, does the autofill frame follow the cursor?

No, do you want it to?
If so I can try adding that later.

1 Like

Yeah, I’ve been trying to figure out how to get the exact Vector2 of the CursorPosition as I’m working with making a custom IDE. Also, what would I need to do for this to work in a plugin?

1 Like

For getting it to work in a plugin you should be able to just place the module under the plugin script though I’m not sure how doing ui stuff works in plugins.

The module puts the gui inside of StarterGui so it probably won’t work without some modifications.

I’ll try making it work inside of a plugin later when I can get on my computer.

As for getting the mouse Vector2 you should just be able to use

plugin:GetMouse()

And use the normal methods

1 Like