
Keyless

local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TextChatService = game:GetService("TextChatService")
local spellKeybinds = {
[Enum.KeyCode.Q] = "protego",
[Enum.KeyCode.E] = "expelliarmus",
[Enum.KeyCode.R] = "apparate",
[Enum.KeyCode.F] = "avada kedavra",
[Enum.KeyCode.G] = "deletrius",
[Enum.KeyCode.Z] = "duro",
[Enum.KeyCode.X] = "impedimentia",
[Enum.KeyCode.C] = "crucio",
[Enum.KeyCode.V] = "obliviate",
[Enum.KeyCode.B] = "protego totalum"
}
local cooldowns = {}
local function saySpell(message)
if TextChatService.ChatVersion == Enum.ChatVersion.TextChatService then
local channels = TextChatService:FindFirstChild("TextChannels")
if channels then
local rbxGeneral = channels:FindFirstChild("RBXGeneral")
if rbxGeneral then
rbxGeneral:SendAsync(message)
return
end
end
end
local ChatEvents = ReplicatedStorage:FindFirstChild("DefaultChatSystemChatEvents")
if ChatEvents then
local SayMessageRequest = ChatEvents:FindFirstChild("SayMessageRequest")
if SayMessageRequest then
SayMessageRequest:FireServer(message, "All")
return
end
end
end
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
local key = input.KeyCode
local spell = spellKeybinds[key]
if spell and not cooldowns[key] then
saySpell(spell)
cooldowns[key] = true
task.wait(0.5)
cooldowns[key] = false
end
end)
forgot to mention, theres a cooldown so you dont get kicked for spam