Advertisement
Gotmilk0086

Stronger then the world kid script

Sep 6th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.50 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84. local plr = owner
  85. local char = plr.Character
  86.  
  87. function FindInTable(t, n)
  88. for i,v in pairs(t) do
  89. if v == n then
  90. return true
  91. end
  92. end
  93. return false
  94. end
  95. --Transformaaaaation--
  96. char["Left Arm"].BrickColor = BrickColor.new("Pastel brown")
  97. char["Right Arm"].BrickColor = BrickColor.new("Pastel brown")
  98. char.Head.BrickColor = BrickColor.new("Pastel brown")
  99. char["Left Leg"].BrickColor = BrickColor.new("Pastel brown")
  100. char["Right Leg"].BrickColor = BrickColor.new("Pastel brown")
  101.  
  102. for i,v in pairs(char:children'') do
  103. local toremove = {"CharacterMesh", "Shirt", "Pants", "ShirtGraphic", "Accessory"}
  104. if FindInTable(toremove, v.ClassName) then v:Destroy() end
  105. if v.ClassName == "BodyColors" then
  106. v.HeadColor = BrickColor.new("Pastel brown")
  107. v.LeftArmColor = BrickColor.new("Pastel brown")
  108. v.LeftLegColor = BrickColor.new("Pastel brown")
  109. v.RightArmColor = BrickColor.new("Pastel brown")
  110. v.RightLegColor = BrickColor.new("Pastel brown")
  111. v.TorsoColor = BrickColor.new("Pastel brown")
  112. end
  113. end
  114.  
  115. local face = char.Head:FindFirstChild'face' if face then face.Texture = "http://www.roblox.com/asset/?id=31117192" end
  116. Instance.new("Shirt", char).ShirtTemplate = "http://www.roblox.com/asset/?id=812553202"
  117. Instance.new("Pants", char).PantsTemplate = "http://www.roblox.com/asset/?id=772799671"
  118. local function CreateHat(name, meshid, textureid)
  119. local h = Instance.new("Accessory")
  120. h.Name = name
  121. local han = Instance.new("Part", h)
  122. han.Name = "Handle"
  123. local mesh = Instance.new("SpecialMesh", han)
  124. mesh.Name = "Mesh"
  125. mesh.MeshId = meshid
  126. mesh.TextureId = textureid
  127. return h,han,mesh
  128. end
  129. hum = char:FindFirstChildOfClass'Humanoid'
  130. local h,han,mesh = CreateHat("2LEGITOwl", "http://www.roblox.com/asset/?id=0", "http://www.roblox.com/asset/?id=0")
  131. han.Size = Vector3.new(1, 1, 1)
  132. mesh.Scale = Vector3.new(0.3, 0.3, 0.3)
  133. h.AttachmentPos = Vector3.new(1.1, 0.38, 0)
  134. hum:AddAccessory(h)
  135. h,han,mesh = CreateHat("RobloxScarf", "http://www.roblox.com/asset/?id=0", "http://www.roblox.com/asset/?id=0")
  136. mesh.Scale = Vector3.new(3, 3, 3)
  137. han.Size = Vector3.new(1.9, 2, 2)
  138. h.AttachmentPos = Vector3.new(0, 1.54, 0.1)
  139. hum:AddAccessory(h)
  140. h,han,mesh = CreateHat("Dapper Stan", "http://www.roblox.com/asset/?id=74879498", "http://www.roblox.com/asset/?id=74879471")
  141. mesh.Scale = Vector3.new(1.05, 1.05, 1.05)
  142. han.Size = Vector3.new(2, 2, 2)
  143. hum:AddAccessory(h)
  144.  
  145. local s = Instance.new("Sound")
  146.  
  147. s,s2 = Instance.new('Sound'),Instance.new('Sound')
  148.  
  149. s.SoundId = "http://www.roblox.com/asset/?id=1362139713" -- Type your music ID here
  150. s.Volume = 7 -- this is the Volume
  151. s.Pitch = 1 -- tis is the pich
  152. s.Looped = false
  153. s.archivable = false
  154.  
  155. s.Parent = game.Workspace
  156.  
  157. wait(0)
  158.  
  159. s:play()
  160.  
  161. s2.SoundId = "http://www.roblox.com/asset/?id=632007628" -- Type your music ID here
  162. s2.Volume = 0.7 -- this is the Volume
  163. s2.Pitch = 1 -- tis is the pich
  164. s2.Looped = true
  165. s2.archivable = false
  166.  
  167. s2.Parent = game.Workspace
  168.  
  169. wait(9)
  170.  
  171. s2:play()
  172.  
  173.  
  174.  
  175.  
  176. -- Made by 1ndrew
  177. function sandbox(var,func)
  178. local env = getfenv(func)
  179. local newenv = setmetatable({},{
  180. __index = function(self,k)
  181. if k=="script" then
  182. return var
  183. else
  184. return env[k]
  185. end
  186. end,
  187. })
  188. setfenv(func,newenv)
  189. return func
  190. end
  191. cors = {}
  192. mas = Instance.new("Model",game:GetService("Lighting"))
  193. Tool0 = Instance.new("Tool")
  194. LocalScript1 = Instance.new("LocalScript")
  195. Part2 = Instance.new("Part")
  196. LocalScript3 = Instance.new("LocalScript")
  197. Sound4 = Instance.new("Sound")
  198. Sound5 = Instance.new("Sound")
  199. Animation6 = Instance.new("Animation")
  200. SpecialMesh7 = Instance.new("SpecialMesh")
  201. Script8 = Instance.new("Script")
  202. LocalScript9 = Instance.new("LocalScript")
  203. LocalScript10 = Instance.new("LocalScript")
  204. Part11 = Instance.new("Part")
  205. CylinderMesh12 = Instance.new("CylinderMesh")
  206. Part13 = Instance.new("Part")
  207. Weld14 = Instance.new("Weld")
  208. CylinderMesh15 = Instance.new("CylinderMesh")
  209. Part16 = Instance.new("Part")
  210. CylinderMesh17 = Instance.new("CylinderMesh")
  211. Part18 = Instance.new("Part")
  212. CylinderMesh19 = Instance.new("CylinderMesh")
  213. LocalScript20 = Instance.new("LocalScript")
  214. Tool0.Name = "Brutal Stick"
  215. Tool0.Parent = mas
  216. Tool0.GripForward = Vector3.new(-0.425711513, 0.306347132, -0.851423025)
  217. Tool0.GripPos = Vector3.new(0, -1.29999995, 0.100000001)
  218. Tool0.GripRight = Vector3.new(0.89442718, 0, -0.44721359)
  219. Tool0.GripUp = Vector3.new(0.137002602, 0.951919854, 0.274005204)
  220. Tool0.ToolTip = "TIME TO DIE MOTHERFUCKERS"
  221. LocalScript1.Name = "Aiming"
  222. LocalScript1.Parent = Tool0
  223. table.insert(cors,sandbox(LocalScript1,function()
  224. wait()
  225. Tool=script.Parent
  226. CP,Torso,g=nil,nil,nil
  227. armo1=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  228. armo2=CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  229. getPos=function(Pos,TorsoPos)
  230. return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
  231. end
  232. Turn=function(mouse,Torso,Gyro)
  233. g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position))
  234. offset=(Torso.Position.y-mouse.Hit.p.y)/125
  235. mag=(Torso.Position-mouse.Hit.p).magnitude/125
  236. offset=offset/mag
  237. arm=Torso:FindFirstChild("Right Shoulder")
  238. arm2=Torso:FindFirstChild("Left Shoulder")
  239. if arm~=nil then
  240. 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)
  241. 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)
  242. end
  243. end
  244. Equi=function(mouse)
  245. wait(.01)
  246. local vCharacter = Tool.Parent
  247. local hum = vCharacter:findFirstChild("Humanoid")
  248. blah = hum:LoadAnimation(Tool.Handle.Idle)
  249. blah:Play()
  250. CP=Tool.Parent
  251. Torso=CP.Torso
  252. g=Instance.new("BodyGyro")
  253. g.P=18000
  254. g.D=600
  255. g.maxTorque=Vector3.new(80000,80000000,80000)*50000000000000000000000000
  256. g.cframe=Torso.CFrame
  257. while true do
  258. if Tool.Parent.className~="Model" then
  259. break
  260. end
  261. Turn(mouse,Torso,g)
  262. wait()
  263. end
  264. blah:Stop()
  265. arm.C0=armo1
  266. arm2.C0=armo2
  267. g:Remove()
  268. end
  269. Tool.Equipped:connect(Equi)
  270.  
  271. end))
  272. Part2.Name = "Handle"
  273. Part2.Parent = Tool0
  274. Part2.BrickColor = BrickColor.new("Dark stone grey")
  275. Part2.Transparency = 1
  276. Part2.FormFactor = Enum.FormFactor.Custom
  277. Part2.Size = Vector3.new(0.200000003, 3.9199934, 0.829999506)
  278. Part2.CFrame = CFrame.new(-8.29998779, 3.99999809, -84.0001221, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  279. Part2.BottomSurface = Enum.SurfaceType.Smooth
  280. Part2.TopSurface = Enum.SurfaceType.Smooth
  281. Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  282. Part2.Position = Vector3.new(-8.29998779, 3.99999809, -84.0001221)
  283. Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  284. LocalScript3.Name = "MacheteScript"
  285. LocalScript3.Parent = Part2
  286. table.insert(cors,sandbox(LocalScript3,function()
  287. local UTIL = {}
  288.  
  289. function UTIL.Class(tableIn,template)
  290. tableIn = tableIn or {}
  291. local mt = {
  292. __metatable = UTIL.DeepCopy(template);
  293. __index = UTIL.DeepCopy(template);
  294. }
  295. return setmetatable(tableIn, mt)
  296. end
  297. function UTIL.MakeClass(...)
  298. local arg = {...}
  299. assert(#arg>0, 'ERROR: class needs 1 argument or more')
  300. local members = arg[1]
  301. for i=2,#arg,1 do
  302. if type(arg[i])=='table' then
  303. for key,val in pairs(arg[i]) do
  304. if not members[key] then
  305. members[key] = val
  306. end
  307. end
  308. end
  309. end
  310. local function New(init)
  311. return UTIL.Class(init or {},members)
  312. end
  313. local function Copy(obj, ...)
  314. local newobj = obj:New(unpack(arg))
  315. for n,v in pairs(obj) do newobj[n] = v end
  316. return newobj
  317. end
  318. members.New = New
  319. members.Copy = Copy
  320. return mt
  321. end
  322.  
  323. function UTIL.DeepCopy(orig)
  324. local orig_type = type(orig)
  325. local copy
  326. if orig_type == 'table' then
  327. copy = {}
  328. for orig_key, orig_value in next, orig, nil do
  329. copy[UTIL.DeepCopy(orig_key)] = UTIL.DeepCopy(orig_value)
  330. end
  331. setmetatable(copy, UTIL.DeepCopy(getmetatable(orig)))
  332. else
  333. copy = orig
  334. end
  335. return copy
  336. end
  337.  
  338. function UTIL.Instantiate(guiType)
  339. return function(data)
  340. local obj = Instance.new(guiType)
  341. for k, v in pairs(data) do
  342. if type(k) == 'number' then
  343. v.Parent = obj
  344. else
  345. obj[k] = v
  346. end
  347. end
  348. return obj
  349. end
  350. end
  351.  
  352. function UTIL.RetroRegister(func,...)
  353. func()
  354. for _,i in ipairs({...}) do
  355. i:connect(func)
  356. end
  357. end
  358.  
  359. function UTIL.WaitForValidCharacter(player)
  360. local character = player.Character
  361. if not character or not character.Parent or not character:FindFirstChild('Humanoid') or character.Humanoid.Health <= 0 then
  362. player.CharacterAdded:wait()
  363. wait(0)
  364. character = player.Character
  365. end
  366. return character
  367. end
  368.  
  369. function UTIL.FindCharacterAncestor(subject)
  370. if subject and subject ~= Workspace then
  371. local humanoid = subject:FindFirstChild('Humanoid')
  372. if humanoid then
  373. return subject, humanoid
  374. else
  375. return UTIL.FindCharacterAncestor(subject.Parent)
  376. end
  377. end
  378. return nil
  379. end
  380.  
  381. UTIL.AssetURL = 'http://www.roblox.com/asset/?id='
  382.  
  383.  
  384. UTIL.TouchEnabled = game:GetService("UserInputService").TouchEnabled
  385. do
  386. local suceeded,_ =pcall(function() game.Workspace.CurrentCamera:GetPanSpeed() end)
  387. UTIL.CanCheckPanSpeed = suceeded
  388. end
  389.  
  390.  
  391. local DebrisService = Game:GetService('Debris')
  392. local DebugPrintOffset = 0
  393. function UTIL.Dprint(...)
  394. local line = ''
  395. for _, segment in pairs({...}) do
  396. line = line .. (line and ' ' or '') .. tostring(segment)
  397. end
  398. local gui = Instance.new('ScreenGui')
  399. local label = Instance.new('TextLabel')
  400. label.Text = line
  401. label.Size = UDim2.new(0.25, 0, 0.05, 0)
  402. label.BackgroundTransparency = 0.5
  403. label.Position = UDim2.new(0, 0, 0, DebugPrintOffset)
  404. label.TextWrapped = true
  405. label.Parent = gui
  406. DebrisService:AddItem(gui, 30)
  407. gui.Parent = script.Parent
  408. DebugPrintOffset = (DebugPrintOffset <= 600) and DebugPrintOffset + 30 or 0
  409. end
  410.  
  411. WeldUtil = {}
  412.  
  413.  
  414. do
  415.  
  416.  
  417. function WeldUtil.WeldBetween(a, b)
  418. local weld = Instance.new("Weld")
  419. weld.Part0 = a
  420. weld.Part1 = b
  421. weld.C0 = CFrame.new()
  422. weld.C1 = b.CFrame:inverse() * a.CFrame
  423.  
  424. weld.Parent = a
  425. return weld
  426. end
  427.  
  428. function WeldUtil:PermaWeld(weld)
  429. local OriginalParent = weld.Parent
  430. weld.Changed:connect(function()
  431. Delay(0,function() weld.Parent = OriginalParent end)
  432. end)
  433. end
  434.  
  435. end
  436.  
  437. local InternalEvent =
  438. {
  439. Listeners = nil,
  440. }
  441. do
  442. UTIL.MakeClass(InternalEvent)
  443. function InternalEvent:Connect(func)
  444. if not self.Listeners then self.Listeners = {} end
  445. table.insert(self.Listeners,func)
  446. end
  447. function InternalEvent:Fire(...)
  448. if not self.Listeners then return end
  449. local args = {...}
  450. for _,i in ipairs(self.Listeners) do
  451. Spawn(function() i(unpack(args)) end)
  452. end
  453. end
  454. end
  455.  
  456.  
  457.  
  458. local SwordPart =
  459. {
  460. Damage = 25,
  461. AttackTime = 1,
  462. CoolDown = 0.1,
  463.  
  464. LastSwing = 0,
  465. LastHit = 0,
  466.  
  467. Part= nil,
  468. Owner = nil,
  469.  
  470. OnHit = nil,
  471. OnHitHumanoid = nil,
  472. OnAttackReady = nil,
  473. OnAttack = nil,
  474.  
  475.  
  476. SwingSound = nil,
  477. HitSound = nil,
  478. SwingAnimation = nil,
  479.  
  480. ActiveConnections = {},
  481.  
  482. }
  483. do
  484. UTIL.MakeClass(SwordPart)
  485. function SwordPart.New(npart,nowner)
  486. local init= UTIL.DeepCopy(SwordPart)
  487. init.Part= npart
  488. init.Owner = nowner
  489. table.insert(init.ActiveConnections,init.Part.Touched:connect(function(hit) init:SwordTouch(hit) end))
  490.  
  491. init.OnHit = InternalEvent.New()
  492. init.OnHitHumanoid = InternalEvent.New()
  493. init.OnAttackReady = InternalEvent.New()
  494. init.OnAttack = InternalEvent.New()
  495.  
  496. return init
  497. end
  498.  
  499. function SwordPart:SwordTouch(hit)
  500. if tick()-self.LastSwing >self.AttackTime or tick()-self.LastHit<self.AttackTime then return end
  501. self.OnHit:Fire(hit)
  502. local character,humanoid = UTIL.FindCharacterAncestor(hit)
  503. if character and character ~= self.Owner.Character then
  504. humanoid:TakeDamage(self.Damage)
  505. self.OnHitHumanoid:Fire(humanoid,hit)
  506. self.LastHit = tick()
  507. if self.HitSound then
  508. self.HitSound:Play()
  509. end
  510. end
  511.  
  512. end
  513.  
  514. function SwordPart:DoSwing()
  515. if tick()-self.LastSwing<self.AttackTime+self.CoolDown then
  516. return
  517. end
  518.  
  519. if self.SwingAnimation then
  520. self.SwingAnimation:Play(.1,1,1.5)
  521. end
  522. if self.SwingSound then
  523. self.SwingSound:Play()
  524. end
  525. self.LastSwing = tick()
  526. self.OnAttack:Fire()
  527. end
  528.  
  529. function SwordPart:Destroy()
  530. for _,i in pairs(self.ActiveConnections) do
  531. i:disconnect()
  532. end
  533. end
  534. end
  535. do
  536. local Handle = script.Parent
  537. local Tool = Handle.Parent
  538.  
  539. local Player = game.Players.LocalPlayer
  540. local Character = UTIL.WaitForValidCharacter(Player)
  541. local SwingAni = UTIL.Instantiate"Animation"
  542. {AnimationId = "http://www.roblox.com/Asset?ID=89289879"}
  543.  
  544. local HitSound = Handle:WaitForChild('Hit')
  545. local SwingSound = Handle:WaitForChild('Swing')
  546.  
  547. local SwingAniTrack
  548.  
  549. local Sword
  550.  
  551.  
  552. Tool.Equipped:connect(function(mouse)
  553. Sword = SwordPart.New(Handle,Player)
  554. Sword.Damage = 40
  555. Sword.HitSound = HitSound
  556. Sword.SwingSound = SwingSound
  557. Character = UTIL.WaitForValidCharacter(Player)
  558. local Humanoid = Character:FindFirstChild('Humanoid')
  559.  
  560. SwingAniTrack = Humanoid:LoadAnimation(SwingAni)
  561. Sword.SwingAnimation = SwingAniTrack
  562.  
  563. Sword.OnHitHumanoid:Connect(function(humanoid,hit)
  564. local myTorso = Character:FindFirstChild('Torso')
  565. local torso = humanoid.Parent:FindFirstChild('Torso')
  566. if not torso or not myTorso then return end
  567.  
  568. if hit.Name=='Right Arm' or hit.Name=='Left Arm' or hit.Name=='Right Leg' or hit.Name=='Left Leg' then
  569. hit:BreakJoints()
  570. WeldUtil.WeldBetween(hit, Handle)
  571. Delay(1,function() hit:BreakJoints() end )
  572. end
  573. end)
  574.  
  575. mouse.Button1Down:connect(function()
  576. Sword:DoSwing()
  577. end)
  578. end)
  579. Tool.Unequipped:connect(function()
  580. Sword:Destroy()
  581. end)
  582.  
  583. end
  584.  
  585. end))
  586. Sound4.Name = "Hit"
  587. Sound4.Parent = Part2
  588. Sound4.Pitch = 0.69999998807907
  589. Sound4.SoundId = "http://www.roblox.com/Asset?ID=123252378"
  590. Sound4.Volume = 1
  591. Sound5.Name = "Swing"
  592. Sound5.Parent = Part2
  593. Sound5.SoundId = "rbxasset://sounds/swordslash.wav"
  594. Sound5.Volume = 1
  595. Animation6.Name = "Idle"
  596. Animation6.Parent = Part2
  597. Animation6.AnimationId = "http://www.roblox.com/Asset?ID=75522566"
  598. SpecialMesh7.Parent = Part2
  599. SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=123248347"
  600. SpecialMesh7.Scale = Vector3.new(0.400000006, 0.400000006, 0.400000006)
  601. SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=123248449"
  602. SpecialMesh7.MeshType = Enum.MeshType.FileMesh
  603. SpecialMesh7.Scale = Vector3.new(0.400000006, 0.400000006, 0.400000006)
  604. Script8.Name = "qPerfectionWeld"
  605. Script8.Parent = Tool0
  606. table.insert(cors,sandbox(Script8,function()
  607.  
  608.  
  609. 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).
  610.  
  611.  
  612. local function CallOnChildren(Instance, FunctionToCall)
  613. -- Calls a function on each of the children of a certain object, using recursion.
  614.  
  615. FunctionToCall(Instance)
  616.  
  617. for _, Child in next, Instance:GetChildren() do
  618. CallOnChildren(Child, FunctionToCall)
  619. end
  620. end
  621.  
  622. local function GetNearestParent(Instance, ClassName)
  623. -- Returns the nearest parent of a certain class, or returns nil
  624.  
  625. local Ancestor = Instance
  626. repeat
  627. Ancestor = Ancestor.Parent
  628. if Ancestor == nil then
  629. return nil
  630. end
  631. until Ancestor:IsA(ClassName)
  632.  
  633. return Ancestor
  634. end
  635.  
  636. local function GetBricks(StartInstance)
  637. local List = {}
  638.  
  639. -- if StartInstance:IsA("BasePart") then
  640. -- List[#List+1] = StartInstance
  641. -- end
  642.  
  643. CallOnChildren(StartInstance, function(Item)
  644. if Item:IsA("BasePart") then
  645. List[#List+1] = Item;
  646. end
  647. end)
  648.  
  649. return List
  650. end
  651.  
  652. local function Modify(Instance, Values)
  653. -- Modifies an Instance by using a table.
  654.  
  655. assert(type(Values) == "table", "Values is not a table");
  656.  
  657. for Index, Value in next, Values do
  658. if type(Index) == "number" then
  659. Value.Parent = Instance
  660. else
  661. Instance[Index] = Value
  662. end
  663. end
  664. return Instance
  665. end
  666.  
  667. local function Make(ClassType, Properties)
  668. -- Using a syntax hack to create a nice way to Make new items.
  669.  
  670. return Modify(Instance.new(ClassType), Properties)
  671. end
  672.  
  673. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  674. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  675.  
  676. local function HasWheelJoint(Part)
  677. for _, SurfaceName in pairs(Surfaces) do
  678. for _, HingSurfaceName in pairs(HingSurfaces) do
  679. if Part[SurfaceName].Name == HingSurfaceName then
  680. return true
  681. end
  682. end
  683. end
  684.  
  685. return false
  686. end
  687.  
  688. local function ShouldBreakJoints(Part)
  689. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  690. -- definitely some edge cases.
  691.  
  692. if NEVER_BREAK_JOINTS then
  693. return false
  694. end
  695.  
  696. if HasWheelJoint(Part) then
  697. return false
  698. end
  699.  
  700. local Connected = Part:GetConnectedParts()
  701.  
  702. if #Connected == 1 then
  703. return false
  704. end
  705.  
  706. for _, Item in pairs(Connected) do
  707. if HasWheelJoint(Item) then
  708. return false
  709. elseif not Item:IsDescendantOf(script.Parent) then
  710. return false
  711. end
  712. end
  713.  
  714. return true
  715. end
  716.  
  717. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  718.  
  719.  
  720. JointType = JointType or "Weld"
  721. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  722.  
  723. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  724. Modify(NewWeld, {
  725. Name = "qCFrameWeldThingy";
  726. Part0 = Part0;
  727. Part1 = Part1;
  728. C0 = CFrame.new();--Part0.CFrame:inverse();
  729. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  730. Parent = Part1;
  731. })
  732.  
  733. if not RelativeValue then
  734. RelativeValue = Make("CFrameValue", {
  735. Parent = Part1;
  736. Name = "qRelativeCFrameWeldValue";
  737. Archivable = true;
  738. Value = NewWeld.C1;
  739. })
  740. end
  741.  
  742. return NewWeld
  743. end
  744.  
  745. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  746.  
  747.  
  748. for _, Part in pairs(Parts) do
  749. if ShouldBreakJoints(Part) then
  750. Part:BreakJoints()
  751. end
  752. end
  753.  
  754. for _, Part in pairs(Parts) do
  755. if Part ~= MainPart then
  756. WeldTogether(MainPart, Part, JointType, MainPart)
  757. end
  758. end
  759.  
  760. if not DoNotUnanchor then
  761. for _, Part in pairs(Parts) do
  762. Part.Anchored = false
  763. end
  764. MainPart.Anchored = false
  765. end
  766. end
  767.  
  768. local function PerfectionWeld()
  769. local Tool = GetNearestParent(script, "Tool")
  770.  
  771. local Parts = GetBricks(script.Parent)
  772. 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]
  773.  
  774. if PrimaryPart then
  775. WeldParts(Parts, PrimaryPart, "Weld", false)
  776. else
  777. warn("qWeld - Unable to weld part")
  778. end
  779.  
  780. return Tool
  781. end
  782.  
  783. local Tool = PerfectionWeld()
  784.  
  785.  
  786. if Tool and script.ClassName == "Script" then
  787. --- Don't bother with local scripts
  788.  
  789. script.Parent.AncestryChanged:connect(function()
  790. PerfectionWeld()
  791. end)
  792. end
  793.  
  794.  
  795. end))
  796. LocalScript9.Name = "Arms"
  797. LocalScript9.Parent = Tool0
  798. table.insert(cors,sandbox(LocalScript9,function()
  799. Tool = script.Parent
  800. local arms = nil
  801. local torso = nil
  802. local fakearms = {}
  803. local welds = {}
  804.  
  805. function Equip(mouse)
  806. wait(0.01)
  807. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  808. torso = Tool.Parent:FindFirstChild("Torso")
  809. model = Instance.new("Model", workspace)
  810. model.Name = "Arms"
  811. humanoid = Instance.new("Humanoid", model)
  812. humanoid.Name = "ArmHumanoid"
  813. local Link = Instance.new("ObjectValue",model)
  814. Link.Name, Link.Value = "HumanoidLink", torso.Parent.Humanoid
  815. if Tool.Parent:FindFirstChild("Shirt") then
  816. Tool.Parent.Shirt:Clone().Parent = model
  817. end
  818. for n,v in ipairs(arms) do
  819. local P = v:Clone()
  820. P.Parent = model
  821. P.TopSurface, P.BottomSurface = "Smooth", "Smooth"
  822. local PW = Instance.new("Weld")
  823. PW.Name = "FakeArmWeld"
  824. PW.Parent = v
  825. PW.Part0, PW.Part1, PW.C0, PW.C1 = v, P, v.CFrame:inverse(), P.CFrame:inverse()
  826. v.Transparency = 1
  827. fakearms[n] = P
  828. end
  829. fakearms[2].RightGrip:Destroy()
  830. mouse.TargetFilter = model
  831. end
  832.  
  833. function Unequip(mouse)
  834. model:Destroy()
  835. for n,v in ipairs(arms) do
  836. v.Transparency = 0
  837. end
  838. end
  839.  
  840. Tool.Equipped:connect(Equip)
  841. Tool.Unequipped:connect(Unequip)
  842.  
  843. end))
  844. LocalScript10.Name = "Weld"
  845. LocalScript10.Parent = Tool0
  846. table.insert(cors,sandbox(LocalScript10,function()
  847.  
  848. function Weld(x,y)
  849. local W = Instance.new("Weld")
  850. W.Part0 = x
  851. W.Part1 = y
  852. local CJ = CFrame.new(x.Position)
  853. local C0 = x.CFrame:inverse()*CJ
  854. local C1 = y.CFrame:inverse()*CJ
  855. W.C0 = C0
  856. W.C1 = C1
  857. W.Parent = x
  858. end
  859.  
  860. function SimpleWeld(x,y)
  861. local W = Instance.new("Weld")
  862. W.Part0 = x
  863. W.Part1 = y
  864. W.Parent = x
  865. end
  866.  
  867. function Get(A)
  868. if A:IsA("BasePart") then
  869. if A.Name == "HammerRotation" then
  870. SimpleWeld(script.Parent.HammerAttachment, A)
  871. A.Anchored = false
  872. elseif A.Name == "Hammer" then
  873. Weld(script.Parent.HammerRotation, A)
  874. A.Anchored = false
  875. elseif A.Name == "FrizzenRotation" then
  876. SimpleWeld(script.Parent.FrizzenAttachment, A)
  877. A.Anchored = false
  878. elseif A.Name == "Frizzen" then
  879. Weld(script.Parent.FrizzenRotation, A)
  880. A.Anchored = false
  881. else
  882. Weld(script.Parent.Handle, A)
  883. A.Anchored = false
  884. end
  885. else
  886. local C = A:GetChildren()
  887. for i=1, #C do
  888. Get(C[i])
  889. end
  890. end
  891. end
  892.  
  893. function Finale()
  894. Get(script.Parent)
  895. end
  896.  
  897.  
  898. end))
  899. Part11.Name = "Grip"
  900. Part11.Parent = Tool0
  901. Part11.Material = Enum.Material.Wood
  902. Part11.BrickColor = BrickColor.new("Pine Cone")
  903. Part11.Rotation = Vector3.new(-180, 0, -180)
  904. Part11.CanCollide = false
  905. Part11.FormFactor = Enum.FormFactor.Custom
  906. Part11.Size = Vector3.new(0.249733165, 0.249733493, 0.249733463)
  907. Part11.CFrame = CFrame.new(-8.40885925, 3.84257984, -83.8658752, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  908. Part11.BottomSurface = Enum.SurfaceType.Smooth
  909. Part11.TopSurface = Enum.SurfaceType.Smooth
  910. Part11.Color = Color3.new(0.423529, 0.345098, 0.294118)
  911. Part11.Position = Vector3.new(-8.40885925, 3.84257984, -83.8658752)
  912. Part11.Orientation = Vector3.new(0, 180, 0)
  913. Part11.Color = Color3.new(0.423529, 0.345098, 0.294118)
  914. CylinderMesh12.Parent = Part11
  915. CylinderMesh12.Scale = Vector3.new(0.947650433, 0.0557441823, 0.947649717)
  916. CylinderMesh12.Scale = Vector3.new(0.947650433, 0.0557441823, 0.947649717)
  917. Part13.Name = "Wood"
  918. Part13.Parent = Tool0
  919. Part13.Material = Enum.Material.Wood
  920. Part13.BrickColor = BrickColor.new("Pine Cone")
  921. Part13.CanCollide = false
  922. Part13.FormFactor = Enum.FormFactor.Custom
  923. Part13.Size = Vector3.new(0.249733165, 1.12017298, 0.249733463)
  924. Part13.CFrame = CFrame.new(-8.40727234, 3.08049679, -83.8654633, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  925. Part13.BottomSurface = Enum.SurfaceType.Smooth
  926. Part13.TopSurface = Enum.SurfaceType.Smooth
  927. Part13.Color = Color3.new(0.423529, 0.345098, 0.294118)
  928. Part13.Position = Vector3.new(-8.40727234, 3.08049679, -83.8654633)
  929. Part13.Color = Color3.new(0.423529, 0.345098, 0.294118)
  930. Weld14.Parent = Part13
  931. 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)
  932. 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)
  933. CylinderMesh15.Parent = Part13
  934. CylinderMesh15.Scale = Vector3.new(0.869548976, 1, 0.869550526)
  935. CylinderMesh15.Scale = Vector3.new(0.869548976, 1, 0.869550526)
  936. Part16.Name = "Metal"
  937. Part16.Parent = Tool0
  938. Part16.Material = Enum.Material.Wood
  939. Part16.BrickColor = BrickColor.new("Beige")
  940. Part16.Rotation = Vector3.new(0, -90, 0)
  941. Part16.CanCollide = false
  942. Part16.FormFactor = Enum.FormFactor.Custom
  943. Part16.Size = Vector3.new(0.249733165, 2.88074279, 0.249733463)
  944. Part16.CFrame = CFrame.new(-8.40756989, 4.19514513, -83.8649292, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  945. Part16.BottomSurface = Enum.SurfaceType.Smooth
  946. Part16.TopSurface = Enum.SurfaceType.Smooth
  947. Part16.Color = Color3.new(0.792157, 0.74902, 0.639216)
  948. Part16.Position = Vector3.new(-8.40756989, 4.19514513, -83.8649292)
  949. Part16.Orientation = Vector3.new(0, -90, 0)
  950. Part16.Color = Color3.new(0.792157, 0.74902, 0.639216)
  951. CylinderMesh17.Parent = Part16
  952. CylinderMesh17.Scale = Vector3.new(0.800000012, 0.995999992, 0.800000012)
  953. CylinderMesh17.Scale = Vector3.new(0.800000012, 0.995999992, 0.800000012)
  954. Part18.Name = "Metal"
  955. Part18.Parent = Tool0
  956. Part18.Material = Enum.Material.Wood
  957. Part18.BrickColor = BrickColor.new("Pine Cone")
  958. Part18.Rotation = Vector3.new(0, -90, 0)
  959. Part18.CanCollide = false
  960. Part18.FormFactor = Enum.FormFactor.Custom
  961. Part18.Size = Vector3.new(0.249733165, 2.88074279, 0.249733463)
  962. Part18.CFrame = CFrame.new(-8.40756989, 4.1851449, -83.8649292, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  963. Part18.BottomSurface = Enum.SurfaceType.Smooth
  964. Part18.TopSurface = Enum.SurfaceType.Smooth
  965. Part18.Color = Color3.new(0.423529, 0.345098, 0.294118)
  966. Part18.Position = Vector3.new(-8.40756989, 4.1851449, -83.8649292)
  967. Part18.Orientation = Vector3.new(0, -90, 0)
  968. Part18.Color = Color3.new(0.423529, 0.345098, 0.294118)
  969. CylinderMesh19.Parent = Part18
  970. CylinderMesh19.Scale = Vector3.new(0.907233477, 1, 0.85386616)
  971. CylinderMesh19.Scale = Vector3.new(0.907233477, 1, 0.85386616)
  972. LocalScript20.Name = "Remove Mouse"
  973. LocalScript20.Parent = Tool0
  974. table.insert(cors,sandbox(LocalScript20,function()
  975. local mouse = game.Players.LocalPlayer:GetMouse()
  976. mouse.Icon = 'rbxassetid://35446049'
  977. end))
  978. for i,v in pairs(mas:GetChildren()) do
  979. v.Parent = owner.Backpack
  980. pcall(function() v:MakeJoints() end)
  981. end
  982. mas:Destroy()
  983. for i,v in pairs(cors) do
  984. spawn(function()
  985. pcall(v)
  986. end)
  987. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement