local Players = game:GetService("Players") local player = Players.LocalPlayer local backpack = player:WaitForChild("Backpack") -- // === HAMMER TOOL === local hammer = Instance.new("Tool") hammer.Name = "Hammer" hammer.RequiresHandle = false hammer.CanBeDropped = false -- Hammer handle local handle = Instance.new("Part") handle.Size = Vector3.new(1,5,1) handle.Color = Color3.fromRGB(101, 67, 33) handle.Material = Enum.Material.Wood handle.CanCollide = false handle.Anchored = false handle.Name = "Handle" handle.Parent = hammer -- Hammer head local head = Instance.new("Part") head.Size = Vector3.new(2,1,1) head.Color = Color3.fromRGB(128,128,128) head.Material = Enum.Material.Metal head.CanCollide = false head.Anchored = false head.Parent = hammer -- Weld head to handle local headWeld = Instance.new("WeldConstraint") headWeld.Part0 = handle headWeld.Part1 = head headWeld.Parent = head head.Position = handle.Position + Vector3.new(0,2.5,0) -- Equip logic hammer.Equipped:Connect(function(mouse) local char = player.Character or player.CharacterAdded:Wait() local hand = char:FindFirstChild("RightHand") or char:FindFirstChild("Right Arm") local weld1 = Instance.new("WeldConstraint") weld1.Part0 = handle weld1.Part1 = hand weld1.Parent = handle handle.CFrame = hand.CFrame * CFrame.new(0,-1,0) -- Mouse click: explode + destroy mouse.Button1Down:Connect(function() if mouse.Target and mouse.Target:IsA("BasePart") then local explosion = Instance.new("Explosion") explosion.Position = mouse.Hit.Position explosion.BlastRadius = 5 explosion.BlastPressure = 0 explosion.ExplosionType = Enum.ExplosionType.NoCraters explosion.Parent = workspace task.wait(0.05) mouse.Target:Destroy() end end) end) hammer.Unequipped:Connect(function() if handle.Parent ~= hammer then handle.Parent = hammer head.Parent = hammer end end) hammer.Parent = backpack -- // === ADD TOOL === local addTool = Instance.new("Tool") addTool.Name = "Add" addTool.RequiresHandle = false addTool.CanBeDropped = false addTool.Parent = backpack -- GUI setup local screenGui = Instance.new("ScreenGui") screenGui.Name = "AddToolGui" screenGui.ResetOnSpawn = false screenGui.Enabled = false screenGui.Parent = player:WaitForChild("PlayerGui") -- Shape input local shapeBox = Instance.new("TextBox") shapeBox.PlaceholderText = "Shape (Block, Ball, Cylinder, Wedge, Triangle)" shapeBox.Size = UDim2.new(0, 250, 0, 30) shapeBox.Position = UDim2.new(0.5, -125, 0.1, 0) shapeBox.BackgroundColor3 = Color3.fromRGB(40,40,40) shapeBox.TextColor3 = Color3.new(1,1,1) shapeBox.ClearTextOnFocus = false shapeBox.Parent = screenGui -- Size input local sizeBox = Instance.new("TextBox") sizeBox.PlaceholderText = "Size (XxYxZ)" sizeBox.Size = UDim2.new(0, 250, 0, 30) sizeBox.Position = UDim2.new(0.5, -125, 0.1, 35) sizeBox.BackgroundColor3 = Color3.fromRGB(40,40,40) sizeBox.TextColor3 = Color3.new(1,1,1) sizeBox.ClearTextOnFocus = false sizeBox.Parent = screenGui -- Color input local colorBox = Instance.new("TextBox") colorBox.PlaceholderText = "Color (R,G,B)" colorBox.Size = UDim2.new(0, 250, 0, 30) colorBox.Position = UDim2.new(0.5, -125, 0.1, 70) colorBox.BackgroundColor3 = Color3.fromRGB(40,40,40) colorBox.TextColor3 = Color3.new(1,1,1) colorBox.ClearTextOnFocus = false colorBox.Parent = screenGui -- Defaults local shapeType = "Block" local sizeVec = Vector3.new(3,3,3) local colorVec = Color3.fromRGB(255,255,255) -- Update shape shapeBox.FocusLost:Connect(function() local text = string.lower(shapeBox.Text) if text == "ball" or text == "sphere" or text == "circle" then shapeType = "Ball" elseif text == "cylinder" then shapeType = "Cylinder" elseif text == "wedge" then shapeType = "Wedge" elseif text == "triangle" then shapeType = "Triangle" else shapeType = "Block" end end) -- Update size sizeBox.FocusLost:Connect(function() local text = sizeBox.Text local x,y,z = text:match("(%d+)%D+(%d+)%D+(%d+)") if x and y and z then sizeVec = Vector3.new(tonumber(x), tonumber(y), tonumber(z)) end end) -- Update color colorBox.FocusLost:Connect(function() local text = colorBox.Text local r,g,b = text:match("(%d+)%D*(%d+)%D*(%d+)") if r and g and b then colorVec = Color3.fromRGB(tonumber(r), tonumber(g), tonumber(b)) end end) -- Tool equip addTool.Equipped:Connect(function(mouse) screenGui.Enabled = true mouse.Button1Down:Connect(function() local part if shapeType == "Ball" then part = Instance.new("Part") part.Shape = Enum.PartType.Ball elseif shapeType == "Cylinder" then part = Instance.new("Part") part.Shape = Enum.PartType.Cylinder elseif shapeType == "Wedge" then part = Instance.new("WedgePart") elseif shapeType == "Triangle" then part = Instance.new("Part") local mesh = Instance.new("SpecialMesh") mesh.MeshType = Enum.MeshType.FileMesh mesh.MeshId = "rbxassetid://1033714" -- Example: triangle mesh mesh.Parent = part else part = Instance.new("Part") end part.Size = sizeVec part.Position = mouse.Hit.Position + Vector3.new(0, sizeVec.Y/2, 0) part.Anchored = false part.CanCollide = true part.Color = colorVec part.Material = Enum.Material.SmoothPlastic part.Parent = workspace end) end) addTool.Unequipped:Connect(function() screenGui.Enabled = false end)