#Paint Brush Cursor

1 messages · Page 1 of 1 (latest)

tacit cypress
#

My Other local script: local UserInputService = game:GetService("UserInputService")
local ContextActionService = game:GetService("ContextActionService")
local paintButton = script.Parent
local isPainting = false

-- Function to toggle painting mode
local function togglePaint()
isPainting = not isPainting
print("Painting mode:", isPainting and "ON" or "OFF")

-- Do your painting logic here (e.g., activate a paint tool, change cursor, etc.)

end

-- Click or tap
paintButton.MouseButton1Click:Connect(togglePaint)

-- Keyboard input (1 key for PC)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.One then
togglePaint()
end
end)

-- Console support (Y for Xbox, Triangle for PlayStation)
local function onConsoleAction(actionName, inputState)
if inputState == Enum.UserInputState.Begin then
togglePaint()
end
end

ContextActionService:BindAction("TogglePaint", onConsoleAction, true,
Enum.KeyCode.ButtonY, -- Xbox Y
Enum.KeyCode.ButtonTriangle -- PlayStation Triangle
)