local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local UserInputService = game:GetService("UserInputService")
local player = Players.LocalPlayer
local AbilityEvent = ReplicatedStorage
:WaitForChild("SisyphusRemotes")
:WaitForChild("Ability")
-- Detecta se está no celular/tablet
local isMobile = UserInputService.TouchEnabled
--------------------------------------------------
-- FUNÇÃO PARA USAR HABILIDADE
--------------------------------------------------
local function useAbility(name)
AbilityEvent:FireServer(name)
end
--------------------------------------------------
-- CONTROLES DE PC
--------------------------------------------------
UserInputService.InputBegan:Connect(function(input, processed)
if processed then return end
if input.KeyCode == Enum.KeyCode.Z then
useAbility("Solemn")
elseif input.KeyCode == Enum.KeyCode.X then
useAbility("Rush")
elseif input.KeyCode == Enum.KeyCode.C then
useAbility("Slam")
elseif input.KeyCode == Enum.KeyCode.V then
useAbility("Destroy")
elseif input.KeyCode == Enum.KeyCode.B then
useAbility("PhaseTwo")
end
end)
--------------------------------------------------
-- INTERFACE MOBILE
--------------------------------------------------
if not isMobile then
return
end
local gui = Instance.new("ScreenGui")
gui.Name = "SisyphusMobileControls"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")
local container = Instance.new("Frame")
container.Size = U