#Sometimes u cant break blocks.
1 messages · Page 1 of 1 (latest)
ok
it are a way too many lines
it always sends like a file
click watch full file
or download, whatever
write lua bro, so ```lua
local tool = script.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local runService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("BlockBreakRequest")
local toolDamageModule = require(ReplicatedStorage:WaitForChild("ToolDamageModule"))
local UserInputService = game:GetService("UserInputService")
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
local holding = false
local equipped = false
local currentGui = nil
local lastClick = 0
local guiHideTask = nil
tool.Equipped:Connect(function()
equipped = true
mouse.TargetFilter = nil
end)
tool.Unequipped:Connect(function()
equipped = false
holding = false
mouse.TargetFilter = nil
if currentGui then
currentGui.Enabled = false
currentGui = nil
end
if guiHideTask then
task.cancel(guiHideTask)
guiHideTask = nil
end
end)
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if gameProcessedEvent or not equipped then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
holding = true
end
end)
UserInputService.InputEnded:Connect(function(input, gameProcessedEvent)
if gameProcessedEvent then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
holding = false
end
end)
local function isValidTarget(target)
if not target or not target:IsDescendantOf(game) then
return false
end
if target:FindFirstAncestor("Bed") then
return true
end
so ´´´lua
-code-
´´´
lol alr