this handles userinputservice and fires wehn it finds a event which fits, it prints "fired r" wehn I click R
--[[
Author: Zyos
Date: 06/09/2025 DD/MM/YY
Description: Handles UserInputService for players
]]
--Services
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--Events
local Events = ReplicatedStorage:WaitForChild("Events")
local RemoteEvents = Events:WaitForChild("RemoteEvents")
local BindableEvents = Events:WaitForChild("BindableEvents")
--Variables
local player = game.Players.LocalPlayer
--Main
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.Unknown then return end
local key = string.lower(input.KeyCode.Name)
local remoteEvent = RemoteEvents:WaitForChild("UserInputService"):FindFirstChild(key)
if remoteEvent then
remoteEvent:FireServer()
end
local bindableEvent = BindableEvents:WaitForChild("UserInputService"):FindFirstChild(key)
if bindableEvent then
bindableEvent:Fire()
print("fired"..key)
end
end)
this handles the reset and its not printing "did"
--[[
Author: Zyos
Date: 07/07/2025 DD/MM/YY
Description: Client Reset for the Player
]]
--Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
--Events
local Events = ReplicatedStorage:WaitForChild("Events")
local BindableEvents = Events:WaitForChild("BindableEvents")
local UIS_RKey = BindableEvents:WaitForChild("UserInputService"):WaitForChild("r")
--Modules
local Modules = ReplicatedStorage:WaitForChild("Modules")
local playerService = require(Modules:WaitForChild("playerService"))
--Variables
local player = Players.LocalPlayer
--Main
UIS_RKey.Event:Connect(function()
print("did")
playerService:plrCFrameToCheckpoint(player)
end)


** You are now Level 3! **