so I’ve been playing around with gears and wanted to remake Crescendo, the Soul Stealer
what I wanted to add is a scrambling or randomizing the text in default Tooltip for Tools. It will occasionally show letters from the string variable I set
There isn’t really any documentation for TTs since it’s usually custom ones with ImageLabels or something
I have experimented around with RunService, binding, and while loops, but they usually crash or display a string-related error
And I’ve also modified multiple glitch-text modules that didn’t work with tooltips
For a better visulization of the effect, I’m going for something like the Dark Matter Gun from BIG Paintball:
--first attempt in a few minutes
--LocalScript "ToolTipScrambler" in the Crescendo
local run = game:GetService("RunService")
local t = script.Parent --The Crescendo
local tt = t.ToolTip
--local timeRandomization = 1 --db for the scrambling that was meant to replace dt
--local text = "baboon dollar" --I couldn't get the string to display correctly
local function DemonicText(deltaTime)
print("lololololololol", deltaTime) --Testing DT in the console
tt = DemonicText() --don't do this it crashed my computer lol, I was trying to see if I could parent the scrambling
task.wait(3)
end
run:BindToRenderStep("Soulseeker", Enum.RenderPriority.Last.Value, DemonicText) --Soulseeker is meant to be the binded function for the randomized tooltip, though it might have gotten Confused with the Demonic Text
local ScrambledOptions = { "@", "z", "x", "?", "y", "!", "*", "-", "+", "%", ")", "/"};
local function Scramble()
local result = "";
while string.len(result) < 32 do
local Chosen = ScrambledOptions[math.random(1, #ScrambledOptions)];
if math.random(2) == 1 then
result = result .. Chosen:upper();
else
result = result .. Chosen;
end;
end;
return result;
end;
this should work! you can edit ScrambledOptions to whatever you like
I modified your example slightly but the string does not update, maybe it needs a while loop?
Nothing is printing either…
local tool = script.Parent
local tooltip = tool.ToolTip
local ScrambledOptions = { "C", "R", "x", "C", "y", "!", "N", "-", "D", "%", ")", "S"};
local function Scramble()
local result = "";
while string.len(result) < 32 do
local Chosen = ScrambledOptions[math.random(1, #ScrambledOptions)];
if math.random(2) == 1 then
result = result .. Chosen:upper();
else
result = result .. Chosen;
end;
end;
--print("result")
return result;
end;
Scramble(tooltip)
local tool = script.Parent
local ScrambledOptions = { "C", "R", "x", "C", "y", "!", "N", "-", "D", "%", ")", "S"};
local function Scramble()
local result = "";
while string.len(result) < 32 do
local Chosen = ScrambledOptions[math.random(1, #ScrambledOptions)];
if math.random(2) == 1 then
result = result .. Chosen:upper();
else
result = result .. Chosen;
end;
end;
return result
end;
while task.wait() do
--idk implent the loop how you want, and also disconnect it when the tool is no longer in backpack or in char so no memory leaks!
tool.ToolTip = Scramble()
end