Hello everyone! So recently I saw some videos on a password hash system. It was not on Roblox but it inspired me to try to create my own. Now, as I knew this wouldn't work on the first try, I need a bit of help understanding what the problem is. I cannot seem to locate it but the output does give an error. Errors: 04:00:52.466 - ServerScriptService.RecieveHashRequest:29: attempt to index local 'event' (a nil value) | 04:01:04.196 - Players.suspectshot108.PlayerGui.Password.Input.Fire:29: attempt to index upvalue 'event' (a nil value)
It would be great to get some help. Also, if you were wondering, this is just a fun test.
Local Script
local event
local hashList = {
"q",
"g",
"y",
"o",
"z",
"x"
}
for _,v in next, hashList do
for _,e in pairs(game:GetService"ReplicatedStorage":GetDescendants()) do
if e:IsA("RemoteEvent") then
print 'Begining Sequence.'
if e.Name:sub(1,3)==1 or e.Name:sub(1,3)==2 or e.Name:sub(1,3)==3 then
print 'First section'
if e.Name:find(e.Name:sub(4), v) then
print 'Second section'
if e.Name:sub(5)==1 or e.Name:sub(5)==2 or e.Name:sub(5)==3 then
print 'Third section'
if e.Name:find(e.Name:sub(7), v) then
print 'Fourth section'
event = e
print 'Found.'
end
end
end
end
end
end
end
script.Parent.FocusLost:Connect(function()
if script.Parent.Text:len() >= 8 then
event:FireServer(script.Parent.Text)
else
script.Parent.Text = "";
script.Parent.PlaceholderText = "Input password must be 8 characters or longer."
end
end)
Server Script 1/2 - Encrypt Remote
local event = game:GetService("ReplicatedStorage").enc
local rad = math.random
if event then
local hashList = {
"q",
"g",
"y",
"o",
"z",
"x"
}
event.Name = (rad(1,3)..hashList[rad(1,6)]..rad(1,3))
end
Server Script 2/2 - Recieve Hash Request
local hashList = {
"q",
"g",
"y",
"o",
"z",
"x"
}
local event
local passwordData = game:GetService("DataStoreService")
local data = passwordData:GetDataStore("null")
for _,v in next, hashList do
for _,e in pairs(game:GetService"ReplicatedStorage":GetDescendants()) do
if e:IsA("RemoteEvent") then
print 'Begining Sequence.'
if e.Name:sub(1,3)==1 or e.Name:sub(1,3)==2 or e.Name:sub(1,3)==3 then
print 'First section'
if e.Name:find(e.Name:sub(4), v) then
print 'Second section'
if e.Name:sub(5)==1 or e.Name:sub(5)==2 or e.Name:sub(5)==3 then
print 'Third section'
if e.Name:find(e.Name:sub(7), v) then
print 'Fourth section'
event = e
print 'Found.'
end
end
end
end
end
end
end
event.OnSereerEeent:Connect(function(fired, password)
local pass = tostring(password)
local new
if pass:len() >= 8 then
return
else
for _,e in next, hashList do
new = string.gsub(pass:sub(3), hashList[math.random(1,6)], pass:sub(3))
data:SetAsync("p@ssw0rd"..new.."__"..fired.UserId)
print("p@assw0rd"..new.."__"..fired.UserId)
end
end
end)
It would be really great to get some help on this project!

38 comments
It is currently 4:11 AM where I live, so I am very tired. So if my code seems off, that's why.
Well that's probarly because event isn't an object yet, maybe the if statments inside your in pairs loop didnt function correctly so event must've been not set to "e"
Can you please try adding some prints inside each if statment to see if the object is passing or not
Sure.
and try printing event to see what it returns
ty!
Ok, I did that. But nothing came up. It just stated the same error. The prints did not even run.
okkk
that means the loop isnt even looping
oh wait sorry, did you put a print inside the loop but not inside the if statment?
It just prints "Begining sequence" 90 times. Which I am fine with but it doesn't print anything else. Which must mean that the following line has incorrect code. But what about it is incorrect?
No, there are prints in the if statement.
where is the print that prints Begining sequence? is it inside the 1st if statment
Yes.
ok
then its probarly passing throug the first if statment, but stops at the other ones and that's cuz the condition isnt met
What is the remote's name that youre looking for?
That's the problem. Look at the second server script. It randomly names the event and in the first server script, it tries to calculate the name and return it as the event.
Wait, sorry. Let me add the second script.
ohhhh ok
Ok, so it's the first server script names it and the second script does the calculating.
what about you save that name after making it in a sting value object, in then just check if the remotes event is equal to that?
or is that not what you want?
:o good idear. Any suggestions? _G ?
wym by suggestions?
Any suggestion on how to store the remote before renaming it. Think the _G variable would work?
yah it would
Ok, I will try it.
ok goodluck!
Gives the same errors.
But I think with a little tweaking it will work! Thanks for the help.
I'm happy to help! tell me if it works!
Don
Don
can someone upvote all myc omments xd
i said all but thanks xd
So it worked?*
no