Im making a 'hack gui' to my game. Players will buy a gamepass, and player with this gamepass will be able to do cool things with this gui (Like turn on fire brigade alarm or change TV image). But im trying to make script that detects if player made a mistake when writing. Then a message will be sent to Police that somebody is trying to hack.
So im trying to make script that detects writing mistakes by player. I would be grateful if somebody could write answer to this question (sorry for my bad english if it is) and also if this is impossible then sorry.
Script (StarterGui button called 'Activate')
-- Written by kujekmarek (On other account kujekmarekALT)
local Commands = {
"<GetFunc>:New[Class{:Obj:},type:TV(Placement<City,All>]:ChangeSignal[New(ID),New],ID[new]=.",
"<GetFunc>:New[Class{:obj:},type:Billboards(Placement<City,All>]:ChangeSignal[New(ID),New],ID[new]=.",
"<GetFunc>:New[Class{:Plr:},type:IP(Placement<LocalPlr, local>]:CheckSignal[LocalPlayerIP]:Print",
}
local LineScript = script.Parent.Parent.LineOne
local ActivateButton = script.Parent
local Output = script.Parent.Parent.Output.OutputText
local AllCityTV = game.Workspace:WaitForChild("AllCityTv"):GetChildren()
local Player = game.Players.LocalPlayer
local ErrorCounter = 0
local ContentProvider = game:GetService("ContentProvider")
repeat wait() until ContentProvider.RequestQueueSize == 0
ActivateButton.MouseButton1Click:Connect(function()
if LineScript.Text == Commands[1] then
script.Parent.Parent.Ding:Play()
script.Parent.Parent.Choices.Visible = true
script.Parent.Parent.LineOne.Text = ""
script.Parent.Parent.Tutorial.Visible = false
script.Parent.Parent.Activate.Visible = false
else
if LineScript.Text == Commands[3] then
Output.Text = (Player.PlayerIP.Value.." is your IP!")
wait(1)
Output.Text = ""
else
if LineScript.Text == "" then
script.Parent.Parent.Alarm:Play()
Output.Text = "Error"
ErrorCounter = ErrorCounter + 1
if ErrorCounter == 4 then
script.Parent.Parent.Detected:Play()
script.Parent.Parent.Alarm:Stop()
script.Parent.Parent.Tutorial.Visible = false
script.Parent.Parent.Activate.Visible = false
Output.Text = "Police have detected you!"
else
if ErrorCounter ~= 4 then
wait(0.5)
script.Parent.Parent.Alarm:Stop()
Output.Text = ""
end
end
end
end
end
end)
Thank you

2 comments
I think what you're looking for is string.find(), you can use it to check if the string is somewhat close to a command and then change the text of the gui to the command
Thanks