This is my script. I got it from another question but i don't know what it means. Thanks for help
local Player = game.Players.LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait();
local UIS = game:GetService("UserInputService")
local attacks = {
[Enum.KeyCode.Q] = function()
local Part = Instance.new("Part")
Part.Parent = workspace
Part.CFrame = char.Head.CFrame * CFrame.new(0,0,-5)
wait(3)
end;
[Enum.KeyCode.E] = function()
local Part = Instance.new("Part")
Part.Parent = workspace
Part.CFrame = char.Head.CFrame * CFrame.new(0,0,-5)
wait(3)
end;
}
local function ForceDebounce(func)
local debounce = false;
return function(...)
if(not debounce) then
debounce = true;
func(...);
debounce = false;
end
end
end
local function ForceDebounceAllAttacks()
for i, v in pairs(attacks) do
attacks[i] = ForceDebounce(v);
end
end
ForceDebounceAllAttacks();
UIS.InputBegan:Connect(function(Input)
for i, v in pairs(attacks) do
if(Input.KeyCode == i) then
print(i, v);
v();
end
end
end)
