Advertisement
bonniekawaiidesu

Untitled

Mar 2nd, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 33.71 KB | None | 0 0
  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. script.Parent.Touched:Connect(function(hit)
  327.     local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
  328.     plr:Kick("You kicked yourself out from the server.")
  329. end)
  330.  
  331. end))
  332. Decal51.Parent = Part49
  333. Decal51.Texture = "http://www.roblox.com/asset/?id=142817767"
  334. Decal51.Face = Enum.NormalId.Back
  335. Decal52.Parent = Part49
  336. Decal52.Texture = "http://www.roblox.com/asset/?id=142817767"
  337. Decal53.Parent = Part49
  338. Decal53.Texture = "http://www.roblox.com/asset/?id=142817767"
  339. Decal53.Face = Enum.NormalId.Back
  340. Decal54.Parent = Part49
  341. Decal54.Texture = "http://www.roblox.com/asset/?id=142817767"
  342. Decal55.Parent = Part49
  343. Decal55.Texture = "http://www.roblox.com/asset/?id=142817767"
  344. Decal55.Face = Enum.NormalId.Back
  345. Decal56.Parent = Part49
  346. Decal56.Texture = "http://www.roblox.com/asset/?id=142817767"
  347. Weld57.Parent = Part49
  348. Weld57.C0 = CFrame.new(0, 0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  349. 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)
  350. Weld57.Part0 = Part49
  351. Weld57.Part1 = Part1
  352. Weld57.part1 = Part1
  353. Script58.Name = "SwordScript"
  354. Script58.Parent = Tool0
  355. table.insert(cors,sandbox(Script58,function()
  356. --Rescripted by Luckymaxer
  357. --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
  358. --Updated for R15 avatars by StarWars
  359. --Re-updated by TakeoHonorable
  360.  
  361. Tool = script.Parent
  362. Handle = Tool:WaitForChild("Handle")
  363.  
  364. function Create(ty)
  365.     return function(data)
  366.         local obj = Instance.new(ty)
  367.         for k, v in pairs(data) do
  368.             if type(k) == 'number' then
  369.                 v.Parent = obj
  370.             else
  371.                 obj[k] = v
  372.             end
  373.         end
  374.         return obj
  375.     end
  376. end
  377.  
  378. local BaseUrl = "rbxassetid://"
  379.  
  380. Players = game:GetService("Players")
  381. Debris = game:GetService("Debris")
  382. RunService = game:GetService("RunService")
  383.  
  384. DamageValues = {
  385.     BaseDamage = 5,
  386.     SlashDamage = 10,
  387.     LungeDamage = 30
  388. }
  389.  
  390. --For R15 avatars
  391. Animations = {
  392.     R15Slash = 522635514,
  393.     R15Lunge = 522638767
  394. }
  395.  
  396. Damage = DamageValues.BaseDamage
  397.  
  398. Grips = {
  399.     Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  400.     Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
  401. }
  402.  
  403. Sounds = {
  404.     Slash = Handle:WaitForChild("SwordSlash"),
  405.     Lunge = Handle:WaitForChild("SwordLunge"),
  406.     Unsheath = Handle:WaitForChild("Unsheath")
  407. }
  408.  
  409. ToolEquipped = false
  410.  
  411. --For Omega Rainbow Katana thumbnail to display a lot of particles.
  412. for i, v in pairs(Handle:GetChildren()) do
  413.     if v:IsA("ParticleEmitter") then
  414.         v.Rate = 20
  415.     end
  416. end
  417.  
  418. Tool.Grip = Grips.Up
  419. Tool.Enabled = true
  420.  
  421. function IsTeamMate(Player1, Player2)
  422.     return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
  423. end
  424.  
  425. function TagHumanoid(humanoid, player)
  426.     local Creator_Tag = Instance.new("ObjectValue")
  427.     Creator_Tag.Name = "creator"
  428.     Creator_Tag.Value = player
  429.     Debris:AddItem(Creator_Tag, 2)
  430.     Creator_Tag.Parent = humanoid
  431. end
  432.  
  433. function UntagHumanoid(humanoid)
  434.     for i, v in pairs(humanoid:GetChildren()) do
  435.         if v:IsA("ObjectValue") and v.Name == "creator" then
  436.             v:Destroy()
  437.         end
  438.     end
  439. end
  440.  
  441. function Blow(Hit)
  442.     if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
  443.         return
  444.     end
  445.     local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")
  446.     if not RightArm then
  447.         return
  448.     end
  449.     local RightGrip = RightArm:FindFirstChild("RightGrip")
  450.     if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
  451.         return
  452.     end
  453.     local character = Hit.Parent
  454.     if character == Character then
  455.         return
  456.     end
  457.     local humanoid = character:FindFirstChildOfClass("Humanoid")
  458.     if not humanoid or humanoid.Health == 0 then
  459.         return
  460.     end
  461.     local player = Players:GetPlayerFromCharacter(character)
  462.     if player and (player == Player or IsTeamMate(Player, player)) then
  463.         return
  464.     end
  465.     UntagHumanoid(humanoid)
  466.     TagHumanoid(humanoid, Player)
  467.     humanoid:TakeDamage(Damage)
  468. end
  469.  
  470.  
  471. function Attack()
  472.     Damage = DamageValues.SlashDamage
  473.     Sounds.Slash:Play()
  474.  
  475.     if Humanoid then
  476.         if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  477.             local Anim = Instance.new("StringValue")
  478.             Anim.Name = "toolanim"
  479.             Anim.Value = "Slash"
  480.             Anim.Parent = Tool
  481.         elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  482.             local Anim = Tool:FindFirstChild("R15Slash")
  483.             if Anim then
  484.                 local Track = Humanoid:LoadAnimation(Anim)
  485.                 Track:Play(0)
  486.             end
  487.         end
  488.     end
  489. end
  490.  
  491. function Lunge()
  492.     Damage = DamageValues.LungeDamage
  493.  
  494.     Sounds.Lunge:Play()
  495.    
  496.     if Humanoid then
  497.         if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  498.             local Anim = Instance.new("StringValue")
  499.             Anim.Name = "toolanim"
  500.             Anim.Value = "Lunge"
  501.             Anim.Parent = Tool
  502.         elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  503.             local Anim = Tool:FindFirstChild("R15Lunge")
  504.             if Anim then
  505.                 local Track = Humanoid:LoadAnimation(Anim)
  506.                 Track:Play(0)
  507.             end
  508.         end
  509.     end
  510.     --[[
  511.     if CheckIfAlive() then
  512.         local Force = Instance.new("BodyVelocity")
  513.         Force.velocity = Vector3.new(0, 10, 0)
  514.         Force.maxForce = Vector3.new(0, 4000, 0)
  515.         Debris:AddItem(Force, 0.4)
  516.         Force.Parent = Torso
  517.     end
  518.     ]]
  519.    
  520.     wait(0.2)
  521.     Tool.Grip = Grips.Out
  522.     wait(0.6)
  523.     Tool.Grip = Grips.Up
  524.  
  525.     Damage = DamageValues.SlashDamage
  526. end
  527.  
  528. Tool.Enabled = true
  529. LastAttack = 0
  530.  
  531. function Activated()
  532.     if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
  533.         return
  534.     end
  535.     Tool.Enabled = false
  536.     local Tick = RunService.Stepped:wait()
  537.     if (Tick - LastAttack < 0.2) then
  538.         Lunge()
  539.     else
  540.         Attack()
  541.     end
  542.     LastAttack = Tick
  543.     --wait(0.5)
  544.     Damage = DamageValues.BaseDamage
  545.     local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){
  546.         Name = "R15Slash",
  547.         AnimationId = BaseUrl .. Animations.R15Slash,
  548.         Parent = Tool
  549.     })
  550.    
  551.     local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){
  552.         Name = "R15Lunge",
  553.         AnimationId = BaseUrl .. Animations.R15Lunge,
  554.         Parent = Tool
  555.     })
  556.     Tool.Enabled = true
  557. end
  558.  
  559. function CheckIfAlive()
  560.     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)
  561. end
  562.  
  563. function Equipped()
  564.     Character = Tool.Parent
  565.     Player = Players:GetPlayerFromCharacter(Character)
  566.     Humanoid = Character:FindFirstChildOfClass("Humanoid")
  567.     Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart")
  568.     if not CheckIfAlive() then
  569.         return
  570.     end
  571.     ToolEquipped = true
  572.     Sounds.Unsheath:Play()
  573. end
  574.  
  575. function Unequipped()
  576.     Tool.Grip = Grips.Up
  577.     ToolEquipped = false
  578. end
  579.  
  580. Tool.Activated:Connect(Activated)
  581. Tool.Equipped:Connect(Equipped)
  582. Tool.Unequipped:Connect(Unequipped)
  583.  
  584. Connection = Handle.Touched:Connect(Blow)
  585. end))
  586. LocalScript59.Name = "MouseIcon"
  587. LocalScript59.Parent = Tool0
  588. table.insert(cors,sandbox(LocalScript59,function()
  589. --Made by Luckymaxer
  590.  
  591. Mouse_Icon = "rbxasset://textures/GunCursor.png"
  592. Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
  593.  
  594. Tool = script.Parent
  595.  
  596. Mouse = nil
  597.  
  598. function UpdateIcon()
  599.     if Mouse then
  600.         Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
  601.     end
  602. end
  603.  
  604. function OnEquipped(ToolMouse)
  605.     Mouse = ToolMouse
  606.     UpdateIcon()
  607. end
  608.  
  609. function OnChanged(Property)
  610.     if Property == "Enabled" then
  611.         UpdateIcon()
  612.     end
  613. end
  614.  
  615. Tool.Equipped:Connect(OnEquipped)
  616. Tool.Changed:Connect(OnChanged)
  617.  
  618. end))
  619. for i,v in pairs(mas:GetChildren()) do
  620.     v.Parent = workspace
  621.     pcall(function() v:MakeJoints() end)
  622. end
  623. mas:Destroy()
  624. for i,v in pairs(cors) do
  625.     spawn(function()
  626.         pcall(v)
  627.     end)
  628. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement