I’m not sure on this one, is it really ment to error? It still works though.
if Input.Text:find(BannedKeyWords) then
-- Game Services --
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local StarterGui = game:GetService('StarterGui')
local GuiService = game:GetService('GuiService')
local Players = game:GetService('Players')
local LocalPlayer = Players.LocalPlayer -- Gets Player locally (Client).
local Camera = workspace.CurrentCamera -- CurrentCamera
-- Variable --
local Main = script.Parent.Parent.Parent:WaitForChild("Main")
local LoginBox = Main:FindFirstChild('LoginBox')
local Admin = LoginBox:FindFirstChild('Admin')
local LoginButton = LoginBox:WaitForChild('LoginButton')
local Input = LoginBox.BoxFrame:FindFirstChild('Input')
-- Modules --
local ButtonView = require(ReplicatedStorage:WaitForChild('ButtonView'))
-- Main Script --
ButtonView:hover(Admin)
ButtonView:hover(LoginButton)
StarterGui:SetCore('TopbarEnabled',false)
Main.Visible = true
-- Tables and Functions --
local ListOfBannedAndCursedWords = {'Bad', 'Gay', 'FREEROUX', 'Spam', 'Noob', 'WE_HATE_ROBLOX'} -- Don't let anybody read these words. It's to prevent bad language from being putted in.
local ListOfNegativeUnacceptedWordsResponse = {'Please try again.', 'Login info is inappropriate.', 'Error, If this error happens again. Please contact an administrator or a Developer.', 'Bad reques', 'Try again later.'} -- If the password is not accepted and finds to be inappropriate.
local ListOfBannedKeyWords = {'!', '%', '*'}
function SetCamera(FacePosition)
Camera.CameraType = 'Scriptable'
Camera.CameraSubject = FacePosition
Camera.CoordinateFrame = CFrame.new(FacePosition.Position)
end
function Login(Register, IsTyping)
Input:GetPropertyChangedSignal('Text'):Connect(function()
Register.MouseButton1Click:Connect(function()
if Input.Text == LocalPlayer.Name then
script.Parent.Parent.Parent.Parent:FindFirstChild('MainGui'):Destroy()
StarterGui:SetCore('TopbarEnabled',true)
Camera.CameraType = 'Custom'
Camera.CameraSubject = LocalPlayer.Character
else
for _,ListOfBannedWords in ipairs(ListOfBannedAndCursedWords) do
if Input.Text:find(ListOfBannedWords) then
LocalPlayer:Kick("Don't use inappropriate usernames!")
end
for _,BannedKeyWords in ipairs(ListOfBannedKeyWords) do
if Input.Text:find(BannedKeyWords) then
Input.Text = ("Special keywords are not allowed.")
Input.TextColor3 = Color3.fromRGB(182, 37, 37)
delay(2,function()
Input.Text = ""
Input.TextColor3 = Color3.fromRGB(0,0,0)
end)
end
end
end
end
end)
end)
end
-- Connectors --
SetCamera(workspace:WaitForChild('Baseplate'))
Login(LoginButton)