Advertisement
lafur

Untitled

Apr 4th, 2019
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function sandbox(var,func)
  2.     local env = getfenv(func)
  3.     local newenv = setmetatable({},{
  4.         __index = function(self,k)
  5.             if k=="script" then
  6.                 return var
  7.             else
  8.                 return env[k]
  9.             end
  10.         end,
  11.     })
  12.     setfenv(func,newenv)
  13.     return func
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. Tool0 = Instance.new("Tool")
  18. Part1 = Instance.new("Part")
  19. CylinderMesh2 = Instance.new("CylinderMesh")
  20. Weld3 = Instance.new("Weld")
  21. Weld4 = Instance.new("Weld")
  22. Weld5 = Instance.new("Weld")
  23. Weld6 = Instance.new("Weld")
  24. Weld7 = Instance.new("Weld")
  25. Weld8 = Instance.new("Weld")
  26. Weld9 = Instance.new("Weld")
  27. Weld10 = Instance.new("Weld")
  28. Weld11 = Instance.new("Weld")
  29. Weld12 = Instance.new("Weld")
  30. Weld13 = Instance.new("Weld")
  31. Weld14 = Instance.new("Weld")
  32. Weld15 = Instance.new("Weld")
  33. Weld16 = Instance.new("Weld")
  34. Weld17 = Instance.new("Weld")
  35. Weld18 = Instance.new("Weld")
  36. Weld19 = Instance.new("Weld")
  37. Weld20 = Instance.new("Weld")
  38. Weld21 = Instance.new("Weld")
  39. Weld22 = Instance.new("Weld")
  40. Weld23 = Instance.new("Weld")
  41. Weld24 = Instance.new("Weld")
  42. Weld25 = Instance.new("Weld")
  43. Weld26 = Instance.new("Weld")
  44. Weld27 = Instance.new("Weld")
  45. Weld28 = Instance.new("Weld")
  46. Weld29 = Instance.new("Weld")
  47. Weld30 = Instance.new("Weld")
  48. Weld31 = Instance.new("Weld")
  49. Weld32 = Instance.new("Weld")
  50. Weld33 = Instance.new("Weld")
  51. Weld34 = Instance.new("Weld")
  52. Weld35 = Instance.new("Weld")
  53. Weld36 = Instance.new("Weld")
  54. Weld37 = Instance.new("Weld")
  55. Weld38 = Instance.new("Weld")
  56. Weld39 = Instance.new("Weld")
  57. Weld40 = Instance.new("Weld")
  58. Weld41 = Instance.new("Weld")
  59. Weld42 = Instance.new("Weld")
  60. Weld43 = Instance.new("Weld")
  61. Weld44 = Instance.new("Weld")
  62. BoolValue45 = Instance.new("BoolValue")
  63. Script46 = Instance.new("Script")
  64. Script47 = Instance.new("Script")
  65. LocalScript48 = Instance.new("LocalScript")
  66. Part49 = Instance.new("Part")
  67. Script50 = Instance.new("Script")
  68. Decal51 = Instance.new("Decal")
  69. Decal52 = Instance.new("Decal")
  70. Decal53 = Instance.new("Decal")
  71. Decal54 = Instance.new("Decal")
  72. Decal55 = Instance.new("Decal")
  73. Decal56 = Instance.new("Decal")
  74. Weld57 = Instance.new("Weld")
  75. Script58 = Instance.new("Script")
  76. LocalScript59 = Instance.new("LocalScript")
  77. Tool0.Name = "kickhammer"
  78. Tool0.Parent = mas
  79. Part1.Name = "Handle"
  80. Part1.Parent = Tool0
  81. Part1.CFrame = CFrame.new(12.8954172, 2.99767208, 6.03132582, 0.194495991, 0.980729401, 0.0182793029, -0.980597854, 0.193938702, 0.0284224544, 0.0243352558, -0.0234507825, 0.999423921)
  82. Part1.Orientation = Vector3.new(-1.63, 1.04999995, -78.8099976)
  83. Part1.Position = Vector3.new(12.8954172, 2.99767208, 6.03132582)
  84. Part1.Rotation = Vector3.new(-1.63, 1.04999995, -78.7799988)
  85. Part1.Color = Color3.new(0.972549, 0.972549, 0.972549)
  86. Part1.Size = Vector3.new(0.5, 2.5999999, 0.5)
  87. Part1.BottomSurface = Enum.SurfaceType.Weld
  88. Part1.BrickColor = BrickColor.new("Institutional white")
  89. Part1.Material = Enum.Material.Glass
  90. Part1.Reflectance = 0.94999998807907
  91. Part1.TopSurface = Enum.SurfaceType.Weld
  92. Part1.brickColor = BrickColor.new("Institutional white""MouseClick"
  93. BoolValue45.Parent = Tool0
  94. BoolValue45.Value = true
  95. Script46.Name = "Welding"
  96. Script46.Parent = Tool0
  97. table.insert(cors,sandbox(Script46,function()
  98. function Weld(x,y)
  99.     local W = Instance.new("Weld")
  100.     W.Part0 = x
  101.     W.Part1 = y
  102.     local CJ = CFrame.new(x.Position)
  103.     local C0 = x.CFrame:inverse()*CJ
  104.     local C1 = y.CFrame:inverse()*CJ
  105.     W.C0 = C0
  106.     W.C1 = C1
  107.     W.Parent = x
  108. end
  109.  
  110. function Get(A)
  111.     if A.className == "Part" then
  112.         Weld(script.Parent.Handle, A)
  113.         A.Anchored = false
  114.     else
  115.         local C = A:GetChildren()
  116.         for i=1, #C do
  117.         Get(C[i])
  118.         end
  119.     end
  120. end
  121.  
  122. function Finale()
  123.     Get(script.Parent)
  124. end
  125.  
  126. script.Parent.Equipped:connect(Finale)
  127. script.Parent.Unequipped:connect(Finale)
  128. Finale()
  129. end))
  130. Script47.Name = "_Main"
  131. Script47.Parent = Tool0
  132. table.insert(cors,sandbox(Script47,function()
  133. --player
  134. player = nil
  135. --save shoulders
  136. RSH, LSH = nil, nil
  137. --grip
  138. GRP = nil
  139. --welds
  140. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  141. --what anim
  142. anim = "none"
  143.  
  144. --onselected, save shoulders and get player
  145. script.Parent.Equipped:connect(function()
  146.     player = game.Players:playerFromCharacter(script.Parent.Parent)
  147.     local ch = script.Parent.Parent
  148.     RSH = ch.Torso["Right Shoulder"]
  149.     LSH = ch.Torso["Left Shoulder"]
  150.     GRP = ch["Right Arm"].RightGrip
  151.     --
  152.     RSH.Parent = nil
  153.     LSH.Parent = nil
  154.     --
  155.     RW.Part0 = ch.Torso
  156.     RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  157.     RW.C1 = CFrame.new(0, 0.5, 0)
  158.     RW.Part1 = ch["Right Arm"]
  159.     RW.Parent = ch.Torso
  160.     _G.R = RW
  161.     --
  162.     LW.Part0 = ch.Torso
  163.     LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  164.     LW.C1 = CFrame.new(0, 0.5, 0)
  165.     LW.Part1 = ch["Left Arm"]
  166.     LW.Parent = ch.Torso
  167.     _G.L = LW
  168.     --
  169.     GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1, 0, 0)
  170.     --Bring_Arm_Up animation
  171.     for i = 0, 1, 0.05 do
  172.         wait()
  173.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i)
  174.         LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i)  
  175.         LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0)
  176.     end
  177. end)
  178.  
  179. --griptcf = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-math.pi/2+0.5, 0, 0)
  180.  
  181. script.Parent.Unequipped:connect(function()
  182.     --Bring_Arm_Down animation
  183.     for i = 1, 0, -0.05 do
  184.         wait()
  185.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i)
  186.         LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i)  
  187.         LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0)
  188.     end
  189.     RW.Parent = nil
  190.     LW.Parent = nil
  191.     RSH.Parent = player.Character.Torso
  192.     LSH.Parent = player.Character.Torso
  193. end)
  194.  
  195. function HomeRunHit(part)
  196.     local h = (part.Parent or game):FindFirstChild("Humanoid") --or findfirstchild optimization
  197.     if h then
  198.         h.Sit = true
  199.         wait()
  200.         h.Jump = true
  201.         h.Parent.Torso.Velocity = (CFrame.new(script.Parent.Handle.Position, h.Parent.Torso.Position).lookVector * 100) + Vector3.new(0, 30, 0)
  202.         h.Parent.Torso.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  203.     end
  204. end
  205.  
  206. function HomeRun()
  207.     for i = 0, 1, 0.1 do
  208.         if anim ~= "homerun" then return end
  209.         wait()
  210.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+1.2*i, -0.5*i, -0.5+i)
  211.         --R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5, 0.5)
  212.         LW.C0 = CFrame.new(-1.5+0.5*i, 0.5, -0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)   
  213.         --L.C0 = CFrame.new(-1.0, 0.5, -0.5) * CFrame.fromEulerAnglesXYZ(1.7, 0, 1)
  214.     end
  215.     --start homerunhit connection--
  216.     local con = script.Parent.Handle.Touched:connect(HomeRunHit)
  217.     ----------------------------------------
  218.     for i = 0, 1, 0.2 do
  219.         wait()
  220.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -0.5-1.7*i, 0.5+0.5*i)
  221.         --R.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2, 1)
  222.         LW.C0 = CFrame.new(-1-0.5*i, 0.5, -0.5+0.5*i) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8-1.2*i)   
  223.         LW.C1 = CFrame.new(0, 0.5-i, 0)
  224.         GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-2*i, 0, 0)
  225.     end
  226.     for i = 0, 1, 0.2 do
  227.         wait()
  228.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5, -2.2-0.6*i, 1)
  229.     end
  230.     wait(0.1)
  231.     ----end homerun connection---
  232.     con:disconnect()
  233.     --------------------------------------
  234.     for i = 0, 1, 0.1 do
  235.         wait()
  236.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.5-1.2*i, -2.8+2.8*i, 1-1.5*i)
  237.         --RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  238.         LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, -0.4+1.2*i)   
  239.         LW.C1 = CFrame.new(0, -0.5+i*2, 0)
  240.         --LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  241.         GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-3+2*i, 0, 0)
  242.     end
  243. end
  244.  
  245. function Whack()
  246.     for i = 0, 1, 0.2 do
  247.         if anim ~= "norm" then return end
  248.         wait()
  249.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3+i, 0, -0.5+0.5*i)
  250.         LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7-0.25*i, 0, 0.8-0.6*i) 
  251.     end
  252.     for i = 0, 1, 0.25 do
  253.         if anim ~= "norm" then return end
  254.         wait()
  255.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(2.3-2.5*i, 0, 0)
  256.         LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.45-0.25*i, 0, 0.2)  
  257.         GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1-0.5*i, 0, 0)
  258.     end
  259.     --insert camshake and hit nearby people
  260.     for _, p in pairs(game.Players:GetChildren()) do
  261.         if p.Character:FindFirstChild("Torso") then
  262.             if (p.Character.Torso.Position - (script.Parent.Handle.CFrame*CFrame.new(0, -3, 0)).p).magnitude < 10 then
  263.                 if p ~= player then
  264.                     p.Character.Humanoid.Sit = true
  265.                     delay(0.1, function() p.Character.Humanoid.Jump = true end)
  266.                     p.Character.Torso.RotVelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  267.                 end
  268.             end
  269.         end
  270.     end
  271.     ------
  272.     for i = 0, 1, 0.2 do
  273.         if anim ~= "norm" then return end
  274.         wait()
  275.         RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(-0.2+1.5*i, 0, -0.5*i)
  276.         LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.2+0.5*i, 0, 0.2+0.6*i)  
  277.         GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1.5+0.5*i, 0, 0)
  278.     end
  279. end
  280.  
  281. local a = false
  282. local co = nil
  283. --OMGHAX mouseclick
  284. local last_click = 0
  285. script.Parent.MouseClick.Changed:connect(function()
  286.     if time() - last_click < 0.3 then
  287.         anim = "homerun"
  288.         last_click = time()
  289.         HomeRun()
  290.     else
  291.         anim = "norm"
  292.         last_click = time()
  293.         Whack()
  294.     end
  295. end)
  296.  
  297. end))
  298. LocalScript48.Name = "_EVT"
  299. LocalScript48.Parent = Tool0
  300. table.insert(cors,sandbox(LocalScript48,function()
  301. script.Parent.Equipped:connect(function(mouse)
  302.     mouse.Button1Down:connect(function()
  303.         script.Parent.MouseClick.Value = not script.Parent.MouseClick.Value
  304.     end)
  305. end)
  306. end))
  307. Part49.Name = "Handle 2"
  308. Part49.Parent = Tool0
  309. Part49.CFrame = CFrame.new(14.6511459, 3.33246565, 5.48939991, 0.018308267, -0.980727077, 0.194504812, 0.0283583738, -0.193948328, -0.980597794, 0.999425232, 0.0234669708, 0.0242665503)
  310. Part49.Orientation = Vector3.new(78.6999969, 82.8899994, 171.679993)
  311. Part49.Position = Vector3.new(14.6511459, 3.33246565, 5.48939991)
  312. Part49.Rotation = Vector3.new(88.5800018, 11.2200003, 88.9300003)
  313. Part49.Color = Color3.new(1, 0, 0.74902)
  314. Part49.Transparency = 0.60000002384186
  315. Part49.Size = Vector3.new(2, 1, 1)
  316. Part49.BottomSurface = Enum.SurfaceType.Smooth
  317. Part49.BrickColor = BrickColor.new("Hot pink")
  318. Part49.Material = Enum.Material.Neon
  319. Part49.Reflectance = 1
  320. Part49.TopSurface = Enum.SurfaceType.Smooth
  321. Part49.brickColor = BrickColor.new("Hot pink")
  322. Part49.FormFactor = Enum.FormFactor.Symmetric
  323. Part49.formFactor = Enum.FormFactor.Symmetric
  324. Script50.Parent = Part49
  325. table.insert(cors,sandbox(Script50,function()
  326.     local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
  327.     plr:Kick("You kicked yourself out from the server.")
  328. end)
  329.  
  330. end))
  331. Decal51.Parent = Part49
  332. Decal51.Texture = "http://www.roblox.com/asset/?id=142817767"
  333. Decal51.Face = Enum.NormalId.Back
  334. Decal52.Parent = Part49
  335. Decal52.Texture = "http://www.roblox.com/asset/?id=142817767"
  336. Decal53.Parent = Part49
  337. Decal53.Texture = "http://www.roblox.com/asset/?id=142817767"
  338. Decal53.Face = Enum.NormalId.Back
  339. Decal54.Parent = Part49
  340. Decal54.Texture = "http://www.roblox.com/asset/?id=142817767"
  341. Decal55.Parent = Part49
  342. Decal55.Texture = "http://www.roblox.com/asset/?id=142817767"
  343. Decal55.Face = Enum.NormalId.Back
  344. Decal56.Parent = Part49
  345. Decal56.Texture = "http://www.roblox.com/asset/?id=142817767"
  346. Weld57.Parent = Part49
  347. Weld57.C0 = CFrame.new(0, 0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  348. Weld57.C1 = CFrame.new(1.84774399e-06, 1.2995472, -0.500005245, -6.850317e-05, 1, 1.02692866e-05, -1.59481242e-05, 1.02681943e-05, -1, -1, -6.85033374e-05, 1.59474203e-05)
  349. Weld57.Part0 = Part49
  350. Weld57.Part1 = Part1
  351. Weld57.part1 = Part1
  352. Script58.Name = "SwordScript"
  353. Script58.Parent = Tool0
  354. table.insert(cors,sandbox(Script58,function()
  355. --Rescripted by Luckymaxer
  356. --EUROCOW WAS HERE BECAUSE I MADE THE PARTICLES AND THEREFORE THIS ENTIRE SWORD PRETTY AND LOOK PRETTY WORDS AND I'D LIKE TO DEDICATE THIS TO MY FRIENDS AND HI LUCKYMAXER PLS FIX SFOTH SWORDS TY LOVE Y'ALl
  357. --Updated for R15 avatars by StarWars
  358. --Re-updated by TakeoHonorable
  359.  
  360. Tool = script.Parent
  361. Handle = Tool:WaitForChild("Handle")
  362.  
  363. function Create(ty)
  364.     return function(data)
  365.         local obj = Instance.new(ty)
  366.         for k, v in pairs(data) do
  367.             if type(k) == 'number' then
  368.                 v.Parent = obj
  369.             else
  370.                 obj[k] = v
  371.             end
  372.         end
  373.         return obj
  374.     end
  375. end
  376.  
  377. local BaseUrl = "rbxassetid://"
  378.  
  379. Players = game:GetService("Players")
  380. Debris = game:GetService("Debris")
  381. RunService = game:GetService("RunService")
  382.  
  383. DamageValues = {
  384.     BaseDamage = 5,
  385.     SlashDamage = 10,
  386.     LungeDamage = 30
  387. }
  388.  
  389. --For R15 avatars
  390. Animations = {
  391.     R15Slash = 522635514,
  392.     R15Lunge = 522638767
  393. }
  394.  
  395. Damage = DamageValues.BaseDamage
  396.  
  397. Grips = {
  398.     Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  399.     Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
  400. }
  401.  
  402. Sounds = {
  403.     Slash = Handle:WaitForChild("SwordSlash"),
  404.     Lunge = Handle:WaitForChild("SwordLunge"),
  405.     Unsheath = Handle:WaitForChild("Unsheath")
  406. }
  407.  
  408. ToolEquipped = false
  409.  
  410. --For Omega Rainbow Katana thumbnail to display a lot of particles.
  411. for i, v in pairs(Handle:GetChildren()) do
  412.     if v:IsA("ParticleEmitter") then
  413.         v.Rate = 20
  414.     end
  415. end
  416.  
  417. Tool.Grip = Grips.Up
  418. Tool.Enabled = true
  419.  
  420. function IsTeamMate(Player1, Player2)
  421.     return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
  422. end
  423.  
  424. function TagHumanoid(humanoid, player)
  425.     local Creator_Tag = Instance.new("ObjectValue")
  426.     Creator_Tag.Name = "creator"
  427.     Creator_Tag.Value = player
  428.     Debris:AddItem(Creator_Tag, 2)
  429.     Creator_Tag.Parent = humanoid
  430. end
  431.  
  432. function UntagHumanoid(humanoid)
  433.     for i, v in pairs(humanoid:GetChildren()) do
  434.         if v:IsA("ObjectValue") and v.Name == "creator" then
  435.             v:Destroy()
  436.         end
  437.     end
  438. end
  439.  
  440. function Blow(Hit)
  441.     if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
  442.         return
  443.     end
  444.     local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")
  445.     if not RightArm then
  446.         return
  447.     end
  448.     local RightGrip = RightArm:FindFirstChild("RightGrip")
  449.     if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
  450.         return
  451.     end
  452.     local character = Hit.Parent
  453.     if character == Character then
  454.         return
  455.     end
  456.     local humanoid = character:FindFirstChildOfClass("Humanoid")
  457.     if not humanoid or humanoid.Health == 0 then
  458.         return
  459.     end
  460.     local player = Players:GetPlayerFromCharacter(character)
  461.     if player and (player == Player or IsTeamMate(Player, player)) then
  462.         return
  463.     end
  464.     UntagHumanoid(humanoid)
  465.     TagHumanoid(humanoid, Player)
  466.     humanoid:TakeDamage(Damage)
  467. end
  468.  
  469.  
  470. function Attack()
  471.     Damage = DamageValues.SlashDamage
  472.     Sounds.Slash:Play()
  473.  
  474.     if Humanoid then
  475.         if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  476.             local Anim = Instance.new("StringValue")
  477.             Anim.Name = "toolanim"
  478.             Anim.Value = "Slash"
  479.             Anim.Parent = Tool
  480.         elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  481.             local Anim = Tool:FindFirstChild("R15Slash")
  482.             if Anim then
  483.                 local Track = Humanoid:LoadAnimation(Anim)
  484.                 Track:Play(0)
  485.             end
  486.         end
  487.     end
  488. end
  489.  
  490. function Lunge()
  491.     Damage = DamageValues.LungeDamage
  492.  
  493.     Sounds.Lunge:Play()
  494.    
  495.     if Humanoid then
  496.         if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  497.             local Anim = Instance.new("StringValue")
  498.             Anim.Name = "toolanim"
  499.             Anim.Value = "Lunge"
  500.             Anim.Parent = Tool
  501.         elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  502.             local Anim = Tool:FindFirstChild("R15Lunge")
  503.             if Anim then
  504.                 local Track = Humanoid:LoadAnimation(Anim)
  505.                 Track:Play(0)
  506.             end
  507.         end
  508.     end
  509.     --[[
  510.     if CheckIfAlive() then
  511.         local Force = Instance.new("BodyVelocity")
  512.         Force.velocity = Vector3.new(0, 10, 0)
  513.         Force.maxForce = Vector3.new(0, 4000, 0)
  514.         Debris:AddItem(Force, 0.4)
  515.         Force.Parent = Torso
  516.     end
  517.     ]]
  518.    
  519.     wait(0.2)
  520.     Tool.Grip = Grips.Out
  521.     wait(0.6)
  522.     Tool.Grip = Grips.Up
  523.  
  524.     Damage = DamageValues.SlashDamage
  525. end
  526.  
  527. Tool.Enabled = true
  528. LastAttack = 0
  529.  
  530. function Activated()
  531.     if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
  532.         return
  533.     end
  534.     Tool.Enabled = false
  535.     local Tick = RunService.Stepped:wait()
  536.     if (Tick - LastAttack < 0.2) then
  537.         Lunge()
  538.     else
  539.         Attack()
  540.     end
  541.     LastAttack = Tick
  542.     --wait(0.5)
  543.     Damage = DamageValues.BaseDamage
  544.     local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){
  545.         Name = "R15Slash",
  546.         AnimationId = BaseUrl .. Animations.R15Slash,
  547.         Parent = Tool
  548.     })
  549.    
  550.     local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){
  551.         Name = "R15Lunge",
  552.         AnimationId = BaseUrl .. Animations.R15Lunge,
  553.         Parent = Tool
  554.     })
  555.     Tool.Enabled = true
  556. end
  557.  
  558. function CheckIfAlive()
  559.     return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent) and true) or false)
  560. end
  561.  
  562. function Equipped()
  563.     Character = Tool.Parent
  564.     Player = Players:GetPlayerFromCharacter(Character)
  565.     Humanoid = Character:FindFirstChildOfClass("Humanoid")
  566.     Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart")
  567.     if not CheckIfAlive() then
  568.         return
  569.     end
  570.     ToolEquipped = true
  571.     Sounds.Unsheath:Play()
  572. end
  573.  
  574. function Unequipped()
  575.     Tool.Grip = Grips.Up
  576.     ToolEquipped = false
  577. end
  578.  
  579. Tool.Activated:Connect(Activated)
  580. Tool.Equipped:Connect(Equipped)
  581. Tool.Unequipped:Connect(Unequipped)
  582.  
  583. Connection = Handle.Touched:Connect(Blow)
  584. end))
  585. LocalScript59.Name = "MouseIcon"
  586. LocalScript59.Parent = Tool0
  587. table.insert(cors,sandbox(LocalScript59,function()
  588. --Made by Luckymaxer
  589.  
  590. Mouse_Icon = "rbxasset://textures/GunCursor.png"
  591. Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
  592.  
  593. Tool = script.Parent
  594.  
  595. Mouse = nil
  596.  
  597. function UpdateIcon()
  598.     if Mouse then
  599.         Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
  600.     end
  601. end
  602.  
  603. function OnEquipped(ToolMouse)
  604.     Mouse = ToolMouse
  605.     UpdateIcon()
  606. end
  607.  
  608. function OnChanged(Property)
  609.     if Property == "Enabled" then
  610.         UpdateIcon()
  611.     end
  612. end
  613.  
  614. Tool.Equipped:Connect(OnEquipped)
  615. Tool.Changed:Connect(OnChanged)
  616.  
  617. end))
  618. for i,v in pairs(mas:GetChildren()) do
  619.     v.Parent = workspace
  620.     pcall(function() v:MakeJoints() end)
  621. end
  622. mas:Destroy()
  623. for i,v in pairs(cors) do
  624.     spawn(function()
  625.         pcall(v)
  626.     end)
  627. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement