Advertisement
OOOFHi43ism

IDK

Apr 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Part1 = Instance.new("Part")
  20. SpecialMesh2 = Instance.new("SpecialMesh")
  21. Sound3 = Instance.new("Sound")
  22. Script4 = Instance.new("Script")
  23. Script5 = Instance.new("Script")
  24. Animation6 = Instance.new("Animation")
  25. LocalScript7 = Instance.new("LocalScript")
  26. Script8 = Instance.new("Script")
  27. Tool0.Name = "DecoyDeploy"
  28. Tool0.Parent = mas
  29. Tool0.TextureId = "http://www.roblox.com/asset/?id=29516265"
  30. Tool0.GripForward = Vector3.new(-0, -0, 1)
  31. Tool0.GripPos = Vector3.new(-0.200000003, 0, -0.150000006)
  32. Tool0.GripRight = Vector3.new(-1, 0, 0)
  33. Part1.Name = "Handle"
  34. Part1.Parent = Tool0
  35. Part1.Rotation = Vector3.new(-179.98999, 37.9300003, 180)
  36. Part1.FormFactor = Enum.FormFactor.Symmetric
  37. Part1.Size = Vector3.new(1, 1, 1)
  38. Part1.CFrame = CFrame.new(6.41808987, 2.50013089, 1.29437196, -0.788797498, -2.63914299e-05, 0.614653111, 9.74847644e-05, 1, 0.000168041413, -0.614653111, 0.000192469975, -0.788797498)
  39. Part1.Position = Vector3.new(6.41808987, 2.50013089, 1.29437196)
  40. Part1.Orientation = Vector3.new(-0.00999999978, 142.069992, 0.00999999978)
  41. SpecialMesh2.Parent = Part1
  42. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=29515710"
  43. SpecialMesh2.Scale = Vector3.new(1.89999998, 1.89999998, 1.89999998)
  44. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=29515756"
  45. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  46. SpecialMesh2.Scale = Vector3.new(1.89999998, 1.89999998, 1.89999998)
  47. Sound3.Name = "Drink"
  48. Sound3.Parent = Part1
  49. Sound3.SoundId = "http://www.roblox.com/asset/?id=29529397"
  50. Sound3.Volume = 0.80000001192093
  51. Script4.Name = "Welder"
  52. Script4.Parent = Tool0
  53. Script4.Disabled = true
  54. table.insert(cors,sandbox(Script4,function()
  55. local noob= script.Parent
  56.  
  57.  
  58.  
  59. noob.Torso.Anchored = true
  60.  
  61. noob:FindFirstChild("Left Arm").Anchored = true
  62.  
  63. noob:FindFirstChild("Right Arm").Anchored = true
  64.  
  65. noob:FindFirstChild("Left Leg").Anchored = true
  66.  
  67. noob:FindFirstChild("Right Leg").Anchored = true
  68.  
  69. noob.Head.Anchored = true
  70.  
  71.  
  72.  
  73. local keepYoHead = Instance.new("Weld")
  74.  
  75. keepYoHead.Part0 = noob.Head
  76.  
  77. keepYoHead.Part1 = noob.Torso
  78.  
  79. keepYoHead.C0 = CFrame.new(0,-1.5,0)
  80.  
  81. keepYoHead.Parent = noob.Head
  82.  
  83.  
  84.  
  85. local keepYoRightArm = Instance.new("Weld")
  86.  
  87. keepYoRightArm.Part0 = noob.Torso
  88.  
  89. keepYoRightArm.Part1 = noob:FindFirstChild("Right Arm")
  90.  
  91. keepYoRightArm.C0 = CFrame.new(1.5,0,0)
  92.  
  93. keepYoRightArm.Parent = noob.Torso
  94.  
  95.  
  96.  
  97. local keepYoLeftArm = Instance.new("Weld")
  98.  
  99. keepYoLeftArm.Part0 = noob.Torso
  100.  
  101. keepYoLeftArm.Part1 = noob:FindFirstChild("Left Arm")
  102.  
  103. keepYoLeftArm.C0 = CFrame.new(-1.5,0,0)
  104.  
  105. keepYoLeftArm.Parent = noob.Torso
  106.  
  107.  
  108.  
  109. local keepYoLeftLeg = Instance.new("Weld")
  110.  
  111. keepYoLeftLeg.Part0 = noob.Torso
  112.  
  113. keepYoLeftLeg.Part1 = noob:FindFirstChild("Left Leg")
  114.  
  115. keepYoLeftLeg.C0 = CFrame.new(-0.5,-2,0)
  116.  
  117. keepYoLeftLeg.Parent = noob.Torso
  118.  
  119.  
  120.  
  121. local keepYoRightLeg = Instance.new("Weld")
  122.  
  123. keepYoRightLeg.Part0 = noob.Torso
  124.  
  125. keepYoRightLeg.Part1 = noob:FindFirstChild("Right Leg")
  126.  
  127. keepYoRightLeg.C0 = CFrame.new(0.5,-2,0)
  128.  
  129. keepYoRightLeg.Parent = noob.Torso
  130.  
  131.  
  132.  
  133. noob.Torso.Anchored = false
  134.  
  135. noob:FindFirstChild("Left Arm").Anchored = false
  136.  
  137. noob:FindFirstChild("Right Arm").Anchored = false
  138.  
  139. noob:FindFirstChild("Left Leg").Anchored = false
  140.  
  141. noob:FindFirstChild("Right Leg").Anchored = false
  142.  
  143. noob.Head.Anchored = false
  144.  
  145.  
  146.  
  147. print("welded")
  148.  
  149.  
  150. end))
  151. Script5.Name = "SelfDestruct"
  152. Script5.Parent = Tool0
  153. Script5.Disabled = true
  154. table.insert(cors,sandbox(Script5,function()
  155. local humanoid = script.Parent:FindFirstChild("Humanoid")
  156.  
  157. local torso = script.Parent:FindFirstChild("Torso")
  158.  
  159.  
  160.  
  161. function destroyAll()
  162.  
  163.  
  164.  
  165. local e = Instance.new("Explosion")
  166.  
  167. e.Parent = game.Workspace
  168.  
  169. e.Position = torso.Position
  170.  
  171. e.BlastPressure = 100000
  172.  
  173. e.BlastRadius = 15
  174.  
  175. wait(1)
  176.  
  177. script.Parent:remove()
  178.  
  179.  
  180.  
  181. end
  182.  
  183.  
  184.  
  185. humanoid.Died:connect(destroyAll)
  186.  
  187.  
  188. end))
  189. Animation6.Name = "drink"
  190. Animation6.Parent = Tool0
  191. Animation6.AnimationId = "http://www.roblox.com/Asset?ID=29517689"
  192. LocalScript7.Name = "AnimScript"
  193. LocalScript7.Parent = Tool0
  194. table.insert(cors,sandbox(LocalScript7,function()
  195. local Tool = script.Parent
  196.  
  197. local humanoid = nil
  198.  
  199. local drinker = nil
  200.  
  201. local con = nil
  202.  
  203. local enabled = false
  204.  
  205.  
  206.  
  207. function onEquipped(mouse)
  208.  
  209.  
  210.  
  211. humanoid = Tool.Parent:FindFirstChild("Humanoid")
  212.  
  213. if humanoid ~= nil then
  214.  
  215. drinker = humanoid:LoadAnimation(Tool.drink)
  216.  
  217. end
  218.  
  219. con = mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  220.  
  221.  
  222.  
  223. end
  224.  
  225.  
  226.  
  227. function onUnequipped(mouse)
  228.  
  229.  
  230.  
  231. humanoid = nil
  232.  
  233. if drinker ~= nil then
  234.  
  235. drinker:remove()
  236.  
  237. drinker = nil
  238.  
  239. end
  240.  
  241. if con ~= nil then
  242.  
  243. con:disconnect()
  244.  
  245. end
  246.  
  247.  
  248.  
  249. end
  250.  
  251.  
  252.  
  253. function onButton1Down(mouse)
  254.  
  255.  
  256.  
  257. if enabled then
  258.  
  259. return
  260.  
  261. end
  262.  
  263.  
  264.  
  265. enabled = true
  266.  
  267.  
  268.  
  269.  
  270.  
  271. drinker:Play()
  272.  
  273. wait(3000000)
  274.  
  275.  
  276.  
  277. enabled = false
  278.  
  279.  
  280.  
  281.  
  282.  
  283. end
  284.  
  285.  
  286.  
  287. Tool.Equipped:connect(onEquipped)
  288.  
  289. Tool.Unequipped:connect(onUnequipped)
  290.  
  291.  
  292. end))
  293. Script8.Name = "DecoyDeployScript"
  294. Script8.Parent = Tool0
  295. table.insert(cors,sandbox(Script8,function()
  296. local Tool = script.Parent
  297.  
  298. local decoy = nil
  299.  
  300. local humanoid = nil
  301.  
  302. local enabled = false
  303.  
  304. local amountInFront = 10
  305.  
  306. local debris = game:GetService("Debris")
  307.  
  308.  
  309.  
  310. function onEquipped()
  311.  
  312.  
  313.  
  314. humanoid = Tool.Parent:FindFirstChild("Humanoid")
  315.  
  316.  
  317.  
  318. end
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326. function onUnequipped()
  327.  
  328.  
  329.  
  330. end
  331.  
  332.  
  333.  
  334.  
  335.  
  336. function createDecoy()
  337.  
  338.  
  339.  
  340. if humanoid ~= nil then
  341.  
  342.  
  343.  
  344. local lookVector = humanoid.Parent.Torso.CFrame.lookVector
  345.  
  346. local denom = math.abs(lookVector.x) + math.abs(lookVector.z)
  347.  
  348. local posX = amountInFront * (lookVector.x/denom)
  349.  
  350. local posZ = amountInFront * (lookVector.z/denom)
  351.  
  352.  
  353.  
  354. Tool.Parent.archivable = true
  355.  
  356. decoy = Tool.Parent:clone()
  357.  
  358. Tool.Parent.archivable = false
  359.  
  360.  
  361.  
  362. local cloneStuff = decoy:GetChildren()
  363.  
  364. for i = 1, #cloneStuff do
  365.  
  366. if cloneStuff[i].className == "Tool" or cloneStuff[i].className == "ForceField" then
  367.  
  368. cloneStuff[i]:remove()
  369.  
  370. end
  371.  
  372. end
  373.  
  374.  
  375.  
  376. decoy.Parent = game.Workspace
  377.  
  378. decoy:MoveTo(Vector3.new(posX + humanoid.Parent.Torso.Position.x,humanoid.Parent.Torso.Position.y,posZ + humanoid.Parent.Torso.Position.z))
  379.  
  380.  
  381.  
  382.  
  383.  
  384. plyr = Tool.Parent
  385.  
  386. for i, v in pairs(plyr:GetChildren()) do
  387.  
  388. if v.className == "Hat" then
  389.  
  390. hat = Instance.new("Hat")
  391.  
  392. Hpart = v.Handle:clone()
  393.  
  394. Hpart.Parent = hat
  395.  
  396. Hpart.Position = decoy.Head.Position
  397.  
  398. hat.Name = v.Name
  399.  
  400. hat.Parent = decoy
  401.  
  402. hat.AttachmentPos = v.AttachmentPos
  403.  
  404. hat.AttachmentRight = v.AttachmentRight
  405.  
  406. hat.AttachmentUp = v.AttachmentUp
  407.  
  408. hat.AttachmentForward = v.AttachmentForward
  409.  
  410. end
  411.  
  412. end
  413.  
  414.  
  415.  
  416.  
  417.  
  418. local weldScript = Tool.Welder:clone()
  419.  
  420. weldScript.Parent = decoy
  421.  
  422. decoy.Welder.Disabled = false
  423.  
  424.  
  425.  
  426. local destroyScript = Tool.SelfDestruct:clone()
  427.  
  428. destroyScript.Parent = decoy
  429.  
  430. decoy.SelfDestruct.Disabled = false
  431.  
  432.  
  433.  
  434. debris:AddItem(decoy,math.random(6000,9000))
  435.  
  436. end
  437.  
  438.  
  439.  
  440. end
  441.  
  442.  
  443.  
  444.  
  445.  
  446. function onActivated()
  447.  
  448.  
  449.  
  450. if enabled then
  451.  
  452. return
  453.  
  454. end
  455.  
  456.  
  457.  
  458. enabled = true
  459.  
  460.  
  461.  
  462. Tool.Handle.Drink:Play()
  463.  
  464. createDecoy()
  465.  
  466. wait(.01)
  467.  
  468.  
  469.  
  470. enabled = false
  471.  
  472.  
  473.  
  474. end
  475.  
  476.  
  477.  
  478. Tool.Equipped:connect(onEquipped)
  479.  
  480. Tool.Unequipped:connect(Unequipped)
  481.  
  482. Tool.Activated:connect(onActivated)
  483.  
  484.  
  485. end))
  486. for i,v in pairs(mas:GetChildren()) do
  487. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  488. pcall(function() v:MakeJoints() end)
  489. end
  490. mas:Destroy()
  491. for i,v in pairs(cors) do
  492. spawn(function()
  493. pcall(v)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement