Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Insert in a LocalScript inside of StarterPack
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local val
- mouse.Button1Down:connect(function()
- if mouse.Target and mouse.Target.Name ~= "Baseplate" then
- local block = Instance.new("Part", workspace) -- new Block
- block.Anchored = true
- block.Size = Vector3.new(4,4,4) -- block size
- block.BrickColor = BrickColor.White()
- block.Name = "TempBlock"
- end
- end)
- mouse.Button1Up:connect(function()
- if mouse.Target and mouse.Target.Name ~= "Baseplate" then
- local foundBlock = workspace:FindFirstChild("TempBlock")
- foundBlock.CFrame = CFrame.new(mouse.Target.Position) + Vector3.new(0,4,0)
- foundBlock.Name = "PlacedBlock"
- end
- end)
- mouse.KeyUp:connect(function(k)
- local key = k:lower()
- if key == "r" then
- if mouse.Target.Name == "PlacedBlock" then
- mouse.Target:Destroy()
- end
- end
- end)
Advertisement
Comments
-
- i wanna make my own script
-
- Hmm i cant create my script idk how the password idk
Add Comment
Please, Sign In to add comment
Advertisement