Advertisement
Rufus14

you wouldnt steal a tool

Dec 8th, 2019
2,822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.47 KB | None | 0 0
  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. Script1 = Instance.new("Script")
  21. Tool0.Name = "Stealer"
  22. Tool0.Parent = mas
  23. Tool0.TextureId = "http://www.roblox.com/asset/?id=22551415"
  24. Tool0.CanBeDropped = false
  25. Tool0.RequiresHandle = false
  26. Tool0.ToolTip = "you wouldnt steal a tool"
  27. Script1.Parent = Tool0
  28. table.insert(cors,sandbox(Script1,function()
  29. --By Rufus14
  30. tool = script.Parent
  31. equipped = false
  32. owner = nil
  33. cananimate = false
  34. stealin = false
  35. character = nil
  36. sine = 0
  37. runservice = game:GetService("RunService")
  38. anim = "idle"
  39. tool.Equipped:connect(function()
  40.     equipped = true
  41. end)
  42. tool.Unequipped:connect(function()
  43.     equipped = false
  44.     if character:findFirstChild("oksy") then
  45.         character:findFirstChild("oksy"):destroy()
  46.     end
  47.     if character.Head:findFirstChild("its a crime") then
  48.         character.Head:findFirstChild("its a crime"):destroy()
  49.     end
  50.     if character.Torso:findFirstChild("RightLegWeldpiracy") then
  51.         character.Torso:findFirstChild("RightLegWeldpiracy"):destroy()
  52.     end
  53.     if character.Torso:findFirstChild("LeftLegWeldpiracy") then
  54.         character.Torso:findFirstChild("LeftLegWeldpiracy"):destroy()
  55.     end
  56.     if character.Torso:findFirstChild("LeftArmWeldpiracy") then
  57.         character.Torso:findFirstChild("LeftArmWeldpiracy"):destroy()
  58.     end
  59.     if character.Torso:findFirstChild("RightArmWeldpiracy") then
  60.         character.Torso:findFirstChild("RightArmWeldpiracy"):destroy()
  61.     end
  62.     if character.Torso:findFirstChild("HeadWeldpiracy") then
  63.         character.Torso:findFirstChild("HeadWeldpiracy"):destroy()
  64.     end
  65.     if character:findFirstChild("HumanoidRootPart") then
  66.         if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpiracy") then
  67.             character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpiracy"):destroy()
  68.         end
  69.     end
  70. end)
  71. tool.Activated:connect(function()
  72.     if owner ~= nil and character ~= nil and not stealin then
  73.         cananimate = false
  74.         stealin = true
  75.         local leftlegweld = character.Torso:findFirstChild("LeftLegWeldpiracy")
  76.         local rightlegweld = character.Torso:findFirstChild("RightLegWeldpiracy")
  77.         local rightarmweld = character.Torso:findFirstChild("RightArmWeldpiracy")
  78.         local leftarmweld = character.Torso:findFirstChild("LeftArmWeldpiracy")
  79.         local headweld = character.Torso:findFirstChild("HeadWeldpiracy")
  80.         local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpiracy")
  81.         for i = 0,1 , 0.07 do
  82.             rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(2.01083374, 0.5, -0.195486546, 0.642787635, -0.766044497, 0, 9.13498788e-09, 7.6651645e-09, -0.99999994, 0.766044497, 0.642787635, 1.19248824e-08),i)
  83.             leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.68301284, 0.316987038, 1.1920929e-07, 0.866025448, 0.50000006, 0, -0.49999997, 0.866025329, 0, 0, 0, 1.00000012),i)
  84.             leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i)
  85.             rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i)
  86.             rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.173647851, 0, -0.984807849, 0, 1, 0, 0.984807849, 0, 0.173647851),i)
  87.             headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.173648015, 0, 0.984807968, 0, 1, 0, -0.984807968, 0, 0.173648015),i)
  88.             runservice.Stepped:wait()
  89.         end
  90.         for i = 0,1 , 0.07 do
  91.             rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.40641773, 0.5, -0.757115126, 1, 0, 2.22044605e-16, 4.44089183e-16, 1.19248798e-08, -0.99999994, 0, 1, 1.19248815e-08),i)
  92.             leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-2.13939095, 0.457722664, -2.38418579e-07, 0.642787635, 0.766044497, 0, -0.766044319, 0.642787516, 0, 0, 0, 1),i)
  93.             leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i)
  94.             rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i)
  95.             rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.173648521, 0, 0.98480773, 0, 1, 0, -0.98480773, 0, 0.173648521),i)
  96.             headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.173648432, 0, -0.984807849, 0, 1, 0, 0.984807849, 0, 0.173648432),i)
  97.             runservice.Stepped:wait()
  98.         end
  99.         local cangra = true
  100.         for i,v in pairs(workspace:GetDescendants()) do
  101.             if v.ClassName == "Model" and v ~= character then
  102.                 local head = v:findFirstChild("Head")
  103.                 local vhum = v:findFirstChildOfClass("Humanoid")
  104.                 if head and vhum then
  105.                     if (head.Position - character["Right Arm"].Position).magnitude < 4 and vhum.Health > 0 and cangra then
  106.                         cangra = false
  107.                         if v:findFirstChildOfClass("Tool") then
  108.                             v:findFirstChildOfClass("Tool").Parent = owner:findFirstChildOfClass("Backpack")
  109.                         end
  110.                         local plrr = game:GetService("Players"):GetPlayerFromCharacter(v)
  111.                         if plrr then
  112.                             for q,w in pairs(plrr:findFirstChildOfClass("PlayerGui"):GetChildren()) do
  113.                                 if w.ClassName == "Script" then
  114.                                     w:Clone().Parent = owner:findFirstChildOfClass("PlayerGui")
  115.                                 end
  116.                             end
  117.                             for q,w in pairs(plrr:findFirstChildOfClass("Backpack"):GetChildren()) do
  118.                                 if w.ClassName == "Tool" then
  119.                                     w.Parent = owner:findFirstChildOfClass("Backpack")
  120.                                 end
  121.                                 if w.ClassName == "Script" then
  122.                                     w:Clone().Parent = owner:findFirstChildOfClass("Backpack")
  123.                                 end
  124.                             end
  125.                         end
  126.                     end
  127.                 end
  128.             end
  129.         end
  130.         coroutine.wrap(function()
  131.             for i = 0,1 , 0.07 do
  132.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0,1.5,0),i)
  133.                 runservice.Stepped:wait()
  134.             end
  135.         end)()
  136.         stealin = false
  137.         cananimate = true
  138.     end
  139. end)
  140. tool.Equipped:connect(function()
  141.     owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
  142.     character = owner.Character
  143.     stealin = true
  144.     local piracy = Instance.new("Sound", character.Head)
  145.     piracy.SoundId = "rbxassetid://298992911"
  146.     piracy.Looped = true
  147.     piracy.Name = "its a crime"
  148.     piracy.Volume = 6
  149.     piracy.TimePosition = 1
  150.     piracy:Play()
  151.     coroutine.wrap(function()
  152.         while runservice.Stepped:wait() and equipped do
  153.             if piracy.TimePosition > 39 then
  154.                 piracy.TimePosition = 12
  155.             end
  156.         end
  157.     end)()
  158.     local rightarm = Instance.new("Weld", character.Torso)
  159.     rightarm.Part0 = character.Torso
  160.     rightarm.Part1 = character["Right Arm"]
  161.     rightarm.C0 = CFrame.new(1.5,0,0)
  162.     rightarm.Name = "RightArmWeldpiracy"
  163.     local glasses = Instance.new("Part", character)
  164.     glasses.Size = Vector3.new(1,1,1)
  165.     glasses.CanCollide = true
  166.     glasses:BreakJoints()
  167.     glasses.Name = "oksy"
  168.     local meshglasses = Instance.new("SpecialMesh", glasses)
  169.     meshglasses.MeshId = "http://www.roblox.com/asset/?id=1577360"
  170.     meshglasses.TextureId = "http://www.roblox.com/asset/?id=1577349"
  171.     meshglasses.Scale = Vector3.new(1,1.3,1)
  172.     local glassweld = Instance.new("Weld", glasses)
  173.     glassweld.Part0 = character["Right Arm"]
  174.     glassweld.Part1 = glasses
  175.     glassweld.C0 = CFrame.new(-0.943575382, -0.994297981, -0.0166559219, 0.883870006, 0.333259612, -0.328195155, 0.425595224, -0.864079177, 0.268767387, -0.194017246, -0.377233684, -0.905567288)
  176.     for i = 0,0.7 , 0.02 do
  177.         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.22912145, 1.11927986, -0.25297451, 0.884304285, 0.426061481, -0.190991223, 0.357556522, -0.881002724, -0.309818447, -0.300265551, 0.205683619, -0.931415498),i)
  178.         runservice.Stepped:wait()
  179.     end
  180.     stealin = false
  181.     glassweld.Part0 = character.Head
  182.     glassweld.C0 = CFrame.new(0,0.15,-0.15)
  183.     cananimate = true
  184.     local leftarm = Instance.new("Weld", character.Torso)
  185.     leftarm.Part0 = character.Torso
  186.     leftarm.Part1 = character["Left Arm"]
  187.     leftarm.C0 = CFrame.new(-1.5,0,0)
  188.     leftarm.Name = "LeftArmWeldpiracy"
  189.     local rightleg = Instance.new("Weld", character.Torso)
  190.     rightleg.Part0 = character.Torso
  191.     rightleg.Part1 = character["Right Leg"]
  192.     rightleg.C0 = CFrame.new(0.5,-2,0)
  193.     rightleg.Name = "RightLegWeldpiracy"
  194.     local leftleg = Instance.new("Weld", character.Torso)
  195.     leftleg.Part0 = character.Torso
  196.     leftleg.Part1 = character["Left Leg"]
  197.     leftleg.C0 = CFrame.new(-0.5,-2,0)
  198.     leftleg.Name = "LeftLegWeldpiracy"
  199.     local head = Instance.new("Weld", character.Torso)
  200.     head.Part0 = character.Torso
  201.     head.Part1 = character.Head
  202.     head.C0 = CFrame.new(0,1.5,0)
  203.     head.Name = "HeadWeldpiracy"
  204.     local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart)
  205.     humanoidrootpart.Part0 = character.HumanoidRootPart
  206.     humanoidrootpart.Part1 = character.Torso
  207.     humanoidrootpart.Name = "HumanoidRootPartWeldpiracy"
  208.     local rootpart = character.HumanoidRootPart
  209.     local humanoid = character:findFirstChildOfClass("Humanoid")
  210.     coroutine.wrap(function()
  211.         while runservice.Stepped:wait() and equipped do
  212.             if rootpart.Velocity.x >= 2 or rootpart.Velocity.x <= -2 or rootpart.Velocity.z >= 2 or rootpart.Velocity.z <= -2 then
  213.                 if humanoid.FloorMaterial == Enum.Material.Air then
  214.                     if rootpart.Velocity.x >= 17 or rootpart.Velocity.x <= -17 or rootpart.Velocity.z >= 17 or rootpart.Velocity.z <= -17 then
  215.                         if rootpart.Velocity.y >= 3 then
  216.                             anim = "jumprun"
  217.                             --print("jumping (running)")
  218.                         elseif rootpart.Velocity.y <= -3 then
  219.                             anim = "fallrun"
  220.                             --("falling (running)")
  221.                         end
  222.                     else
  223.                         if rootpart.Velocity.y >= 3 then
  224.                             anim = "jump"
  225.                             --print("jumping (walking)")
  226.                         elseif rootpart.Velocity.y <= -3 then
  227.                             anim = "fall"
  228.                             --print("falling (walking)")
  229.                         end
  230.                     end
  231.                 else
  232.                     if rootpart.Velocity.x >= 17 or rootpart.Velocity.x <= -17 or rootpart.Velocity.z >= 17 or rootpart.Velocity.z <= -17 then
  233.                         anim = "run"
  234.                         --print("running")
  235.                     else
  236.                         anim = "walk"
  237.                         --print("walking")
  238.                     end
  239.                 end
  240.             elseif rootpart.Velocity.x <= 2 or rootpart.Velocity.x >= -2 or rootpart.Velocity.z <= 2 or rootpart.Velocity.z >= -2 then
  241.                 if humanoid.FloorMaterial == Enum.Material.Air then
  242.                     if rootpart.Velocity.y >= 3 then
  243.                         anim = "jump"
  244.                         --print("jumping (standing)")
  245.                     elseif rootpart.Velocity.y < -3 then
  246.                         anim = "fall"
  247.                         --print("falling (standing)")
  248.                     end
  249.                 else
  250.                     anim = "idle"
  251.                     --print("standing")
  252.                 end
  253.             end
  254.         end
  255.     end)()
  256.     coroutine.wrap(function()
  257.         while runservice.Stepped:wait() and equipped do
  258.             sine = tick()*50
  259.             if cananimate then
  260.                 if anim == "idle" then
  261.                     humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,math.sin(sine/40)/20,0) * CFrame.Angles(0,0,math.sin(sine/80)/30),0.2)
  262.                     leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,math.rad(-5)+math.cos(sine/40)/20) * CFrame.new(0,-0.5,0),0.2)
  263.                     if not stealin then
  264.                         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,math.rad(5)-math.cos(sine/40)/20) * CFrame.new(0,-0.5,0),0.2)
  265.                     end
  266.                     leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1-math.sin(sine/40)/20,0) * CFrame.Angles(0,0,math.rad(-3)-math.sin(sine/80)/30) * CFrame.new(0,-1,0),0.2)
  267.                     rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1-math.sin(sine/40)/20,0) * CFrame.Angles(0,0,math.rad(3)-math.sin(sine/80)/30) * CFrame.new(0,-1,0),0.2)
  268.                 elseif anim == "walk" then
  269.                     humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,math.sin(sine/3)/15,0) * CFrame.Angles(math.rad(-10),0,rootpart.RotVelocity.y/40+math.cos(sine/6)/30),0.2)
  270.                     leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(-math.sin(sine/6)*1.2,0,math.rad(-5)+math.cos(sine/3)/15) * CFrame.new(0,-0.5,0),0.2)
  271.                     if not stealin then
  272.                         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(math.sin(sine/6)*1.2,0,math.rad(5)-math.cos(sine/3)/15) * CFrame.new(0,-0.5,0),0.2)
  273.                     end
  274.                     leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1+math.cos(sine/6)/4,-math.cos(sine/6)/3) * CFrame.Angles(math.sin(sine/6)*1.1,0,0) * CFrame.new(0,-1,0),0.2)
  275.                     rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1-math.cos(sine/6)/4,math.cos(sine/6)/3) * CFrame.Angles(-math.sin(sine/6)*1.1,0,0) * CFrame.new(0,-1,0),0.2)
  276.                 elseif anim == "jump" then
  277.                     humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(-10),0,0),0.2)
  278.                     leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,-math.rad(10)) * CFrame.new(0,-0.5,0),0.2)
  279.                     if not stealin then
  280.                         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,math.rad(10)) * CFrame.new(0,-0.5,0),0.2)
  281.                     end
  282.                     leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  283.                     rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  284.                 elseif anim == "fall" then
  285.                     humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(10),0,0),0.2)
  286.                     leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,-math.rad(45)) * CFrame.new(0,-0.5,0),0.2)
  287.                     if not stealin then
  288.                         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,math.rad(45)) * CFrame.new(0,-0.5,0),0.2)
  289.                     end
  290.                     leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  291.                     rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  292.                 elseif anim == "run" then
  293.                     humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,-0.2+math.sin(sine/2)/10,0) * CFrame.Angles(math.rad(-20),0,rootpart.RotVelocity.y/35+math.cos(sine/4)/25),0.2)
  294.                     leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(-math.sin(sine/4)*1.5,0,math.rad(-5)+math.cos(sine/4)/6) * CFrame.new(0,-0.5,0),0.2)
  295.                     if not stealin then
  296.                         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(math.sin(sine/4)*1.5,0,math.rad(5)-math.cos(sine/4)/6) * CFrame.new(0,-0.5,0),0.2)
  297.                     end
  298.                     leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1+math.cos(sine/4)/3,-math.cos(sine/4)/2) * CFrame.Angles(math.sin(sine/4)*1.5,0,0) * CFrame.new(0,-1,0),0.2)
  299.                     rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1-math.cos(sine/4)/3,math.cos(sine/4)/2) * CFrame.Angles(-math.sin(sine/4)*1.5,0,0) * CFrame.new(0,-1,0),0.2)
  300.                 elseif anim == "jumprun" then
  301.                     humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(-20),0,0),0.2)
  302.                     leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,-math.rad(10)) * CFrame.new(0,-0.5,0),0.2)
  303.                     if not stealin then
  304.                         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,math.rad(10)) * CFrame.new(0,-0.5,0),0.2)
  305.                     end
  306.                     leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  307.                     rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  308.                 elseif anim == "fallrun" then
  309.                     humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(math.rad(20),0,0),0.2)
  310.                     leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.Angles(0,0,-math.rad(45)) * CFrame.new(0,-0.5,0),0.2)
  311.                     if not stealin then
  312.                         rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.Angles(0,0,math.rad(45)) * CFrame.new(0,-0.5,0),0.2)
  313.                     end
  314.                     leftleg.C0 = leftleg.C0:lerp(CFrame.new(-0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  315.                     rightleg.C0 = rightleg.C0:lerp(CFrame.new(0.5,-1,0) * CFrame.Angles(0,0,0) * CFrame.new(0,-1,0),0.2)
  316.                 end
  317.             end
  318.         end
  319.     end)()
  320. end)
  321. end))
  322. for i,v in pairs(mas:GetChildren()) do
  323.     v.Parent = owner.Character
  324.     pcall(function() v:MakeJoints() end)
  325. end
  326. mas:Destroy()
  327. for i,v in pairs(cors) do
  328.     spawn(function()
  329.         pcall(v)
  330.     end)
  331. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement