That should be a very simple script.
local TextButton = -- your text button
TextButton.MouseButton1Click:Connect(function()
local Block = Instance.new("Part")
Block.Anchored = true
Block.Parent = workspace
end)
This should be a LocalScript.
If you’re looking to show the block to the whole server, then you’d have to use a RemoteEvent.