Advertisement
JW2

Sandbox Roblox Script (Work for R15)

JW2
Dec 27th, 2022
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. print("This script made by Jackie_Wolfy2. You have to give credit to him.")
  2. local player = game.Players.LocalPlayer
  3. local gui = Instance.new("ScreenGui")
  4. gui.Parent = player.PlayerGui
  5. local mpb = Instance.new("TextButton")
  6. mpb.Parent = gui
  7. mpb.Position = UDim2.new(0.5,0,0.5,0)
  8. mpb.Text = "Make part to make it press Q. if want to delete parts or models press E. Scale mode only works for parts. if want to use it press R for X size, F for Y size and V for Z size. and Anchored Mode is working for any Models or Parts. if want to use it press T."
  9. local sb = Instance.new("TextButton")
  10. sb.Parent = gui
  11. sb.Position = UDim2.new(1,0,1,0)
  12. sb.Text = ""
  13. game.UserInputService.InputBegan:Connect(function(input)
  14. if input.KeyCode == Enum.KeyCode.Q then
  15. local part = Instance.new("Part")
  16. part.Parent = workspace
  17. part.Position = player:GetMouse().hit.Position
  18. print("Success to make part or parts.")
  19. end
  20. if input.KeyCode == Enum.KeyCode.E then
  21. print("Success to Delete model or part.")
  22. if player:GetMouse().Target:IsA("Model") then
  23. player:GetMouse().Target:Destroy()
  24. end
  25. if player:GetMouse().Target:IsA("Part") then
  26. player:GetMouse().Target:Destroy()
  27. end
  28. end
  29. if input.KeyCode == Enum.KeyCode.R then
  30. player:GetMouse().Target.Size += Vector3.new(1,0,0)
  31. end
  32. if input.KeyCode == Enum.KeyCode.F then
  33. player:GetMouse().Target.Size += Vector3.new(0,1,0)
  34. end
  35. if input.KeyCode == Enum.KeyCode.V then
  36. player:GetMouse().Target.Size += Vector3.new(0,0,1)
  37. end
  38. if input.KeyCode == Enum.KeyCode.T then
  39. if player:GetMouse().Target.Anchored == false then
  40. player:GetMouse().Target.Anchored = true
  41. else
  42. player:GetMouse().Target.Anchored = false
  43. end
  44. end
  45. end)
  46. player.Chatted:Connect(function(msg)
  47. if msg == "give me gun" then
  48. local gunPart = Instance.new("MeshPart")
  49. gunPart.Name = "Handle"
  50. local gunTool = Instance.new("Tool")
  51. gunPart.Parent = gunTool
  52. gunTool.Name = "Gun"
  53. gunPart.Position = player.Character:WaitForChild("LeftHand").Position
  54. gunPart.MeshId = "rbxassetid://623102664"
  55. gunTool.Parent = player.Backpack
  56. gunPart.Transparency = 0
  57. end
  58. end)
  59. player:GetMouse().Button1Down:Connect(function()
  60. local shotPart = Instance.new("Part")
  61. shotPart.Parent = workspace
  62. shotPart.Anchored = false
  63. local weld = Instance.new("Weld")
  64. weld.Parent = shotPart
  65. weld.Part0 = shotPart
  66. weld.Part1 = player.Character:WaitForChild("Gun").Handle
  67. shotPart.BrickColor = BrickColor.Yellow()
  68. local clone = shotPart:Clone()
  69. clone:WaitForChild("Weld"):Destroy()
  70. local TweenService = game:GetService("TweenService")
  71. local Tweeninfo = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0)
  72. local Tween = TweenService:Create(clone,Tweeninfo,{Position = Vector3.new(player:GetMouse().hit.Position.X,shotPart.Position.Y,shotPart.Position.Z)})
  73. player:GetMouse().Target:Destroy()
  74. Tween:Play()
  75. print("Success to fire event.")
  76. wait(2)
  77. shotPart:Destroy()
  78. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement