Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local plr = owner
- local char = plr.Character
- function FindInTable(t, n)
- for i,v in pairs(t) do
- if v == n then
- return true
- end
- end
- return false
- end
- --Transformaaaaation--
- char["Left Arm"].BrickColor = BrickColor.new("Pastel brown")
- char["Right Arm"].BrickColor = BrickColor.new("Pastel brown")
- char.Head.BrickColor = BrickColor.new("Pastel brown")
- char["Left Leg"].BrickColor = BrickColor.new("Pastel brown")
- char["Right Leg"].BrickColor = BrickColor.new("Pastel brown")
- for i,v in pairs(char:children'') do
- local toremove = {"CharacterMesh", "Shirt", "Pants", "ShirtGraphic", "Accessory"}
- if FindInTable(toremove, v.ClassName) then v:Destroy() end
- if v.ClassName == "BodyColors" then
- v.HeadColor = BrickColor.new("Pastel brown")
- v.LeftArmColor = BrickColor.new("Pastel brown")
- v.LeftLegColor = BrickColor.new("Pastel brown")
- v.RightArmColor = BrickColor.new("Pastel brown")
- v.RightLegColor = BrickColor.new("Pastel brown")
- v.TorsoColor = BrickColor.new("Pastel brown")
- end
- end
- local face = char.Head:FindFirstChild'face' if face then face.Texture = "http://www.roblox.com/asset/?id=31117192" end
- Instance.new("Shirt", char).ShirtTemplate = "http://www.roblox.com/asset/?id=812553202"
- Instance.new("Pants", char).PantsTemplate = "http://www.roblox.com/asset/?id=772799671"
- local function CreateHat(name, meshid, textureid)
- local h = Instance.new("Accessory")
- h.Name = name
- local han = Instance.new("Part", h)
- han.Name = "Handle"
- local mesh = Instance.new("SpecialMesh", han)
- mesh.Name = "Mesh"
- mesh.MeshId = meshid
- mesh.TextureId = textureid
- return h,han,mesh
- end
- hum = char:FindFirstChildOfClass'Humanoid'
- local h,han,mesh = CreateHat("2LEGITOwl", "http://www.roblox.com/asset/?id=0", "http://www.roblox.com/asset/?id=0")
- han.Size = Vector3.new(1, 1, 1)
- mesh.Scale = Vector3.new(0.3, 0.3, 0.3)
- h.AttachmentPos = Vector3.new(1.1, 0.38, 0)
- hum:AddAccessory(h)
- h,han,mesh = CreateHat("RobloxScarf", "http://www.roblox.com/asset/?id=0", "http://www.roblox.com/asset/?id=0")
- mesh.Scale = Vector3.new(3, 3, 3)
- han.Size = Vector3.new(1.9, 2, 2)
- h.AttachmentPos = Vector3.new(0, 1.54, 0.1)
- hum:AddAccessory(h)
- h,han,mesh = CreateHat("Dapper Stan", "http://www.roblox.com/asset/?id=74879498", "http://www.roblox.com/asset/?id=74879471")
- mesh.Scale = Vector3.new(1.05, 1.05, 1.05)
- han.Size = Vector3.new(2, 2, 2)
- hum:AddAccessory(h)
- local s = Instance.new("Sound")
- s,s2 = Instance.new('Sound'),Instance.new('Sound')
- s.SoundId = "http://www.roblox.com/asset/?id=1362139713" -- Type your music ID here
- s.Volume = 7 -- this is the Volume
- s.Pitch = 1 -- tis is the pich
- s.Looped = false
- s.archivable = false
- s.Parent = game.Workspace
- wait(0)
- s:play()
- s2.SoundId = "http://www.roblox.com/asset/?id=632007628" -- Type your music ID here
- s2.Volume = 0.7 -- this is the Volume
- s2.Pitch = 1 -- tis is the pich
- s2.Looped = true
- s2.archivable = false
- s2.Parent = game.Workspace
- wait(9)
- s2:play()
- -- Made by 1ndrew
- 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")
- LocalScript1 = Instance.new("LocalScript")
- Part2 = Instance.new("Part")
- LocalScript3 = Instance.new("LocalScript")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Animation6 = Instance.new("Animation")
- SpecialMesh7 = Instance.new("SpecialMesh")
- Script8 = Instance.new("Script")
- LocalScript9 = Instance.new("LocalScript")
- LocalScript10 = Instance.new("LocalScript")
- Part11 = Instance.new("Part")
- CylinderMesh12 = Instance.new("CylinderMesh")
- Part13 = Instance.new("Part")
- Weld14 = Instance.new("Weld")
- CylinderMesh15 = Instance.new("CylinderMesh")
- Part16 = Instance.new("Part")
- CylinderMesh17 = Instance.new("CylinderMesh")
- Part18 = Instance.new("Part")
- CylinderMesh19 = Instance.new("CylinderMesh")
- LocalScript20 = Instance.new("LocalScript")
- Tool0.Name = "Brutal Stick"
- Tool0.Parent = mas
- Tool0.GripForward = Vector3.new(-0.425711513, 0.306347132, -0.851423025)
- Tool0.GripPos = Vector3.new(0, -1.29999995, 0.100000001)
- Tool0.GripRight = Vector3.new(0.89442718, 0, -0.44721359)
- Tool0.GripUp = Vector3.new(0.137002602, 0.951919854, 0.274005204)
- Tool0.ToolTip = "TIME TO DIE MOTHERFUCKERS"
- LocalScript1.Name = "Aiming"
- LocalScript1.Parent = Tool0
- table.insert(cors,sandbox(LocalScript1,function()
- wait()
- Tool=script.Parent
- CP,Torso,g=nil,nil,nil
- armo1=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- armo2=CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- getPos=function(Pos,TorsoPos)
- return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
- end
- Turn=function(mouse,Torso,Gyro)
- g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position))
- offset=(Torso.Position.y-mouse.Hit.p.y)/125
- mag=(Torso.Position-mouse.Hit.p).magnitude/125
- offset=offset/mag
- arm=Torso:FindFirstChild("Right Shoulder")
- arm2=Torso:FindFirstChild("Left Shoulder")
- if arm~=nil then
- arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, -6.48200512e-007, 1.00000274, 0, -1.00000274, -6.48200512e-007, 0)*CFrame.fromEulerAnglesXYZ(0,0,-offset)
- arm2.C0=CFrame.new(-1, 0.5, 0, 0, 0, -1, -6.48200512e-007, 1.00000274, 0, 1.00000274, -6.48200512e-007, 0)*CFrame.fromEulerAnglesXYZ(0,0,offset)
- end
- end
- Equi=function(mouse)
- wait(.01)
- local vCharacter = Tool.Parent
- local hum = vCharacter:findFirstChild("Humanoid")
- blah = hum:LoadAnimation(Tool.Handle.Idle)
- blah:Play()
- CP=Tool.Parent
- Torso=CP.Torso
- g=Instance.new("BodyGyro")
- g.P=18000
- g.D=600
- g.maxTorque=Vector3.new(80000,80000000,80000)*50000000000000000000000000
- g.cframe=Torso.CFrame
- while true do
- if Tool.Parent.className~="Model" then
- break
- end
- Turn(mouse,Torso,g)
- wait()
- end
- blah:Stop()
- arm.C0=armo1
- arm2.C0=armo2
- g:Remove()
- end
- Tool.Equipped:connect(Equi)
- end))
- Part2.Name = "Handle"
- Part2.Parent = Tool0
- Part2.BrickColor = BrickColor.new("Dark stone grey")
- Part2.Transparency = 1
- Part2.FormFactor = Enum.FormFactor.Custom
- Part2.Size = Vector3.new(0.200000003, 3.9199934, 0.829999506)
- Part2.CFrame = CFrame.new(-8.29998779, 3.99999809, -84.0001221, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part2.Position = Vector3.new(-8.29998779, 3.99999809, -84.0001221)
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- LocalScript3.Name = "MacheteScript"
- LocalScript3.Parent = Part2
- table.insert(cors,sandbox(LocalScript3,function()
- local UTIL = {}
- function UTIL.Class(tableIn,template)
- tableIn = tableIn or {}
- local mt = {
- __metatable = UTIL.DeepCopy(template);
- __index = UTIL.DeepCopy(template);
- }
- return setmetatable(tableIn, mt)
- end
- function UTIL.MakeClass(...)
- local arg = {...}
- assert(#arg>0, 'ERROR: class needs 1 argument or more')
- local members = arg[1]
- for i=2,#arg,1 do
- if type(arg[i])=='table' then
- for key,val in pairs(arg[i]) do
- if not members[key] then
- members[key] = val
- end
- end
- end
- end
- local function New(init)
- return UTIL.Class(init or {},members)
- end
- local function Copy(obj, ...)
- local newobj = obj:New(unpack(arg))
- for n,v in pairs(obj) do newobj[n] = v end
- return newobj
- end
- members.New = New
- members.Copy = Copy
- return mt
- end
- function UTIL.DeepCopy(orig)
- local orig_type = type(orig)
- local copy
- if orig_type == 'table' then
- copy = {}
- for orig_key, orig_value in next, orig, nil do
- copy[UTIL.DeepCopy(orig_key)] = UTIL.DeepCopy(orig_value)
- end
- setmetatable(copy, UTIL.DeepCopy(getmetatable(orig)))
- else
- copy = orig
- end
- return copy
- end
- function UTIL.Instantiate(guiType)
- return function(data)
- local obj = Instance.new(guiType)
- for k, v in pairs(data) do
- if type(k) == 'number' then
- v.Parent = obj
- else
- obj[k] = v
- end
- end
- return obj
- end
- end
- function UTIL.RetroRegister(func,...)
- func()
- for _,i in ipairs({...}) do
- i:connect(func)
- end
- end
- function UTIL.WaitForValidCharacter(player)
- local character = player.Character
- if not character or not character.Parent or not character:FindFirstChild('Humanoid') or character.Humanoid.Health <= 0 then
- player.CharacterAdded:wait()
- wait(0)
- character = player.Character
- end
- return character
- end
- function UTIL.FindCharacterAncestor(subject)
- if subject and subject ~= Workspace then
- local humanoid = subject:FindFirstChild('Humanoid')
- if humanoid then
- return subject, humanoid
- else
- return UTIL.FindCharacterAncestor(subject.Parent)
- end
- end
- return nil
- end
- UTIL.AssetURL = 'http://www.roblox.com/asset/?id='
- UTIL.TouchEnabled = game:GetService("UserInputService").TouchEnabled
- do
- local suceeded,_ =pcall(function() game.Workspace.CurrentCamera:GetPanSpeed() end)
- UTIL.CanCheckPanSpeed = suceeded
- end
- local DebrisService = Game:GetService('Debris')
- local DebugPrintOffset = 0
- function UTIL.Dprint(...)
- local line = ''
- for _, segment in pairs({...}) do
- line = line .. (line and ' ' or '') .. tostring(segment)
- end
- local gui = Instance.new('ScreenGui')
- local label = Instance.new('TextLabel')
- label.Text = line
- label.Size = UDim2.new(0.25, 0, 0.05, 0)
- label.BackgroundTransparency = 0.5
- label.Position = UDim2.new(0, 0, 0, DebugPrintOffset)
- label.TextWrapped = true
- label.Parent = gui
- DebrisService:AddItem(gui, 30)
- gui.Parent = script.Parent
- DebugPrintOffset = (DebugPrintOffset <= 600) and DebugPrintOffset + 30 or 0
- end
- WeldUtil = {}
- do
- function WeldUtil.WeldBetween(a, b)
- local weld = Instance.new("Weld")
- weld.Part0 = a
- weld.Part1 = b
- weld.C0 = CFrame.new()
- weld.C1 = b.CFrame:inverse() * a.CFrame
- weld.Parent = a
- return weld
- end
- function WeldUtil:PermaWeld(weld)
- local OriginalParent = weld.Parent
- weld.Changed:connect(function()
- Delay(0,function() weld.Parent = OriginalParent end)
- end)
- end
- end
- local InternalEvent =
- {
- Listeners = nil,
- }
- do
- UTIL.MakeClass(InternalEvent)
- function InternalEvent:Connect(func)
- if not self.Listeners then self.Listeners = {} end
- table.insert(self.Listeners,func)
- end
- function InternalEvent:Fire(...)
- if not self.Listeners then return end
- local args = {...}
- for _,i in ipairs(self.Listeners) do
- Spawn(function() i(unpack(args)) end)
- end
- end
- end
- local SwordPart =
- {
- Damage = 25,
- AttackTime = 1,
- CoolDown = 0.1,
- LastSwing = 0,
- LastHit = 0,
- Part= nil,
- Owner = nil,
- OnHit = nil,
- OnHitHumanoid = nil,
- OnAttackReady = nil,
- OnAttack = nil,
- SwingSound = nil,
- HitSound = nil,
- SwingAnimation = nil,
- ActiveConnections = {},
- }
- do
- UTIL.MakeClass(SwordPart)
- function SwordPart.New(npart,nowner)
- local init= UTIL.DeepCopy(SwordPart)
- init.Part= npart
- init.Owner = nowner
- table.insert(init.ActiveConnections,init.Part.Touched:connect(function(hit) init:SwordTouch(hit) end))
- init.OnHit = InternalEvent.New()
- init.OnHitHumanoid = InternalEvent.New()
- init.OnAttackReady = InternalEvent.New()
- init.OnAttack = InternalEvent.New()
- return init
- end
- function SwordPart:SwordTouch(hit)
- if tick()-self.LastSwing >self.AttackTime or tick()-self.LastHit<self.AttackTime then return end
- self.OnHit:Fire(hit)
- local character,humanoid = UTIL.FindCharacterAncestor(hit)
- if character and character ~= self.Owner.Character then
- humanoid:TakeDamage(self.Damage)
- self.OnHitHumanoid:Fire(humanoid,hit)
- self.LastHit = tick()
- if self.HitSound then
- self.HitSound:Play()
- end
- end
- end
- function SwordPart:DoSwing()
- if tick()-self.LastSwing<self.AttackTime+self.CoolDown then
- return
- end
- if self.SwingAnimation then
- self.SwingAnimation:Play(.1,1,1.5)
- end
- if self.SwingSound then
- self.SwingSound:Play()
- end
- self.LastSwing = tick()
- self.OnAttack:Fire()
- end
- function SwordPart:Destroy()
- for _,i in pairs(self.ActiveConnections) do
- i:disconnect()
- end
- end
- end
- do
- local Handle = script.Parent
- local Tool = Handle.Parent
- local Player = game.Players.LocalPlayer
- local Character = UTIL.WaitForValidCharacter(Player)
- local SwingAni = UTIL.Instantiate"Animation"
- {AnimationId = "http://www.roblox.com/Asset?ID=89289879"}
- local HitSound = Handle:WaitForChild('Hit')
- local SwingSound = Handle:WaitForChild('Swing')
- local SwingAniTrack
- local Sword
- Tool.Equipped:connect(function(mouse)
- Sword = SwordPart.New(Handle,Player)
- Sword.Damage = 40
- Sword.HitSound = HitSound
- Sword.SwingSound = SwingSound
- Character = UTIL.WaitForValidCharacter(Player)
- local Humanoid = Character:FindFirstChild('Humanoid')
- SwingAniTrack = Humanoid:LoadAnimation(SwingAni)
- Sword.SwingAnimation = SwingAniTrack
- Sword.OnHitHumanoid:Connect(function(humanoid,hit)
- local myTorso = Character:FindFirstChild('Torso')
- local torso = humanoid.Parent:FindFirstChild('Torso')
- if not torso or not myTorso then return end
- if hit.Name=='Right Arm' or hit.Name=='Left Arm' or hit.Name=='Right Leg' or hit.Name=='Left Leg' then
- hit:BreakJoints()
- WeldUtil.WeldBetween(hit, Handle)
- Delay(1,function() hit:BreakJoints() end )
- end
- end)
- mouse.Button1Down:connect(function()
- Sword:DoSwing()
- end)
- end)
- Tool.Unequipped:connect(function()
- Sword:Destroy()
- end)
- end
- end))
- Sound4.Name = "Hit"
- Sound4.Parent = Part2
- Sound4.Pitch = 0.69999998807907
- Sound4.SoundId = "http://www.roblox.com/Asset?ID=123252378"
- Sound4.Volume = 1
- Sound5.Name = "Swing"
- Sound5.Parent = Part2
- Sound5.SoundId = "rbxasset://sounds/swordslash.wav"
- Sound5.Volume = 1
- Animation6.Name = "Idle"
- Animation6.Parent = Part2
- Animation6.AnimationId = "http://www.roblox.com/Asset?ID=75522566"
- SpecialMesh7.Parent = Part2
- SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=123248347"
- SpecialMesh7.Scale = Vector3.new(0.400000006, 0.400000006, 0.400000006)
- SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=123248449"
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- SpecialMesh7.Scale = Vector3.new(0.400000006, 0.400000006, 0.400000006)
- Script8.Name = "qPerfectionWeld"
- Script8.Parent = Tool0
- table.insert(cors,sandbox(Script8,function()
- local NEVER_BREAK_JOINTS = false -- If you set this to true it will never break joints (this can create some welding issues, but can save stuff like hinges).
- local function CallOnChildren(Instance, FunctionToCall)
- -- Calls a function on each of the children of a certain object, using recursion.
- FunctionToCall(Instance)
- for _, Child in next, Instance:GetChildren() do
- CallOnChildren(Child, FunctionToCall)
- end
- end
- local function GetNearestParent(Instance, ClassName)
- -- Returns the nearest parent of a certain class, or returns nil
- local Ancestor = Instance
- repeat
- Ancestor = Ancestor.Parent
- if Ancestor == nil then
- return nil
- end
- until Ancestor:IsA(ClassName)
- return Ancestor
- end
- local function GetBricks(StartInstance)
- local List = {}
- -- if StartInstance:IsA("BasePart") then
- -- List[#List+1] = StartInstance
- -- end
- CallOnChildren(StartInstance, function(Item)
- if Item:IsA("BasePart") then
- List[#List+1] = Item;
- end
- end)
- return List
- end
- local function Modify(Instance, Values)
- -- Modifies an Instance by using a table.
- assert(type(Values) == "table", "Values is not a table");
- for Index, Value in next, Values do
- if type(Index) == "number" then
- Value.Parent = Instance
- else
- Instance[Index] = Value
- end
- end
- return Instance
- end
- local function Make(ClassType, Properties)
- -- Using a syntax hack to create a nice way to Make new items.
- return Modify(Instance.new(ClassType), Properties)
- end
- local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
- local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
- local function HasWheelJoint(Part)
- for _, SurfaceName in pairs(Surfaces) do
- for _, HingSurfaceName in pairs(HingSurfaces) do
- if Part[SurfaceName].Name == HingSurfaceName then
- return true
- end
- end
- end
- return false
- end
- local function ShouldBreakJoints(Part)
- --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
- -- definitely some edge cases.
- if NEVER_BREAK_JOINTS then
- return false
- end
- if HasWheelJoint(Part) then
- return false
- end
- local Connected = Part:GetConnectedParts()
- if #Connected == 1 then
- return false
- end
- for _, Item in pairs(Connected) do
- if HasWheelJoint(Item) then
- return false
- elseif not Item:IsDescendantOf(script.Parent) then
- return false
- end
- end
- return true
- end
- local function WeldTogether(Part0, Part1, JointType, WeldParent)
- JointType = JointType or "Weld"
- local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
- local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
- Modify(NewWeld, {
- Name = "qCFrameWeldThingy";
- Part0 = Part0;
- Part1 = Part1;
- C0 = CFrame.new();--Part0.CFrame:inverse();
- C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
- Parent = Part1;
- })
- if not RelativeValue then
- RelativeValue = Make("CFrameValue", {
- Parent = Part1;
- Name = "qRelativeCFrameWeldValue";
- Archivable = true;
- Value = NewWeld.C1;
- })
- end
- return NewWeld
- end
- local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
- for _, Part in pairs(Parts) do
- if ShouldBreakJoints(Part) then
- Part:BreakJoints()
- end
- end
- for _, Part in pairs(Parts) do
- if Part ~= MainPart then
- WeldTogether(MainPart, Part, JointType, MainPart)
- end
- end
- if not DoNotUnanchor then
- for _, Part in pairs(Parts) do
- Part.Anchored = false
- end
- MainPart.Anchored = false
- end
- end
- local function PerfectionWeld()
- local Tool = GetNearestParent(script, "Tool")
- local Parts = GetBricks(script.Parent)
- local PrimaryPart = Tool and Tool:FindFirstChild("Handle") and Tool.Handle:IsA("BasePart") and Tool.Handle or script.Parent:IsA("Model") and script.Parent.PrimaryPart or Parts[1]
- if PrimaryPart then
- WeldParts(Parts, PrimaryPart, "Weld", false)
- else
- warn("qWeld - Unable to weld part")
- end
- return Tool
- end
- local Tool = PerfectionWeld()
- if Tool and script.ClassName == "Script" then
- --- Don't bother with local scripts
- script.Parent.AncestryChanged:connect(function()
- PerfectionWeld()
- end)
- end
- end))
- LocalScript9.Name = "Arms"
- LocalScript9.Parent = Tool0
- table.insert(cors,sandbox(LocalScript9,function()
- Tool = script.Parent
- local arms = nil
- local torso = nil
- local fakearms = {}
- local welds = {}
- function Equip(mouse)
- wait(0.01)
- arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
- torso = Tool.Parent:FindFirstChild("Torso")
- model = Instance.new("Model", workspace)
- model.Name = "Arms"
- humanoid = Instance.new("Humanoid", model)
- humanoid.Name = "ArmHumanoid"
- local Link = Instance.new("ObjectValue",model)
- Link.Name, Link.Value = "HumanoidLink", torso.Parent.Humanoid
- if Tool.Parent:FindFirstChild("Shirt") then
- Tool.Parent.Shirt:Clone().Parent = model
- end
- for n,v in ipairs(arms) do
- local P = v:Clone()
- P.Parent = model
- P.TopSurface, P.BottomSurface = "Smooth", "Smooth"
- local PW = Instance.new("Weld")
- PW.Name = "FakeArmWeld"
- PW.Parent = v
- PW.Part0, PW.Part1, PW.C0, PW.C1 = v, P, v.CFrame:inverse(), P.CFrame:inverse()
- v.Transparency = 1
- fakearms[n] = P
- end
- fakearms[2].RightGrip:Destroy()
- mouse.TargetFilter = model
- end
- function Unequip(mouse)
- model:Destroy()
- for n,v in ipairs(arms) do
- v.Transparency = 0
- end
- end
- Tool.Equipped:connect(Equip)
- Tool.Unequipped:connect(Unequip)
- end))
- LocalScript10.Name = "Weld"
- LocalScript10.Parent = Tool0
- table.insert(cors,sandbox(LocalScript10,function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function SimpleWeld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- W.Parent = x
- end
- function Get(A)
- if A:IsA("BasePart") then
- if A.Name == "HammerRotation" then
- SimpleWeld(script.Parent.HammerAttachment, A)
- A.Anchored = false
- elseif A.Name == "Hammer" then
- Weld(script.Parent.HammerRotation, A)
- A.Anchored = false
- elseif A.Name == "FrizzenRotation" then
- SimpleWeld(script.Parent.FrizzenAttachment, A)
- A.Anchored = false
- elseif A.Name == "Frizzen" then
- Weld(script.Parent.FrizzenRotation, A)
- A.Anchored = false
- else
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- end
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- end))
- Part11.Name = "Grip"
- Part11.Parent = Tool0
- Part11.Material = Enum.Material.Wood
- Part11.BrickColor = BrickColor.new("Pine Cone")
- Part11.Rotation = Vector3.new(-180, 0, -180)
- Part11.CanCollide = false
- Part11.FormFactor = Enum.FormFactor.Custom
- Part11.Size = Vector3.new(0.249733165, 0.249733493, 0.249733463)
- Part11.CFrame = CFrame.new(-8.40885925, 3.84257984, -83.8658752, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Part11.BottomSurface = Enum.SurfaceType.Smooth
- Part11.TopSurface = Enum.SurfaceType.Smooth
- Part11.Color = Color3.new(0.423529, 0.345098, 0.294118)
- Part11.Position = Vector3.new(-8.40885925, 3.84257984, -83.8658752)
- Part11.Orientation = Vector3.new(0, 180, 0)
- Part11.Color = Color3.new(0.423529, 0.345098, 0.294118)
- CylinderMesh12.Parent = Part11
- CylinderMesh12.Scale = Vector3.new(0.947650433, 0.0557441823, 0.947649717)
- CylinderMesh12.Scale = Vector3.new(0.947650433, 0.0557441823, 0.947649717)
- Part13.Name = "Wood"
- Part13.Parent = Tool0
- Part13.Material = Enum.Material.Wood
- Part13.BrickColor = BrickColor.new("Pine Cone")
- Part13.CanCollide = false
- Part13.FormFactor = Enum.FormFactor.Custom
- Part13.Size = Vector3.new(0.249733165, 1.12017298, 0.249733463)
- Part13.CFrame = CFrame.new(-8.40727234, 3.08049679, -83.8654633, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part13.BottomSurface = Enum.SurfaceType.Smooth
- Part13.TopSurface = Enum.SurfaceType.Smooth
- Part13.Color = Color3.new(0.423529, 0.345098, 0.294118)
- Part13.Position = Vector3.new(-8.40727234, 3.08049679, -83.8654633)
- Part13.Color = Color3.new(0.423529, 0.345098, 0.294118)
- Weld14.Parent = Part13
- Weld14.C0 = CFrame.new(0, 0, 0, 1.10826505e-07, -1, 1.24278703e-08, 2.08616228e-07, -1.24278472e-08, -1, 1, 1.10826505e-07, 2.08616228e-07)
- Weld14.C1 = CFrame.new(0, 0, 0, 1.10826505e-07, -1, 1.24278703e-08, 2.08616228e-07, -1.24278472e-08, -1, 1, 1.10826505e-07, 2.08616228e-07)
- CylinderMesh15.Parent = Part13
- CylinderMesh15.Scale = Vector3.new(0.869548976, 1, 0.869550526)
- CylinderMesh15.Scale = Vector3.new(0.869548976, 1, 0.869550526)
- Part16.Name = "Metal"
- Part16.Parent = Tool0
- Part16.Material = Enum.Material.Wood
- Part16.BrickColor = BrickColor.new("Beige")
- Part16.Rotation = Vector3.new(0, -90, 0)
- Part16.CanCollide = false
- Part16.FormFactor = Enum.FormFactor.Custom
- Part16.Size = Vector3.new(0.249733165, 2.88074279, 0.249733463)
- Part16.CFrame = CFrame.new(-8.40756989, 4.19514513, -83.8649292, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Part16.BottomSurface = Enum.SurfaceType.Smooth
- Part16.TopSurface = Enum.SurfaceType.Smooth
- Part16.Color = Color3.new(0.792157, 0.74902, 0.639216)
- Part16.Position = Vector3.new(-8.40756989, 4.19514513, -83.8649292)
- Part16.Orientation = Vector3.new(0, -90, 0)
- Part16.Color = Color3.new(0.792157, 0.74902, 0.639216)
- CylinderMesh17.Parent = Part16
- CylinderMesh17.Scale = Vector3.new(0.800000012, 0.995999992, 0.800000012)
- CylinderMesh17.Scale = Vector3.new(0.800000012, 0.995999992, 0.800000012)
- Part18.Name = "Metal"
- Part18.Parent = Tool0
- Part18.Material = Enum.Material.Wood
- Part18.BrickColor = BrickColor.new("Pine Cone")
- Part18.Rotation = Vector3.new(0, -90, 0)
- Part18.CanCollide = false
- Part18.FormFactor = Enum.FormFactor.Custom
- Part18.Size = Vector3.new(0.249733165, 2.88074279, 0.249733463)
- Part18.CFrame = CFrame.new(-8.40756989, 4.1851449, -83.8649292, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Part18.BottomSurface = Enum.SurfaceType.Smooth
- Part18.TopSurface = Enum.SurfaceType.Smooth
- Part18.Color = Color3.new(0.423529, 0.345098, 0.294118)
- Part18.Position = Vector3.new(-8.40756989, 4.1851449, -83.8649292)
- Part18.Orientation = Vector3.new(0, -90, 0)
- Part18.Color = Color3.new(0.423529, 0.345098, 0.294118)
- CylinderMesh19.Parent = Part18
- CylinderMesh19.Scale = Vector3.new(0.907233477, 1, 0.85386616)
- CylinderMesh19.Scale = Vector3.new(0.907233477, 1, 0.85386616)
- LocalScript20.Name = "Remove Mouse"
- LocalScript20.Parent = Tool0
- table.insert(cors,sandbox(LocalScript20,function()
- local mouse = game.Players.LocalPlayer:GetMouse()
- mouse.Icon = 'rbxassetid://35446049'
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = owner.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