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!