Advertisement
BNutty07

"The Figure"

Nov 5th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.08 KB | None | 0 0
  1.  
  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. SpecialMesh2 = Instance.new("SpecialMesh")
  22. Sound3 = Instance.new("Sound")
  23. LocalScript4 = Instance.new("LocalScript")
  24. LocalScript5 = Instance.new("LocalScript")
  25. Script6 = Instance.new("Script")
  26. Script7 = Instance.new("Script")
  27. LocalScript8 = Instance.new("LocalScript")
  28. IntValue9 = Instance.new("IntValue")
  29. Script10 = Instance.new("Script")
  30. ObjectValue11 = Instance.new("ObjectValue")
  31. Script12 = Instance.new("Script")
  32. BoolValue13 = Instance.new("BoolValue")
  33. BoolValue14 = Instance.new("BoolValue")
  34. Tool0.Name = "Metamorphosis"
  35. Tool0.Parent = mas
  36. Tool0.TextureId = "http://www.roblox.com/asset/?id=121561117"
  37. Tool0.GripForward = Vector3.new(0, 0.287347883, -0.957826257)
  38. Tool0.GripPos = Vector3.new(0, -0.300000012, 0.100000001)
  39. Tool0.GripUp = Vector3.new(0, 0.957826257, 0.287347883)
  40. Part1.Name = "Handle"
  41. Part1.Parent = Tool0
  42. Part1.BrickColor = BrickColor.new("Dark stone grey")
  43. Part1.Reflectance = 0.40000000596046
  44. Part1.Rotation = Vector3.new(-18.4499989, 16.6800003, 5.46999979)
  45. Part1.CanCollide = false
  46. Part1.Locked = true
  47. Part1.FormFactor = Enum.FormFactor.Plate
  48. Part1.Size = Vector3.new(1, 0.800000012, 1)
  49. Part1.CFrame = CFrame.new(-28.0952377, 164.13063, 105.529587, 0.953575373, -0.0913178995, 0.286975592, -1.57025526e-14, 0.952918589, 0.303226173, -0.301154405, -0.289149046, 0.908679724)
  50. Part1.BottomSurface = Enum.SurfaceType.Smooth
  51. Part1.TopSurface = Enum.SurfaceType.Smooth
  52. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  53. Part1.Position = Vector3.new(-28.0952377, 164.13063, 105.529587)
  54. Part1.Orientation = Vector3.new(-17.6499996, 17.5299988, 0)
  55. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  56. SpecialMesh2.Parent = Part1
  57. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=37241605"
  58. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  59. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=37241842"
  60. SpecialMesh2.VertexColor = Vector3.new(0.100000001, 0.5, 0)
  61. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  62. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  63. Sound3.Parent = Part1
  64. Sound3.SoundId = "http://www.roblox.com/asset/?id=138208170"
  65. Sound3.Volume = 1
  66. LocalScript4.Name = "MetamorphScript"
  67. LocalScript4.Parent = Tool0
  68. table.insert(cors,sandbox(LocalScript4,function()
  69. function waitForChild(instance, name)
  70.     while not instance:FindFirstChild(name) do
  71.         instance.ChildAdded:wait()
  72.     end
  73. end
  74.  
  75.  
  76. local Tool = script.Parent
  77.  
  78. enabled = true
  79. game:GetService("ContentProvider"):Preload("rbxasset://icons/delete_sel.png")
  80.  
  81. local cluster = nil
  82.  
  83. local selectionBox
  84. local currentSelection
  85. local currentSelectionColors = {}
  86. local selectionLasso
  87.  
  88. local deleteDistance = 10000
  89. local player = nil
  90. --local playerModel = nil
  91. local playerModel = game.Workspace
  92. local buildingPlate = nil
  93.  
  94. local highlight = false
  95.  
  96. local megaClusterSelectionBox = Instance.new("Part")
  97. megaClusterSelectionBox.FormFactor = "Custom"
  98. megaClusterSelectionBox.Size = Vector3.new(4, 4, 4) -- a little thicker than 4x4x4 unit clusterpart; just so selection box is more easily seen
  99. megaClusterSelectionBox.Transparency = 1
  100. megaClusterSelectionBox.Anchored = true
  101. megaClusterSelectionBox.CanCollide = false
  102. megaClusterSelectionBox.Parent = nil
  103.  
  104. waitForChild(Tool, "IsRestricted")
  105. local isRestricted = Tool.IsRestricted.Value
  106.  
  107. waitForChild(Tool, "AutoWedgeClusterParts")
  108. local autoWedgeClusterParts = Tool.AutoWedgeClusterParts.Value
  109.  
  110. function hint(label)
  111.  
  112.     -- Pass in a string, it shows a top hint.  (Replaces previous hint, if exists)
  113.     _player = game.Players:GetPlayerFromCharacter(Tool.Parent)
  114.     if(_player ~= nil and _player.PlayerGui:FindFirstChild("topHint")~=nil) then
  115.         local topHint = _player.PlayerGui.topHint
  116.         topHint.Add.Label.Value = label
  117.         topHint.Add.Width.Value = 3 -- widest width
  118.         topHint.Add.Time.Value = 5
  119.         topHint.Add.Disabled = true
  120.         topHint.Add.Disabled = false
  121.     end
  122.  
  123. end
  124.  
  125. local function weldBetween(a, b)
  126.     local weld = Instance.new("ManualWeld")
  127.     weld.Part0 = a
  128.     weld.Part1 = b
  129.     weld.C0 = CFrame.new()
  130.     weld.C1 = b.CFrame:inverse() * a.CFrame
  131.     weld.Parent = a
  132.     return weld;
  133. end
  134.  
  135. function canDeleteObject(part)
  136.     -- let them delete anything that they created *or* anything on their baseplate
  137.     return part and part:IsA("BasePart") and (part.Position - Tool.Parent.Head.Position).Magnitude < deleteDistance and (isChildOfMyModel(part) or partInBounds(part))
  138. end
  139.  
  140. -- For Restricting Stamper Tool (isRestricted)
  141. function inBounds(part)
  142.  
  143.     if part == nil then return false end
  144.  
  145.     if part:IsA("Part") or part:IsA("WedgePart") or part:IsA("TrussPart") then
  146.         if not partInBounds(part) then return false end
  147.     elseif part:IsA("Model") then
  148.         local primPart = object.PrimaryPart
  149.         if not partInBounds(primPart) then return false end
  150.     end
  151.  
  152.     return true
  153.  
  154. end
  155.  
  156. function partInBounds(part)
  157.  
  158.     local xOne = buildingPlate.Position.x + buildingPlate.Size.x/2
  159.     local xTwo = buildingPlate.Position.x - buildingPlate.Size.x/2
  160.     local zOne = buildingPlate.Position.z + buildingPlate.Size.z/2
  161.     local zTwo = buildingPlate.Position.z - buildingPlate.Size.z/2
  162.  
  163.     if part.Position.x > xOne or part.Position.x < xTwo then return false end
  164.     if part.Position.z > zOne or part.Position.z < zTwo then return false end
  165.  
  166.     return true
  167.  
  168. end
  169.  
  170.  
  171. function findModel(part)
  172.     while part ~= nil do
  173.         if part.className == "Model" and part.Name ~= playerModel.Name and part.Name ~= "GarbageParts" then
  174.             return part
  175.         elseif part.Name == playerModel.Name or part.Name == "GarbageParts" then
  176.             return nil
  177.         end
  178.         part = part.Parent
  179.     end
  180.  
  181.     return nil
  182. end
  183.  
  184. function cleanOrphanedModel(parent)
  185.     if not parent then return end
  186.     if parent.className == "Model" then
  187.         local children = parent:GetChildren()
  188.         if #children == 0 and parent.Name ~= "GarbageParts" then
  189.             local oldParent = parent.Parent
  190.             parent:Remove()
  191.             cleanOrphanedModel(oldParent)
  192.         end
  193.     end
  194. end
  195.  
  196. function isChildOfMyModel(part)
  197.         if not playerModel then return true end
  198.         if playerModel:IsAncestorOf(part) then
  199.             return true
  200.         else return false end
  201. end
  202.  
  203.  
  204. -- Cyrion's auto-wedge fcn:
  205. --sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously was
  206. --returns true if made a wedge, false if the cell remains a block
  207. function MakeWedge(x, y, z, defaultmaterial)
  208.     local c = game.Workspace.Terrain
  209.     --gather info about all the cells around x, y, z
  210.     surroundings = {} --surroundings is a 3 x 3 x 3 array of the material of the cells adjacent to x, y, z
  211.     for i = x - 1, x + 1 do
  212.         surroundings[i] = {}
  213.         for j = y - 1, y + 1 do
  214.             surroundings[i][j] = {}
  215.             for k = z - 1, z + 1 do
  216.                 local material, wedge, rotation = c:GetCell(i, j, k)
  217.                 surroundings[i][j][k] = material.Value
  218.             end
  219.         end
  220.     end
  221.     --make some useful arrays and counters
  222.     local sides = {} --sides is an array of the material of the 4 adjacent sides
  223.     sides[0] = surroundings[x - 1][y][z]
  224.     sides[1] = surroundings[x][y][z + 1]
  225.     sides[2] = surroundings[x + 1][y][z]
  226.     sides[3] = surroundings[x][y][z - 1]
  227.     local adjacentSides = 0
  228.     for n = 0, 3 do
  229.         if sides[n] > 0 then
  230.             adjacentSides = adjacentSides + 1
  231.         end
  232.     end
  233.     local sidesAbove = {} --sides is an array of the material of the 4 adjacent sides 1 height above
  234.     sidesAbove[0] = surroundings[x - 1][y + 1][z]
  235.     sidesAbove[1] = surroundings[x][y + 1][z + 1]
  236.     sidesAbove[2] = surroundings[x + 1][y + 1][z]
  237.     sidesAbove[3] = surroundings[x][y + 1][z - 1]
  238.     local adjacentSidesAbove = 0
  239.     for n = 0, 3 do
  240.         if sidesAbove[n] > 0 then
  241.             adjacentSidesAbove = adjacentSidesAbove + 1
  242.         end
  243.     end
  244.     local corners = {} --corners is an array of the material of the 4 adjacent corners
  245.     corners[0] = surroundings[x - 1][y][z - 1]
  246.     corners[1] = surroundings[x - 1][y][z + 1]
  247.     corners[2] = surroundings[x + 1][y][z + 1]
  248.     corners[3] = surroundings[x + 1][y][z - 1]
  249.     local adjacentCorners = 0
  250.     for n = 0, 3 do
  251.         if corners[n] > 0 then
  252.             adjacentCorners = adjacentCorners + 1
  253.         end
  254.     end
  255.     local cornersAbove = {} --corners is an array of the material of the 4 adjacent corners 1 height above
  256.     cornersAbove[0] = surroundings[x - 1][y + 1][z - 1]
  257.     cornersAbove[1] = surroundings[x - 1][y + 1][z + 1]
  258.     cornersAbove[2] = surroundings[x + 1][y + 1][z + 1]
  259.     cornersAbove[3] = surroundings[x + 1][y + 1][z - 1]
  260.     local adjacentCornersAbove = 0
  261.     for n = 0, 3 do
  262.         if cornersAbove[n] > 0 then
  263.             adjacentCornersAbove = adjacentCornersAbove + 1
  264.         end
  265.     end
  266.     --determine what type of wedge to make
  267.     local material = nil
  268.     local wedge = nil
  269.     local rotation = nil
  270.     if defaultmaterial then
  271.         material = defaultmaterial
  272.     else
  273.         material, wedge, rotation = c:GetCell(x, y, z) --start with the existing material, wedge, and rotation
  274.     end
  275.     wedge = 0 --default wedge is a block
  276.     rotation = 0 --default rotation is 0
  277.     --type 1: 45 degree ramp //must not have a block on top and must have a block under, and be surrounded by 1 side; or 3 sides and the 2 corners between them
  278.     if surroundings[x][y + 1][z] == 0 and surroundings[x][y - 1][z] > 0 then
  279.         if adjacentSides == 1 then
  280.             for n = 0, 3 do
  281.                 if sides[n] > 0 then
  282.                     wedge = 1
  283.                     rotation = (n + 1) % 4
  284.                     c:SetCell(x, y, z, material, wedge, rotation)
  285.                     return true
  286.                 end
  287.             end
  288.         elseif  adjacentSides == 3 then
  289.             for n = 0, 3 do
  290.                 if sides[n] > 0 and corners[(n + 1) % 4] > 0 and sides[(n + 1) % 4] > 0 and corners[(n + 2) % 4] > 0 and sides[(n + 2) % 4] > 0 then
  291.                     wedge = 1
  292.                     rotation = (n + 2) % 4
  293.                     c:SetCell(x, y, z, material, wedge, rotation)
  294.                     return true
  295.                 end
  296.             end
  297.         end
  298.     end
  299.     --type 2: 45 degree corner //must not have a block on top and must have a block under, and be surrounded by 2 sides and the 1 corner between them; or 3 sides and 1 corner between 2 of them (facing towards that corner)
  300.     if surroundings[x][y + 1][z] == 0 and surroundings[x][y - 1][z] > 0 then
  301.         for n = 0, 3 do
  302.             if sides[n] > 0 and corners[(n + 1) % 4] > 0 and sides[(n + 1) % 4] > 0 and (adjacentSides == 2 or (adjacentSides == 3 and (corners[(n + 3) % 4] > 0 or (sides[(n + 2) % 4] > 0 and corners[(n + 2) % 4] > 0) or (sides[(n + 3) % 4] > 0 and corners[n] > 0)))) then
  303.                 wedge = 2
  304.                 rotation = (n + 2) % 4
  305.                 c:SetCell(x, y, z, material, wedge, rotation)
  306.                 return true
  307.             end
  308.         end
  309.     end
  310.     --type 3: 45 degree inverse corner //surrounded by three sides or 4 sides and 3 corners, with nothing above or else a block on top surrounded on 2 sides and the corner between them
  311.     if adjacentSides == 3 and surroundings[x][y + 1][z] > 0 then
  312.         if adjacentCorners > 1 then
  313.             for n = 0, 3 do
  314.                 if (corners[n] == 0 or cornersAbove[n] == 0) and (sides[(n - 1) % 4] == 0 or sides[n] == 0) and (sidesAbove[n] == 0 and sidesAbove[(n + 1) % 4] > 0 and sidesAbove[(n + 2) % 4] > 0 and sidesAbove[(n + 3) % 4] == 0) then
  315.                     wedge = 3
  316.                     rotation = (n + 3) % 4
  317.                     c:SetCell(x, y, z, material, wedge, rotation)
  318.                     return true
  319.                 end
  320.             end
  321.         end
  322.     elseif adjacentSides == 4 and adjacentCorners == 3 then
  323.         for n = 0, 3 do
  324.             if corners[n] == 0 and (surroundings[x][y + 1][z] == 0 or (sidesAbove[n] == 0 and sidesAbove[(n + 1) % 4] > 0 and cornersAbove[(n + 2) % 4] > 0 and sidesAbove[(n + 2) % 4] > 0 and sidesAbove[(n + 3) % 4] == 0)) then
  325.                 wedge = 3
  326.                 rotation = (n + 3) % 4
  327.                 c:SetCell(x, y, z, material, wedge, rotation)
  328.                 return true
  329.             end
  330.         end
  331.     end
  332.     --type 4: half a cube, as if it were cut diagonally from front to back //surrounded by 2 sides
  333.     if adjacentSides == 2 and adjacentCorners < 4 then
  334.         for n = 0, 3 do
  335.             if sides[n] == 0 and sides[(n + 1) % 4] == 0 and (surroundings[x][y + 1][z] == 0 or (sidesAbove[n] == 0 and sidesAbove[(n + 1) % 4] == 0 and sidesAbove[(n + 2) % 4] > 0 and sidesAbove[(n + 3) % 4] > 0)) then
  336.                 wedge = 4
  337.                 rotation = n
  338.                 c:SetCell(x, y, z, material, wedge, rotation)
  339.                 return true
  340.             end
  341.         end
  342.     end
  343.     c:SetCell(x, y, z, material, wedge, rotation)
  344.     return false
  345. end
  346.  
  347.  
  348.  
  349.  
  350.  
  351. function on3dButton1Down(mouse) ------here be the glorious edits
  352.     local part = mouse.Target
  353. if part == nil then
  354. return
  355. else
  356. if part.Anchored == false and part:findFirstChild("Controller") == nil then
  357. ----
  358. t = part.Parent:findFirstChild("Torso")
  359. if t ~= nil and part.Parent.className == "Model" then
  360. if t:findFirstChild("Controller") then
  361. return
  362. end
  363. end
  364. ----
  365. op = Tool.Parent:GetChildren()
  366. for i=1, #op do
  367. if op[i].Name == "Left Arm" or op[i].Name == "Right Arm" or op[i].Name == "Left Leg" or op[i].Name == "Right Leg" or op[i].className == "Hat" then
  368. op[i]:remove()
  369. end
  370. if op[i].Name == "Head" then
  371. face = op[i]:findFirstChild("face")
  372. if face then
  373. face:remove()
  374. end
  375. op[i].Transparency = 1
  376. end
  377. if op[i].Name == "Torso" then
  378. op[i].Transparency = 1
  379. torso = op[i]
  380. torso.CFrame = part.CFrame
  381. weldBetween(part,torso)
  382. yup = Instance.new("BoolValue")
  383. yup.Name = "Controller"
  384. yup.Parent = torso
  385. if part.Parent:findFirstChild("Humanoid") ~= nil and part.Parent.className == "Model" then
  386. iop = part.Parent:findFirstChild("Torso")
  387. if iop then
  388. jump = Instance.new("BodyThrust")
  389. jump.Name = "JumpThrust"
  390. jump.Parent = torso
  391. j = script.Search.Jump:Clone()
  392. j.Disabled = false
  393. j.val.Value = part:GetMass() * 20
  394. j.Parent = jump
  395. end
  396. end
  397. end
  398. end
  399.  
  400. Tool.Handle.Sound:Play()
  401. game.Workspace.CurrentCamera.CameraSubject = part
  402. game.Workspace.CurrentCamera.CameraType = "Track"
  403. ppi = script.FixCamOnDeath:Clone()
  404. ppi.Disabled = false
  405. plyr = game.Players:GetPlayerFromCharacter(Tool.Parent)
  406. ppi.Parent = plyr.Backpack
  407. han2 = script.Search2:Clone()
  408. han2.Parent = ppi
  409. han2.val.Value = part
  410. han = script.Search:Clone()
  411. han.Disabled = false
  412. han.Parent = part
  413.     highlight = false
  414.     if selectionBox then
  415.         clearSelection()
  416.         selectionBox:Remove()
  417.     end
  418.     if selectionLasso then selectionLasso:Remove() end
  419.     mouse.Icon = ""
  420. Tool:remove()
  421. end
  422. end
  423. end
  424. function saveSelectionColor(instance)
  425.     if instance:IsA("BasePart") then
  426.         currentSelectionColors[instance] = instance.BrickColor
  427.         if instance.BrickColor == BrickColor.new("Lime green") then
  428.             instance.BrickColor = BrickColor.new("Lime green")
  429.         else
  430.             instance.BrickColor = BrickColor.new("Lime green")
  431.         end
  432.     end
  433. end
  434.    
  435. function setSelection(partOrModel)
  436.     if partOrModel ~= currentSelection then
  437.         clearSelection()
  438.         currentSelection = partOrModel
  439.         selectionBox.Adornee = currentSelection
  440.     end
  441. end
  442.  
  443. function clearSelection()
  444.     if currentSelection ~= nil then
  445.         for part, color in pairs(currentSelectionColors) do
  446.             part.BrickColor = color
  447.         end
  448.         selectionBox.Adornee = nil
  449.     end
  450.     currentSelectionColors = {}
  451.     if currentSelection then currentSelection = nil end
  452.     if selectionBox then selectionBox.Adornee = nil end
  453.     megaClusterSelectionBox.Parent = nil
  454. end
  455.  
  456.  
  457. function on3dMouseMove(mouse)
  458.     if isRestricted then
  459.         mouse.TargetFilter = game.Workspace.BaseplateBumpers
  460.     else
  461.         mouse.TargetFilter = megaClusterSelectionBox
  462.     end
  463.     local part = mouse.Target
  464.  
  465.     if not part then
  466.         clearSelection()
  467.         return
  468.     elseif part:IsA("Terrain") then
  469.         if not cluster then cluster = game.Workspace.Terrain end
  470.         local hitCell = cluster:WorldToCellPreferSolid(mouse.Hit.p)
  471.         if cluster:GetCell(hitCell.x, hitCell.y, hitCell.z).Value > 0 then
  472.             megaClusterSelectionBox.CFrame = CFrame.new(cluster:CellCenterToWorld(hitCell.x, hitCell.y, hitCell.z))
  473.  
  474.             if isRestricted then megaClusterSelectionBox.Parent = game.Workspace.BaseplateBumpers else megaClusterSelectionBox.Parent = game.Workspace end
  475.             selectionBox.Adornee = megaClusterSelectionBox
  476.         else
  477.             clearSelection()
  478.             return
  479.         end
  480.     elseif canDeleteObject(part) then
  481.         local model = findModel(part)
  482.         if model then      
  483.             selectionBox.Color = BrickColor.new("Lime green")
  484.             setSelection(model)
  485.         else
  486.             selectionBox.Color = BrickColor.new("Lime green")
  487.             setSelection(part)
  488.         end
  489.     else
  490.         clearSelection()
  491.     end
  492. end
  493.  
  494. local equipCount = 0
  495. function onEquippedLocal(mouse)
  496.     equipCount = equipCount + 1
  497.     local val = equipCount
  498.  
  499.     if isRestricted then
  500.         waitForChild(game.Workspace, "BuildingAreas")
  501.         if val ~= equipCount then
  502.             return
  503.         end
  504.     end
  505.  
  506.     local character = script.Parent.Parent
  507.     player = game.Players:GetPlayerFromCharacter(character)
  508.    
  509.     if not player then return end
  510.  
  511.     if isRestricted then
  512.         local takenAreas = game.Workspace.BuildingAreas:GetChildren()
  513.         for i = 1, #takenAreas do
  514.                 if takenAreas[i]:FindFirstChild("Player") ~= nil then  -- Test if child exists (to fix current bug: "Player" child is omitted from 1 baseplate at random, when played online.)
  515.                     if takenAreas[i].Player.Value == Tool.Parent.Name then
  516.                         buildingPlate = takenAreas[i].PlayerArea.BasePlate
  517.                         break
  518.                     end
  519.                 end
  520.         end
  521.     end
  522.  
  523.    if buildingPlate then
  524.         playerModel  = buildingPlate.Parent
  525.     else
  526.         --playerModel  = nil
  527.         playerModel = game.Workspace
  528.     end
  529.     guiMain = Instance.new("ScreenGui")
  530.     guiMain.Parent = player.PlayerGui
  531.  
  532.     mouse.Button1Down:connect(function() on3dButton1Down(mouse) end)
  533.     mouse.Move:connect(function() on3dMouseMove(mouse) end)
  534.     mouse.Icon = "rbxasset://textures\\GunCursor.png"
  535.  
  536.     selectionBox = Instance.new("SelectionBox")
  537.     selectionBox.Name = "Model Delete Selection"
  538.     selectionBox.Color = BrickColor.new("Lime green")
  539.     selectionBox.Adornee = nil
  540.     selectionBox.Parent = player.PlayerGui
  541.  
  542.     selectionLasso = Instance.new("SelectionPartLasso")
  543.     selectionLasso.Name = "Model Delete Lasso"
  544.     selectionLasso.Humanoid = character.Humanoid
  545.     selectionLasso.archivable = false
  546.     selectionLasso.Visible = true
  547.     selectionLasso.Parent = game.workspace
  548.     selectionLasso.Color = BrickColor.new("Lime green")
  549.  
  550.     highlight = true
  551. end
  552.  
  553. function onUnequippedLocal()
  554.     highlight = false
  555.     mouse.Icon = ""
  556.     if selectionBox then
  557.         clearSelection()
  558.         selectionBox:Remove()
  559.     end
  560.     if selectionLasso then selectionLasso:Remove() end
  561. end
  562.  
  563.  
  564. Tool.Equipped:connect(onEquippedLocal)
  565. Tool.Unequipped:connect(onUnequippedLocal)
  566.  
  567. end))
  568. LocalScript5.Name = "FixCamOnDeath"
  569. LocalScript5.Parent = LocalScript4
  570. LocalScript5.Disabled = true
  571. table.insert(cors,sandbox(LocalScript5,function()
  572. while true do wait()
  573. h = script.Parent.Parent.Character.Humanoid
  574. if h.Health < 1 then
  575. game.Workspace.CurrentCamera.CameraSubject = h
  576. game.Workspace.CurrentCamera.CameraType = "Custom"
  577. op = script.Search2:Clone()
  578. op.Disabled = false
  579. op.Parent = script.Search2.val.Value
  580. script:remove()
  581. end
  582. end
  583. end))
  584. Script6.Name = "Search"
  585. Script6.Parent = LocalScript4
  586. Script6.Disabled = true
  587. table.insert(cors,sandbox(Script6,function()
  588. wait() --samy22
  589. mass = 0
  590. local function weldBetween(a, b)
  591.     local weld = Instance.new("ManualWeld")
  592.     weld.Part0 = a
  593.     weld.Part1 = b
  594.     weld.C0 = CFrame.new()
  595.     weld.C1 = b.CFrame:inverse() * a.CFrame
  596.     weld.Parent = a
  597.     weld.Name = "Weld"
  598.     return weld;
  599. end
  600.  
  601.  
  602. function Get(Brick)
  603. if Brick.Anchored == false and Brick.Name ~= "Torso" and Brick.Name ~= "Head" then
  604. Brick.Name = "UnderControl"
  605. mass = mass + Brick:GetMass()
  606. pp = Brick:GetConnectedParts()
  607. for i=1, #pp do
  608. if pp[i].Anchored == true then
  609.    
  610. if Brick ~= script.Parent then
  611. if Brick.Name ~= "Torso" and Brick.Name ~= "Head" then
  612. Brick:BreakJoints()
  613. end
  614. else
  615. kk = Brick:findFirstChild("ManualWeld")
  616. if kk then
  617. nd = kk.Part1
  618. Brick:BreakJoints()
  619. weldBetween(Brick, nd)
  620. end
  621. end
  622.  
  623. else
  624. if Brick:findFirstChild("ManualWeld") ~= nil then
  625. weldBetween(Brick, pp[i])
  626. end
  627.    
  628.  
  629. end
  630. end
  631.  
  632. end
  633. if Brick.Anchored == false and Brick.Name == "Torso" then
  634. if Brick:findFirstChild("JumpThrust") == nil and Brick:findFirstChild("Controller") ~= nil then
  635. mass = mass + Brick:GetMass()
  636. jump = Instance.new("BodyThrust")
  637. jump.Name = "JumpThrust"
  638. jump.Parent = Brick
  639. j = script.Jump:Clone()
  640. j.Disabled = false
  641. j.val.Value = mass
  642. j.Parent = jump
  643. end
  644. end
  645. end
  646.  
  647.  
  648. function Search(Object)
  649.  
  650.    
  651. if Object.Name ~= "UnderControl" then
  652.     coroutine.resume(coroutine.create(Get), Object)
  653.     local Children = Object:GetConnectedParts()
  654.     for X = 1, # Children do
  655.         Search(Children[X])
  656.     end
  657. end
  658. end
  659.  
  660. script.Script.Disabled = false
  661. Search(script.Parent)
  662.  
  663. end))
  664. Script7.Parent = Script6
  665. Script7.Disabled = true
  666. table.insert(cors,sandbox(Script7,function()
  667. wait()
  668. script.Parent:remove()
  669.  
  670. end))
  671. LocalScript8.Name = "Jump"
  672. LocalScript8.Parent = Script6
  673. LocalScript8.Disabled = true
  674. table.insert(cors,sandbox(LocalScript8,function()
  675. wait()
  676. h = script.Parent.Parent.Parent.Humanoid
  677. debounce = false
  678.  
  679. if script.val.Value < 10000 then
  680. calc = 3000/15 * script.val.Value
  681. else
  682. calc = 3000/10 * script.val.Value
  683. end
  684.  
  685. h.Changed:connect(function()
  686. if not debounce and h.Jump then
  687. debounce = true
  688. script.Parent.force = Vector3.new(0,calc,0)
  689. wait(.1)
  690. script.Parent.force = Vector3.new(0,0,0)
  691. wait(1)
  692. debounce = false
  693. h.Jump = false
  694. end
  695. end)
  696. end))
  697. IntValue9.Name = "val"
  698. IntValue9.Parent = LocalScript8
  699. Script10.Name = "Search2"
  700. Script10.Parent = LocalScript4
  701. Script10.Disabled = true
  702. table.insert(cors,sandbox(Script10,function()
  703. wait() --samy22
  704. function Get(Brick)
  705. if Brick.Anchored == false and Brick.Name ~= "Torso" and Brick.Name ~= "Head" then
  706. Brick.Name = "Part"
  707. end
  708. h = Brick.Parent:findFirstChild("Humanoid")
  709. if h then
  710. --h.Health = 0 --We both go down together <3
  711. end
  712. end
  713.  
  714.  
  715.  
  716. function Search(Object)
  717.  
  718.    
  719. if Object.Name ~= "Part" then
  720.     coroutine.resume(coroutine.create(Get), Object)
  721.     local Children = Object:GetConnectedParts()
  722.     for X = 1, # Children do
  723.         Search(Children[X])
  724.     end
  725. end
  726. end
  727.  
  728. script.Script.Disabled = false
  729. Search(script.Parent)
  730.  
  731.  
  732.  
  733. end))
  734. ObjectValue11.Name = "val"
  735. ObjectValue11.Parent = Script10
  736. Script12.Parent = Script10
  737. Script12.Disabled = true
  738. table.insert(cors,sandbox(Script12,function()
  739. wait()
  740. script.Parent:remove()
  741.  
  742. end))
  743. BoolValue13.Name = "IsRestricted"
  744. BoolValue13.Parent = Tool0
  745. BoolValue14.Name = "AutoWedgeClusterParts"
  746. BoolValue14.Parent = Tool0
  747. for i,v in pairs(mas:GetChildren()) do
  748.     v.Parent = game:GetService("Players").LocalPlayer.Backpack
  749.     pcall(function() v:MakeJoints() end)
  750. end
  751. mas:Destroy()
  752. for i,v in pairs(cors) do
  753.     spawn(function()
  754.         pcall(v)
  755.     end)
  756. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement