Advertisement
TheUnknownDiscord

funny cube

Jul 31st, 2021 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --By Rufus14
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4.     local env = getfenv(func)
  5.     local newenv = setmetatable({},{
  6.         __index = function(self,k)
  7.             if k=="script" then
  8.                 return var
  9.             else
  10.                 return env[k]
  11.             end
  12.         end,
  13.     })
  14.     setfenv(func,newenv)
  15.     return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. ParticleEmitter3 = Instance.new("ParticleEmitter")
  22. Weld4 = Instance.new("Weld")
  23. Script5 = Instance.new("Script")
  24. Part6 = Instance.new("Part")
  25. Tool0.Name = "Soap"
  26. Tool0.Parent = mas
  27. Tool0.ToolTip = "the soap does 100 million damage now because it's funny."
  28. Part1.Name = "Handle"
  29. Part1.Parent = Tool0
  30. Part1.CFrame = CFrame.new(0.500000358, 1.5, -2.50001812, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  31. Part1.Position = Vector3.new(0.500000358, 1.5, -2.50001812)
  32. Part1.Color = Color3.new(1, 0.596078, 0.894118)
  33. Part1.Size = Vector3.new(2.5, 2.5, 2.5)
  34. Part1.BottomSurface = Enum.SurfaceType.Smooth
  35. Part1.BrickColor = BrickColor.new("Crimson")
  36. Part1.TopSurface = Enum.SurfaceType.Smooth
  37. Part1.brickColor = BrickColor.new("Crimson")
  38. ParticleEmitter3.Parent = Part1
  39. ParticleEmitter3.Speed = NumberRange.new(0.5, 0.5)
  40. ParticleEmitter3.LightEmission = 1
  41. ParticleEmitter3.LightInfluence = 1
  42. ParticleEmitter3.Texture = "http://www.roblox.com/asset/?id=838062436"
  43. ParticleEmitter3.Transparency = NumberSequence.new(0,1)
  44. ParticleEmitter3.Size = NumberSequence.new(0.20000000298023,0.20000000298023)
  45. ParticleEmitter3.Drag = 1
  46. ParticleEmitter3.Lifetime = NumberRange.new(3, 3)
  47. ParticleEmitter3.Rate = 1.5
  48. ParticleEmitter3.SpreadAngle = Vector2.new(0, 360)
  49. Weld4.Parent = Part1
  50. Weld4.Part0 = Part1
  51. Weld4.Part1 = Part6
  52. Weld4.part1 = Part6
  53. Script5.Parent = Tool0
  54. table.insert(cors,sandbox(Script5,function()
  55. --By Rufus14
  56. damage = 1e+09
  57. --
  58. tool = script.Parent
  59. handle = tool.Handle
  60. hitbox = tool.hitbox
  61. players = game:GetService("Players")
  62. runservice = game:GetService("RunService")
  63.  
  64. owner = nil
  65. character = nil
  66. playerhum = nil
  67.  
  68. equipped = false
  69. candamage = false
  70.  
  71. function swait(HOWMANY)
  72.     for i = 1,HOWMANY do
  73.         runservice.Stepped:wait()
  74.     end
  75. end
  76.  
  77. function gibbie(where, howlong)
  78.     local gibbieeeee = Instance.new("SpawnLocation", workspace)
  79.     gibbieeeee.Neutral = false
  80.     gibbieeeee:BreakJoints()
  81.     gibbieeeee.Size = Vector3.new(1.4, 1.6, 3.2)
  82.     gibbieeeee.CFrame = where
  83.     local gibyyyyyy = Instance.new("SpecialMesh", gibbieeeee)
  84.     gibyyyyyy.Scale = Vector3.new(0.75+math.random(-10,10)/30, 0.75+math.random(-10,10)/30, 1.5+math.random(-10,10)/30)
  85.     gibyyyyyy.MeshId = "http://www.roblox.com/asset/?id=1290033"
  86.     gibyyyyyy.TextureId = "http://www.roblox.com/asset/?id=1290030"
  87.     gibyyyyyy.VertexColor = Vector3.new(1,0,0)
  88.     game.Debris:AddItem(gibbieeeee, howlong)
  89. end
  90.  
  91. tool.Unequipped:connect(function()
  92.     equipped = false
  93. end)
  94.  
  95. tool.Equipped:connect(function()
  96.     equipped = true
  97.     owner = players:GetPlayerFromCharacter(tool.Parent)
  98.     character = owner.Character
  99.     playerhum = character:findFirstChildOfClass("Humanoid")
  100.     local rightgrip
  101.     if playerhum.RigType == Enum.HumanoidRigType.R6 then
  102.         rightgrip = character["Right Arm"]:WaitForChild("RightGrip")
  103.     elseif playerhum.RigType == Enum.HumanoidRigType.R15 then
  104.         rightgrip = character["RightHand"]:WaitForChild("RightGrip")
  105.     end
  106.     coroutine.wrap(function()
  107.         while equipped and runservice.Stepped:wait() do
  108.             if playerhum.RigType == Enum.HumanoidRigType.R15 then
  109.                 rightgrip.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(math.sin(tick()*1.5)/6,math.cos(tick()*1.5),0)
  110.             elseif playerhum.RigType == Enum.HumanoidRigType.R6 then
  111.                 rightgrip.C0 = CFrame.new(0,-1.1,0) * CFrame.fromEulerAnglesXYZ(math.sin(tick()*1.5)/6,math.cos(tick()*1.5),0)
  112.             end
  113.         end
  114.     end)()
  115. end)
  116.  
  117. tool.Activated:connect(function()
  118.     tool.Parent = workspace
  119.     handle.CFrame = character.Head.CFrame * CFrame.new(0,-1,-3.5)
  120.         candamage = false
  121.     local velocity = Instance.new("BodyVelocity", handle)
  122.     velocity.Velocity = character.Head.CFrame.lookVector * 100
  123.     velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  124.     coroutine.wrap(function()
  125.         wait(0.25)
  126.         velocity:destroy()
  127.         wait(0.75)
  128.         candamage = false
  129.     end)()
  130. end)
  131.  
  132. function killfunction(WHAT)
  133.     if WHAT.Parent == nil then return end
  134.     local humanoid = WHAT.Parent:findFirstChildOfClass("Humanoid")
  135.     if humanoid and candamage then
  136.         if humanoid.MaxHealth == math.huge then
  137.             humanoid.MaxHealth = damage
  138.         end
  139.         humanoid.Health = humanoid.Health - damage
  140.         if humanoid.Health <= 0 then
  141.             local mainpart = Instance.new("UnionOperation", workspace)
  142.             mainpart.Anchored = true
  143.             mainpart.Transparency = 1
  144.             mainpart.CFrame = WHAT.CFrame
  145.             mainpart.Size = Vector3.new(0.1,0.1,0.1)
  146.             if humanoid.Parent:findFirstChild(tool) then
  147.                 humanoid.Parent:findFirstChild(tool).Parent = workspace
  148.             end
  149.             for i,v in pairs(humanoid.Parent:GetDescendants()) do
  150.                 if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  151.                     v:destroy()
  152.                 end
  153.             end
  154.             --gibby
  155.             for i = 1,3 do
  156.                 gibbie(mainpart.CFrame * CFrame.new(math.random(-4,4),0,math.random(-4,4)) * CFrame.fromEulerAnglesXYZ(0,math.random(-10,10)/5,0), 30)
  157.             end
  158.             local splatter = Instance.new("ParticleEmitter", mainpart)
  159.             splatter.Speed = NumberRange.new(100, 100)
  160.             splatter.Color = ColorSequence.new(Color3.new(0.709804, 0, 0.0117647),Color3.new(0.709804, 0, 0.0117647))
  161.             splatter.LightInfluence = 1
  162.             splatter.Texture = "http://www.roblox.com/asset/?id=242201991"
  163.             splatter.Transparency = NumberSequence.new(0.75,1)
  164.             splatter.Size = NumberSequence.new(5,5)
  165.             splatter.Acceleration = Vector3.new(0, -5, 0)
  166.             splatter.Drag = 50
  167.             splatter.Lifetime = NumberRange.new(4, 5)
  168.             splatter.Rate = 700
  169.             splatter.RotSpeed = NumberRange.new(3, 3)
  170.             splatter.SpreadAngle = Vector2.new(0, 360)
  171.             local ouch = Instance.new("Sound", mainpart)
  172.             ouch.SoundId = "rbxassetid://4459572527"
  173.             ouch.Volume = 2
  174.             ouch.PlaybackSpeed = 1+(math.random(-10,10)/50)
  175.             ouch:Play()
  176.             game.Debris:AddItem(mainpart, 10)
  177.             swait(5)
  178.             splatter.Enabled = false
  179.         end
  180.     end
  181. end
  182. hitbox.Touched:connect(killfunction)
  183. end))
  184. Part6.Name = "hitbox"
  185. Part6.Parent = Tool0
  186. Part6.CFrame = CFrame.new(0.500000358, 1.5, -2.50001812, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  187. Part6.Position = Vector3.new(0.500000358, 1.5, -2.50001812)
  188. Part6.Color = Color3.new(1, 0.596078, 0.894118)
  189. Part6.Transparency = 1
  190. Part6.Size = Vector3.new(2.5, 2.5, 2.5)
  191. Part6.BottomSurface = Enum.SurfaceType.Smooth
  192. Part6.BrickColor = BrickColor.new("Crimson")
  193. Part6.CanCollide = false
  194. Part6.TopSurface = Enum.SurfaceType.Smooth
  195. Part6.brickColor = BrickColor.new("Crimson")
  196. for i,v in pairs(mas:GetChildren()) do
  197.     v.Parent = owner.Character
  198.     pcall(function() v:MakeJoints() end)
  199. end
  200. mas:Destroy()
  201. for i,v in pairs(cors) do
  202.     spawn(function()
  203.         pcall(v)
  204.     end)
  205. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement