Advertisement
JW2

Sandbox Roblox Script (Work for R15)

JW2
Dec 28th, 2022 (edited)
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("This script made by Jackie_Wolfy2. You have to give credit to him.")
  2. local player = game.Players.LocalPlayer
  3. local UnusedGui = Instance.new("Folder")
  4. UnusedGui.Parent = workspace
  5. UnusedGui.Name = "UnusedGui"
  6. local gui = Instance.new("ScreenGui")
  7. gui.Parent = player.PlayerGui
  8. local mpb = Instance.new("TextButton")
  9. mpb.Parent = gui
  10. mpb.Position = UDim2.new(0.5,0,0.5,0)
  11. mpb.Text = "Make part to make it press Q. if want to delete parts press B."
  12. local colorgui = Instance.new("ScreenGui")
  13. colorgui.Name = "Color Gui"
  14. colorgui.Parent = player.PlayerGui
  15. local rb = Instance.new("TextButton")
  16. rb.Name = "Red Button"
  17. rb.Text = "Anchored Mode is working for any Models or Parts."
  18. local ob = Instance.new("TextButton")
  19. ob.Name = "ob"
  20. ob.Text = ""
  21. ob.Position = UDim2.new(0, 200,0, 50)
  22. rb.Position = UDim2.new(0.449, 0,0.719, 0)
  23. rb.Parent = colorgui
  24. local gb = Instance.new("TextButton")
  25. gb.Name = "gb"
  26. gb.Parent = colorgui
  27. gb.Position = UDim2.new(0.455, 0,0.058, 0)
  28. gb.Text = "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. if want to use it press T. want to color some part? ok! if you want to color part Press Y for tips. H = Red N = Blue U = Green J = Grey M = Black I = Yellow and K = White and press at that part that you select. "
  29. local sb = Instance.new("TextButton")
  30. sb.Parent = gui
  31. sb.Position = UDim2.new(1,0,1,0)
  32. sb.Text = ""
  33. game.UserInputService.InputBegan:Connect(function(input)
  34. if input.KeyCode == Enum.KeyCode.Q then
  35. local part = Instance.new("Part")
  36. part.Parent = workspace
  37. part.Position = player:GetMouse().hit.Position
  38. print("Success to make part or parts.")
  39. end
  40. if input.KeyCode == Enum.KeyCode.B then
  41. print("Success to Delete model or part.")
  42. if player:GetMouse().Target:IsA("Model") then
  43. player:GetMouse().Target:Destroy()
  44. end
  45. if player:GetMouse().Target:IsA("Part") then
  46. player:GetMouse().Target:Destroy()
  47. end
  48. end
  49. if input.KeyCode == Enum.KeyCode.R then
  50. player:GetMouse().Target.Size += Vector3.new(1,0,0)
  51. end
  52. if input.KeyCode == Enum.KeyCode.F then
  53. player:GetMouse().Target.Size += Vector3.new(0,1,0)
  54. end
  55. if input.KeyCode == Enum.KeyCode.V then
  56. player:GetMouse().Target.Size += Vector3.new(0,0,1)
  57. end
  58. if input.KeyCode == Enum.KeyCode.T then
  59. if player:GetMouse().Target.Anchored == false then
  60. player:GetMouse().Target.Anchored = true
  61. else
  62. player:GetMouse().Target.Anchored = false
  63. end
  64. end
  65. if input.KeyCode == Enum.KeyCode.G then
  66. local Dummy = Instance.new("Model")
  67. local Humanoid = Instance.new("Humanoid")
  68. Dummy.Parent = workspace
  69. Humanoid.Parent = Dummy
  70. local HumanoidRootPart = Instance.new("Part")
  71. HumanoidRootPart.Transparency = 1
  72. HumanoidRootPart.Parent = Dummy
  73. HumanoidRootPart.Name = "HumanoidRootPart"
  74. local Torso = Instance.new("Part")
  75. Torso.Name = "Torso"
  76. Torso.Parent = Dummy
  77. local Head = Instance.new("Part")
  78. local SpecialMesh = Instance.new("SpecialMesh")
  79. SpecialMesh.Parent = Head
  80. Head.Parent = Dummy
  81. Head.Name = "Head"
  82. local Weld = Instance.new("Weld")
  83. Weld.Parent = HumanoidRootPart
  84. Weld.Part0 = HumanoidRootPart
  85. Weld.Part1 = Torso
  86. local Weld = Instance.new("Weld")
  87. Weld.Parent = Torso
  88. Weld.Part0 = Torso
  89. Weld.Part1 = Head
  90. Dummy:MoveTo(player:GetMouse().hit.Position)
  91. local LeftLeg = Instance.new("Part")
  92. end
  93. if input.KeyCode == Enum.KeyCode.H then
  94. if player:GetMouse().Target:IsA("Part") then
  95. player:GetMouse().Target.BrickColor = BrickColor.Red()
  96. end
  97. end
  98. if input.KeyCode == Enum.KeyCode.N then
  99. if player:GetMouse().Target:IsA("Part") then
  100. player:GetMouse().Target.BrickColor = BrickColor.Blue()
  101. end
  102. end
  103. if input.KeyCode == Enum.KeyCode.U then
  104. if player:GetMouse().Target:IsA("Part") then
  105. player:GetMouse().Target.BrickColor = BrickColor.Green()
  106. end
  107. end
  108. if input.KeyCode == Enum.KeyCode.J then
  109. if player:GetMouse().Target:IsA("Part") then
  110. player:GetMouse().Target.BrickColor = BrickColor.Gray()
  111. end
  112. end
  113. if input.KeyCode == Enum.KeyCode.M then
  114. if player:GetMouse().Target:IsA("Part") then
  115. player:GetMouse().Target.BrickColor = BrickColor.Black()
  116. end
  117. end
  118. if input.KeyCode == Enum.KeyCode.I then
  119. if player:GetMouse().Target:IsA("Part") then
  120. player:GetMouse().Target.BrickColor = BrickColor.Yellow()
  121. end
  122. end
  123. if input.KeyCode == Enum.KeyCode.K then
  124. if player:GetMouse().Target:IsA("Part") then
  125. player:GetMouse().Target.BrickColor = BrickColor.White()
  126. end
  127. end
  128. end)
  129. player.Chatted:Connect(function(msg)
  130. if msg == "give me destroyer" then
  131. local gunPart = Instance.new("MeshPart")
  132. gunPart.Name = "Handle"
  133. local gunTool = Instance.new("Tool")
  134. gunPart.Parent = gunTool
  135. gunTool.Name = "Gun"
  136. gunPart.Position = player.Character:WaitForChild("LeftHand").Position
  137. gunPart.MeshId = "rbxassetid://623102664"
  138. gunTool.Parent = player.Backpack
  139. gunPart.Transparency = 0
  140. gunTool.TextureId = "http://www.roblox.com/asset/?id=11951757824"
  141. end
  142. if msg == "give me sword" then
  143. local SwordPart = Instance.new("MeshPart")
  144. SwordPart .Name = "Handle"
  145. local SwordTool = Instance.new("Tool")
  146. SwordTool.Parent = gunTool
  147. SwordTool.Name = "Sword"
  148. SwordPart.Position = player.Character:WaitForChild("LeftHand").Position
  149. SwordTool.TextureId = "http://www.roblox.com/asset/?id=11952931040"
  150. SwordTool.Parent = player.Backpack
  151. SwordPart.Transparency = 0
  152. end
  153. if msg == "tp" then
  154. player.Character:MoveTo(player:GetMouse().hit.Position)
  155. player.Character.HumanoidRootPart.Anchored = true
  156. wait(2)
  157. character.HumanoidRootPart.Anchored = false
  158. end
  159. if msg == "unanchoredHumanoidRootPart" then
  160. player.Character.HumanoidRootPart.Anchored = false
  161. end
  162. if input == "kill all" then
  163. game.Players:GetChildren().Character.Humanoid.Health = 0
  164. end
  165. end)
  166. player:GetMouse().Button1Down:Connect(function()
  167. player.Character:WaitForChild("Gun").Equipped:Connect(function()
  168. local shotPart = Instance.new("Part")
  169. shotPart.Parent = workspace
  170. shotPart.Anchored = false
  171. local weld = Instance.new("Weld")
  172. weld.Parent = shotPart
  173. weld.Part0 = shotPart
  174. weld.Part1 = player.Character:WaitForChild("Gun").Handle
  175. shotPart.BrickColor = BrickColor.Yellow()
  176. local clone = shotPart:Clone()
  177. clone:WaitForChild("Weld"):Destroy()
  178. local TweenService = game:GetService("TweenService")
  179. local Tweeninfo = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0)
  180. local Tween = TweenService:Create(clone,Tweeninfo,{Position = Vector3.new(player:GetMouse().hit.Position.X,shotPart.Position.Y,shotPart.Position.Z)})
  181. player:GetMouse().Target:Destroy()
  182. Tween:Play()
  183. print("Success to fire event.")
  184. wait(2)
  185. shotPart:Destroy()
  186. end)
  187. end)
  188. player.Backpack:WaitForChild("Sword").Equipped:Connect(function()
  189. if mouse.Target then
  190. mouse.Target:FindFirstChild("Humanoid"):TakeDamage(100)
  191. end
  192. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement