Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- Decal2 = Instance.new("Decal")
- Decal3 = Instance.new("Decal")
- Script4 = Instance.new("Script")
- Tool0.Name = "Robux"
- Tool0.Parent = mas
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Dark green")
- Part1.Rotation = Vector3.new(-179.949997, -23.289999, -179.979996)
- Part1.CanCollide = false
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.Size = Vector3.new(2, 0.400000006, 1)
- Part1.CFrame = CFrame.new(-18.9216633, 0.200430006, -20.088274, -0.918547034, 0.000314582547, -0.395311654, -1.49886588e-07, 0.999999642, 0.000796131673, 0.395311743, 0.000731343694, -0.918546796)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(0.156863, 0.498039, 0.278431)
- Part1.Position = Vector3.new(-18.9216633, 0.200430006, -20.088274)
- Part1.Orientation = Vector3.new(-0.049999997, -156.709991, 0)
- Part1.Color = Color3.new(0.156863, 0.498039, 0.278431)
- Decal2.Parent = Part1
- Decal2.Texture = "http://www.roblox.com/asset/?id=8057772"
- Decal2.Face = Enum.NormalId.Bottom
- Decal3.Parent = Part1
- Decal3.Texture = "http://www.roblox.com/asset/?id=8057772"
- Decal3.Face = Enum.NormalId.Top
- Script4.Name = "WeldScript"
- Script4.Parent = Tool0
- table.insert(cors,sandbox(Script4,function()
- -- Simple Welding Script by Plugined. No credit necessary.
- --[[
- To use, Simply place this inside the model you want to use. If you want the model unanchored, Set unanchor to true. If not, set it to
- false. If there are any part classes in your model that aren't in the class list, Just add it in. Make sure to use the EXACT name.
- MAKE SURE THE ENIRE MODEL IS ANCHORED BEFORE USE! Otherwise all the parts will glitch and go out of place and they'll look ugly.
- If you want to remove all welds from your model, Just set removeWelds to true. (If you ever used the qPerfectionWeld script, This will
- also remove all those annoying CFrame values as well.)
- --]]
- unanchor = false
- removeWelds = false
- classes = {
- "Part";
- "WedgePart";
- "TrussPart";
- "CornerWedgePart";
- "Seat";
- "VehicleSeat";
- "UnionOperation";
- "NegateOperation";
- "MeshPart";
- "SpawnLocation";
- }
- -- Don't edit anything down here unless you know what you're doing.
- function createWeld(p1, p2)
- local weld = Instance.new("Weld", p1)
- weld.C0 = p1.CFrame:inverse() * p2.CFrame
- weld.Part0 = p1
- weld.Part1 = p2
- end
- function checkWelds(model)
- local prev
- local c = model:GetChildren()
- for i = 1, #c do
- for a = 1, #classes do
- if c[i].ClassName == classes[a] then
- local oldWeld = c[i]:FindFirstChildOfClass("Weld")
- if oldWeld ~= nil then
- oldWeld:Destroy()
- end
- local oldCFrame = c[i]:FindFirstChildOfClass("CFrameValue")
- if oldCFrame ~= nil then
- oldCFrame:Destroy()
- end
- if removeWelds == false then
- if unanchor == true then
- c[i].Anchored = false
- end
- if prev ~= nil then
- createWeld(prev, c[i])
- end
- prev = c[i]
- end
- end
- end
- checkWelds(c[i])
- end
- end
- checkWelds(script.Parent)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement