Advertisement
Guest User

noooooohh kyle344

a guest
Nov 24th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.64 KB | None | 0 0
  1. game.Workspace.KYLETHORNTON.Humanoid.MaxHealth = math.huge
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Part1 = Instance.new("Part")
  20. SpecialMesh2 = Instance.new("SpecialMesh")
  21. Decal3 = Instance.new("Decal")
  22. Sound4 = Instance.new("Sound")
  23. Sound5 = Instance.new("Sound")
  24. ParticleEmitter6 = Instance.new("ParticleEmitter")
  25. BoolValue7 = Instance.new("BoolValue")
  26. Animation8 = Instance.new("Animation")
  27. Animation9 = Instance.new("Animation")
  28. LocalScript10 = Instance.new("LocalScript")
  29. LocalScript11 = Instance.new("LocalScript")
  30. Script12 = Instance.new("Script")
  31. Script13 = Instance.new("Script")
  32. Animation14 = Instance.new("Animation")
  33. Part15 = Instance.new("Part")
  34. Script16 = Instance.new("Script")
  35. Animation17 = Instance.new("Animation")
  36. LocalScript18 = Instance.new("LocalScript")
  37. Script19 = Instance.new("Script")
  38. Part20 = Instance.new("Part")
  39. ParticleEmitter21 = Instance.new("ParticleEmitter")
  40. ParticleEmitter22 = Instance.new("ParticleEmitter")
  41. ParticleEmitter23 = Instance.new("ParticleEmitter")
  42. ParticleEmitter24 = Instance.new("ParticleEmitter")
  43. Part25 = Instance.new("Part")
  44. ParticleEmitter26 = Instance.new("ParticleEmitter")
  45. ParticleEmitter27 = Instance.new("ParticleEmitter")
  46. ParticleEmitter28 = Instance.new("ParticleEmitter")
  47. ParticleEmitter29 = Instance.new("ParticleEmitter")
  48. Tool0.Name = "Mythic Kyle's BanHammer V1.2"
  49. Tool0.Parent = mas
  50. Tool0.TextureId = "rbxassetid://1197849501"
  51. Tool0.GripPos = Vector3.new(0, -1, 0)
  52. Tool0.CanBeDropped = false
  53. Part1.Name = "Handle"
  54. Part1.Parent = Tool0
  55. Part1.Rotation = Vector3.new(87.8300018, -47.3499985, 90.0199966)
  56. Part1.CanCollide = false
  57. Part1.Locked = true
  58. Part1.Size = Vector3.new(1, 6, 1)
  59. Part1.CFrame = CFrame.new(-25.69804, 2.56255507, -18.7025127, -0.000203687698, -0.677491486, -0.735530555, 0.0381333232, 0.734990358, -0.677004457, 0.999272704, -0.0281861257, 0.0256852917)
  60. Part1.Position = Vector3.new(-25.69804, 2.56255507, -18.7025127)
  61. Part1.Orientation = Vector3.new(42.6100006, -88, 2.97000003)
  62. SpecialMesh2.Parent = Part1
  63. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=10604848"
  64. SpecialMesh2.Scale = Vector3.new(0.5, 0.5, 0.5)
  65. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=10605252"
  66. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  67. SpecialMesh2.Scale = Vector3.new(0.5, 0.5, 0.5)
  68. Decal3.Parent = Part1
  69. Decal3.Texture = "http://www.roblox.com/asset/?id=10605252"
  70. Decal3.Face = Enum.NormalId.Back
  71. Sound4.Name = "Homerun"
  72. Sound4.Parent = Part1
  73. Sound4.SoundId = "http://www.roblox.com/asset/?id=21343225"
  74. Sound4.Volume = 0
  75. Sound5.Name = "Whack"
  76. Sound5.Parent = Part1
  77. Sound5.SoundId = "http://www.roblox.com/asset/?id=10730819"
  78. Sound5.Volume = 1
  79. ParticleEmitter6.Name = "small"
  80. ParticleEmitter6.Parent = Part1
  81. ParticleEmitter6.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  82. ParticleEmitter6.Size = NumberSequence.new(0.0099999997764826,0.0099999997764826)
  83. ParticleEmitter6.LightEmission = 0.30000001192093
  84. ParticleEmitter6.Texture = "rbxassetid://243740013"
  85. ParticleEmitter6.ZOffset = 4
  86. ParticleEmitter6.Lifetime = NumberRange.new(2, 2)
  87. ParticleEmitter6.Rate = 45
  88. ParticleEmitter6.RotSpeed = NumberRange.new(-100, 100)
  89. ParticleEmitter6.Speed = NumberRange.new(0.5, 0.5)
  90. ParticleEmitter6.VelocitySpread = 15
  91. BoolValue7.Name = "MouseClick"
  92. BoolValue7.Parent = Tool0
  93. Animation8.Name = "TwoHandAnim"
  94. Animation8.Parent = Tool0
  95. Animation8.AnimationId = "http://www.roblox.com/Asset?ID=48138189"
  96. Animation9.Name = "Whack"
  97. Animation9.Parent = Tool0
  98. Animation9.AnimationId = "http://www.roblox.com/Asset?ID=32659706"
  99. LocalScript10.Name = "_CamShake"
  100. LocalScript10.Parent = Tool0
  101. LocalScript10.Disabled = true
  102. table.insert(cors,sandbox(LocalScript10,function()
  103. local cam = game.Workspace.CurrentCamera
  104. for i = 1, 5 do
  105. wait()
  106. local cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p --* CFrame.fromEulerAnglesXYZ(math.random(-10, 10)/10, math.random(-10, 10)/10, 0)
  107. local cam_scroll = (cam.CoordinateFrame.p - cam.Focus.p).magnitude
  108. local ncf = CFrame.new(cam.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(math.random(-10, 10)/40, math.random(-10, 10)/40, 0)
  109. cam.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll)
  110. end
  111. script:remove()
  112.  
  113. end))
  114. LocalScript11.Name = "_EVT"
  115. LocalScript11.Parent = Tool0
  116. table.insert(cors,sandbox(LocalScript11,function()
  117. script.Parent.Equipped:connect(function(mouse)
  118. mouse.Button1Down:connect(function()
  119. script.Parent.MouseClick.Value = not script.Parent.MouseClick.Value
  120. end)
  121. end)
  122. end))
  123. Script12.Name = "_SoundDetection"
  124. Script12.Parent = Tool0
  125. table.insert(cors,sandbox(Script12,function()
  126. hammer = script.Parent.Handle
  127. local HomerunSound = Instance.new("Sound")
  128. HomerunSound.SoundId = "http://www.roblox.com/asset/?id=21343225"
  129. HomerunSound.Parent = hammer
  130. HomerunSound.Volume = 0.5
  131. HomerunSound.Name = "Homerun"
  132. local WhackSound = Instance.new("Sound")
  133. WhackSound.SoundId = "http://www.roblox.com/asset/?id=10730819"
  134. WhackSound.Parent = hammer
  135. WhackSound.Volume = 1
  136. WhackSound.Name = "Whack"
  137. hammer.ChildAdded:connect(function(Child)
  138. wait()
  139. if Child.className == "StringValue" then
  140. if Child.Name == "HomerunSound" then
  141. HomerunSound:Play()
  142. elseif Child.Name == "WhackSound" then
  143. WhackSound:Play()
  144. end
  145. Child:Remove()
  146. end
  147. end)
  148.  
  149. end))
  150. Script13.Name = "qPerfectionWeld"
  151. Script13.Parent = Tool0
  152. table.insert(cors,sandbox(Script13,function()
  153. -- Created by Quenty (@Quenty, follow me on twitter).
  154. -- Should work with only ONE copy, seamlessly with weapons, trains, et cetera.
  155. -- Parts should be ANCHORED before use. It will, however, store relatives values and so when tools are reparented, it'll fix them.
  156.  
  157. --[[ INSTRUCTIONS
  158. - Place in the model
  159. - Make sure model is anchored
  160. - That's it. It will weld the model and all children.
  161.  
  162. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  163. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  164. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  165. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  166. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  167. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  168. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  169. THIS SCRIPT SHOULD BE USED ONLY BY ITSELF. THE MODEL SHOULD BE ANCHORED.
  170.  
  171. This script is designed to be used is a regular script. In a local script it will weld, but it will not attempt to handle ancestory changes.
  172. ]]
  173.  
  174. --[[ DOCUMENTATION
  175. - Will work in tools. If ran more than once it will not create more than one weld. This is especially useful for tools that are dropped and then picked up again.
  176. - Will work in PBS servers
  177. - Will work as long as it starts out with the part anchored
  178. - Stores the relative CFrame as a CFrame value
  179. - Takes careful measure to reduce lag by not having a joint set off or affected by the parts offset from origin
  180. - Utilizes a recursive algorith to find all parts in the model
  181. - Will reweld on script reparent if the script is initially parented to a tool.
  182. - Welds as fast as possible
  183. ]]
  184.  
  185. -- qPerfectionWeld.lua
  186. -- Created 10/6/2014
  187. -- Author: Quenty
  188. -- Version 1.0.3
  189.  
  190. -- Updated 10/14/2014 - Updated to 1.0.1
  191. --- Bug fix with existing ROBLOX welds ? Repro by asimo3089
  192.  
  193. -- Updated 10/14/2014 - Updated to 1.0.2
  194. --- Fixed bug fix.
  195.  
  196. -- Updated 10/14/2014 - Updated to 1.0.3
  197. --- Now handles joints semi-acceptably. May be rather hacky with some joints. :/
  198.  
  199. 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).
  200.  
  201.  
  202. local function CallOnChildren(Instance, FunctionToCall)
  203. -- Calls a function on each of the children of a certain object, using recursion.
  204.  
  205. FunctionToCall(Instance)
  206.  
  207. for _, Child in next, Instance:GetChildren() do
  208. CallOnChildren(Child, FunctionToCall)
  209. end
  210. end
  211.  
  212. local function GetNearestParent(Instance, ClassName)
  213. -- Returns the nearest parent of a certain class, or returns nil
  214.  
  215. local Ancestor = Instance
  216. repeat
  217. Ancestor = Ancestor.Parent
  218. if Ancestor == nil then
  219. return nil
  220. end
  221. until Ancestor:IsA(ClassName)
  222.  
  223. return Ancestor
  224. end
  225.  
  226. local function GetBricks(StartInstance)
  227. local List = {}
  228.  
  229. -- if StartInstance:IsA("BasePart") then
  230. -- List[#List+1] = StartInstance
  231. -- end
  232.  
  233. CallOnChildren(StartInstance, function(Item)
  234. if Item:IsA("BasePart") then
  235. List[#List+1] = Item;
  236. end
  237. end)
  238.  
  239. return List
  240. end
  241.  
  242. local function Modify(Instance, Values)
  243. -- Modifies an Instance by using a table.
  244.  
  245. assert(type(Values) == "table", "Values is not a table");
  246.  
  247. for Index, Value in next, Values do
  248. if type(Index) == "number" then
  249. Value.Parent = Instance
  250. else
  251. Instance[Index] = Value
  252. end
  253. end
  254. return Instance
  255. end
  256.  
  257. local function Make(ClassType, Properties)
  258. -- Using a syntax hack to create a nice way to Make new items.
  259.  
  260. return Modify(Instance.new(ClassType), Properties)
  261. end
  262.  
  263. local Surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  264. local HingSurfaces = {"Hinge", "Motor", "SteppingMotor"}
  265.  
  266. local function HasWheelJoint(Part)
  267. for _, SurfaceName in pairs(Surfaces) do
  268. for _, HingSurfaceName in pairs(HingSurfaces) do
  269. if Part[SurfaceName].Name == HingSurfaceName then
  270. return true
  271. end
  272. end
  273. end
  274.  
  275. return false
  276. end
  277.  
  278. local function ShouldBreakJoints(Part)
  279. --- We do not want to break joints of wheels/hinges. This takes the utmost care to not do this. There are
  280. -- definitely some edge cases.
  281.  
  282. if NEVER_BREAK_JOINTS then
  283. return false
  284. end
  285.  
  286. if HasWheelJoint(Part) then
  287. return false
  288. end
  289.  
  290. local Connected = Part:GetConnectedParts()
  291.  
  292. if #Connected == 1 then
  293. return false
  294. end
  295.  
  296. for _, Item in pairs(Connected) do
  297. if HasWheelJoint(Item) then
  298. return false
  299. elseif not Item:IsDescendantOf(script.Parent) then
  300. return false
  301. end
  302. end
  303.  
  304. return true
  305. end
  306.  
  307. local function WeldTogether(Part0, Part1, JointType, WeldParent)
  308. --- Weld's 2 parts together
  309. -- @param Part0 The first part
  310. -- @param Part1 The second part (Dependent part most of the time).
  311. -- @param [JointType] The type of joint. Defaults to weld.
  312. -- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
  313. -- @return The weld created.
  314.  
  315. JointType = JointType or "Weld"
  316. local RelativeValue = Part1:FindFirstChild("qRelativeCFrameWeldValue")
  317.  
  318. local NewWeld = Part1:FindFirstChild("qCFrameWeldThingy") or Instance.new(JointType)
  319. Modify(NewWeld, {
  320. Name = "qCFrameWeldThingy";
  321. Part0 = Part0;
  322. Part1 = Part1;
  323. C0 = CFrame.new();--Part0.CFrame:inverse();
  324. C1 = RelativeValue and RelativeValue.Value or Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
  325. Parent = Part1;
  326. })
  327.  
  328. if not RelativeValue then
  329. RelativeValue = Make("CFrameValue", {
  330. Parent = Part1;
  331. Name = "qRelativeCFrameWeldValue";
  332. Archivable = true;
  333. Value = NewWeld.C1;
  334. })
  335. end
  336.  
  337. return NewWeld
  338. end
  339.  
  340. local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
  341. -- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
  342. -- @param MainPart The part to weld the model to (can be in the model).
  343. -- @param [JointType] The type of joint. Defaults to weld.
  344. -- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.
  345.  
  346. for _, Part in pairs(Parts) do
  347. if ShouldBreakJoints(Part) then
  348. Part:BreakJoints()
  349. end
  350. end
  351.  
  352. for _, Part in pairs(Parts) do
  353. if Part ~= MainPart then
  354. WeldTogether(MainPart, Part, JointType, MainPart)
  355. end
  356. end
  357.  
  358. if not DoNotUnanchor then
  359. for _, Part in pairs(Parts) do
  360. Part.Anchored = false
  361. end
  362. MainPart.Anchored = false
  363. end
  364. end
  365.  
  366. local function PerfectionWeld()
  367. local Tool = GetNearestParent(script, "Tool")
  368.  
  369. local Parts = GetBricks(script.Parent)
  370. 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]
  371.  
  372. if PrimaryPart then
  373. WeldParts(Parts, PrimaryPart, "Weld", false)
  374. else
  375. warn("qWeld - Unable to weld part")
  376. end
  377.  
  378. return Tool
  379. end
  380.  
  381. local Tool = PerfectionWeld()
  382.  
  383.  
  384. if Tool and script.ClassName == "Script" then
  385. --- Don't bother with local scripts
  386.  
  387. script.Parent.AncestryChanged:connect(function()
  388. PerfectionWeld()
  389. end)
  390. end
  391.  
  392. -- Created by Quenty (@Quenty, follow me on twitter).
  393.  
  394. end))
  395. Animation14.Name = "HomeRun"
  396. Animation14.Parent = Tool0
  397. Animation14.AnimationId = "rbxassetid://54673790"
  398. Part15.Name = "ban part"
  399. Part15.Parent = Tool0
  400. Part15.BrickColor = BrickColor.new("Dark stone grey")
  401. Part15.Transparency = 1
  402. Part15.Rotation = Vector3.new(87.8199997, -47.3499985, 90.0099945)
  403. Part15.CanCollide = false
  404. Part15.FormFactor = Enum.FormFactor.Plate
  405. Part15.Size = Vector3.new(1.04999948, 1.04999983, 2.76999855)
  406. Part15.CFrame = CFrame.new(-26.8986168, 3.86395788, -18.771122, -9.28728914e-05, -0.677499533, -0.735523343, 0.0380967073, 0.734986424, -0.677010179, 0.999273837, -0.0280841347, 0.0257421304)
  407. Part15.BottomSurface = Enum.SurfaceType.Smooth
  408. Part15.TopSurface = Enum.SurfaceType.Smooth
  409. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  410. Part15.Position = Vector3.new(-26.8986168, 3.86395788, -18.771122)
  411. Part15.Orientation = Vector3.new(42.6100006, -88, 2.97000003)
  412. Part15.Color = Color3.new(0.388235, 0.372549, 0.384314)
  413. Script16.Parent = Part15
  414. table.insert(cors,sandbox(Script16,function()
  415. function blow(hit)
  416. local humanoid = hit.Parent:findFirstChild("Humanoid")
  417.  
  418. if humanoid~=nil then
  419. humanoid:TakeDamage(2e9)
  420. end
  421. end
  422.  
  423.  
  424.  
  425. connection = script.Parent.Touched:connect(blow)
  426.  
  427. end))
  428. Animation17.Name = "Equip"
  429. Animation17.Parent = Tool0
  430. Animation17.AnimationId = "rbxassetid://1197753953"
  431. LocalScript18.Name = "_Main"
  432. LocalScript18.Parent = Tool0
  433. table.insert(cors,sandbox(LocalScript18,function()
  434. --Credits: xLEGOx for the first creation of the hammer, Luckymaxer for fixing it, BLOX31 for the ideas and animation, gkku for visual design, sounds, and various fixes
  435. --player
  436. player = nil
  437. --selected
  438. selected = false
  439. homerunning = false
  440. whacking = false
  441. --save shoulders
  442. RSH, LSH = nil, nil
  443. anim = "none"
  444. --grip
  445. --welds
  446. --what anim
  447. local Equip
  448. local TwoHandAnim
  449. local HomeRunner
  450. local Whacker
  451. --create the dustcloud object
  452. --set variables
  453. hammer = script.Parent.Handle
  454. --[[local msh = Instance.new("SpecialMesh")
  455. msh.MeshId = "http://www.roblox.com/asset/?id=1095708"
  456. msh.MeshType = 5
  457. msh.Parent = prt]]
  458.  
  459. ----- show version ----------
  460. script.Parent.Name = "BanHammer V1.1"
  461. ---------------------------------
  462.  
  463. function GetFigures(Parent, Part)
  464. for i, v in pairs(Parent:GetChildren()) do
  465. GetFigures(v, Part)
  466. if v.className == "Humanoid" then
  467. if v == script.Parent.Parent:findFirstChild("Humanoid") == false then
  468. if v.Parent:findFirstChild("Torso") then
  469. if v.Parent:findFirstChild("Torso"):IsA("BasePart") then
  470. if v.Parent:findFirstChild("Torso").Position.x < Part.Position.x + Part.Size.x / 2
  471. and v.Parent:findFirstChild("Torso").Position.x > Part.Position.x - Part.Size.x / 2
  472. and v.Parent:findFirstChild("Torso").Position.y < Part.Position.y + Part.Size.y / 2
  473. and v.Parent:findFirstChild("Torso").Position.y > Part.Position.y - Part.Size.y / 2
  474. and v.Parent:findFirstChild("Torso").Position.z < Part.Position.z + Part.Size.z / 2
  475. and v.Parent:findFirstChild("Torso").Position.z > Part.Position.z - Part.Size.z / 2 then
  476. v.Sit = true
  477. end
  478. if (Part.Position - v.Parent:findFirstChild("Torso").Position).magnitude < 10 then
  479. v.Sit = true
  480. end
  481. end
  482. end
  483. end
  484. end
  485. end
  486. end
  487. function Raycast(Pos, Dir, Max, Ignore)
  488. return game:GetService("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  489. end
  490. function WaitForChild(obj, ch_n)
  491. local t = time()
  492. while not obj:FindFirstChild(ch_n) and time() - t < 10 do wait(0.1) end
  493. return obj:FindFirstChild(ch_n)
  494. end
  495.  
  496. --onselected, save shoulders and get player
  497. script.Parent.Equipped:connect(function()
  498. Equip = script.Parent.Parent:findFirstChild("Humanoid"):LoadAnimation(script.Parent.Equip)
  499. TwoHandAnim = script.Parent.Parent:findFirstChild("Humanoid"):LoadAnimation(script.Parent.TwoHandAnim)
  500. HomeRunner = script.Parent.Parent:findFirstChild("Humanoid"):LoadAnimation(script.Parent.HomeRun)
  501. Whacker = script.Parent.Parent:findFirstChild("Humanoid"):LoadAnimation(script.Parent.Whack)
  502. repeat wait() until TwoHandAnim ~= nil and HomeRunner ~= nil and Whacker ~= nil
  503. if selected then return end
  504. selected = true
  505. Equip:Play()
  506. wait(5)
  507. TwoHandAnim:Play()
  508. end)
  509.  
  510. --griptcf = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-math.pi/2+0.5, 0, 0)
  511.  
  512. script.Parent.Unequipped:connect(function()
  513. selected = false
  514. if TwoHandAnim ~= nil then
  515. TwoHandAnim:Stop()
  516. end
  517. if HomeRunner ~= nil then
  518. HomeRunner:Stop()
  519. end
  520. if Whacker ~= nil then
  521. Whacker:Stop()
  522. end
  523. if Equip ~= nil then
  524. Equip:Stop()
  525. end
  526. wait(4.384)
  527. if TwoHandAnim ~= nil then
  528. TwoHandAnim:Stop()
  529. end
  530. end)
  531.  
  532. function HomeRunHit(part)
  533. if part == nil then return end
  534. if part.Parent == nil then return end
  535. local h = (part.Parent or game):FindFirstChild("Humanoid") --or findfirstchild optimization
  536. if h then
  537. if h == script.Parent.Parent:findFirstChild("Humanoid") == false then
  538. --game.SoundService.Bomb:Play()
  539. -- hammer.Homerun:Play()
  540. hrs = Instance.new("StringValue")
  541. hrs.Name = "HomerunSound"
  542. hrs.Parent = hammer
  543. h.Sit = true
  544. h.Parent.Torso.Velocity = (CFrame.new(hammer.Position, h.Parent.Torso.Position).lookVector * 200) + Vector3.new(0, 100, 0)
  545. h.Parent.Torso.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  546. end
  547. end
  548. end
  549.  
  550. function HomeRun()
  551. if homerunning == false then
  552. homerunning = true
  553. anim = "homerun"
  554. TwoHandAnim:Stop()
  555. HomeRunner:Play()
  556. --start HomeRunhit connection--
  557. local con = hammer.Touched:connect(HomeRunHit)
  558. ----------------------------------------
  559. wait(.6)
  560. HomeRunner:Stop()
  561. if selected == true then
  562. TwoHandAnim:Play()
  563. end
  564. ----end HomeRun connection---
  565. con:disconnect()
  566. -- wait(0.15)
  567. homerunning = false
  568. end
  569. end
  570. function Whack()
  571. if homerunning == false then
  572. anim = "norm"
  573. TwoHandAnim:Stop()
  574. Whacker:Play()
  575. -- hammer.Whack:Play()
  576. --insert camshake and hit nearby people
  577. for _, p in pairs(game.Players:GetChildren()) do
  578. if p.Character == script.Parent.Parent == false then
  579. if p.Character:FindFirstChild("Torso") then
  580. if (p.Character.Torso.Position - (hammer.CFrame*CFrame.new(0, 3, 0)).p).magnitude < 15 then
  581. local s = script.Parent._CamShake:clone()
  582. s.Disabled = false
  583. s.Parent = p.Backpack
  584. if p ~= player then
  585. -- p.Character.Humanoid.Sit = true
  586. -- delay(0.1, function() p.Character.Humanoid.Jump = true end)
  587. p.Character.Torso.RotVelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  588. end
  589. end
  590. end
  591. end
  592. end
  593. --add dust cloud
  594. delay(0.25, function()
  595. if anim == "norm" then
  596. if selected == true then
  597. whacking = true
  598. p=Instance.new("Part")
  599. p.CanCollide = false
  600. p.Transparency = 1
  601. p.Parent = script.Parent.Parent
  602. p.formFactor = "Custom"
  603. p.Size = Vector3.new(0.2, 0.2, 0.2)
  604. p.Anchored = true
  605. p.CFrame = hammer.CFrame - Vector3.new(0, script.Parent.Parent:findFirstChild("Torso").Size.y/2, 0) + script.Parent.Parent:findFirstChild("Torso").CFrame.lookVector * ((hammer.Size.y / 2) - p.Size.z)
  606. p.CFrame = CFrame.new(p.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
  607. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(-math.pi/2, 0, -math.pi/2)
  608. Hit, Pos = Raycast(p.Position, p.CFrame.lookVector, 4, script.Parent.Parent)
  609. if Hit ~= nil then
  610. if homerunning == false then
  611. delay(0.35, function()
  612. w = Instance.new("StringValue")
  613. w.Name = "WhackSound"
  614. w.Parent = hammer
  615. end)
  616. local pt = prt:clone()
  617. pt.Parent = script.Parent.Parent
  618. pt.CFrame = CFrame.new(hammer.CFrame.x, Pos.y + 0.75, hammer.CFrame.z) + script.Parent.Parent:findFirstChild("Torso").CFrame.lookVector * 1.75
  619. GetFigures(pt.Parent.Parent, pt)
  620. game.Debris:addItem(pt, 1.3)
  621. end
  622. end
  623. p:Remove()
  624. end
  625. end
  626. end)
  627. wait(0.75)
  628. Whacker:Stop()
  629. whacking = false
  630. ------
  631. if selected == true then
  632. TwoHandAnim:Play()
  633. end
  634. end
  635. end
  636. local a = false
  637. local co = nil
  638. --OMGHAX mouseclick
  639. local last_click = 0
  640. script.Parent.MouseClick.Changed:connect(function()
  641. if homerunning == false and whacking == false then
  642. if time() - last_click < 0.3 then
  643. anim = "homerun"
  644. last_click = time()
  645. HomeRun()
  646. else
  647. anim = "norm"
  648. last_click = time()
  649. Whack()
  650. end
  651. end
  652. end)
  653. end))
  654. Script19.Name = "Meme_SoundDetection"
  655. Script19.Parent = Tool0
  656. table.insert(cors,sandbox(Script19,function()
  657. --rbxsig%SvOCRfs4MS09DiFeZ9ryb0KVTZKM2pYFaz18031HaaiHrZnjsJ+iWsDsSxTs3c1kYMSB0HlSbgzhXXww3xOBUhW0xm1/5mi4O0KnHYGSc4eBTonK6ryFiCwTrBSmrG59TVp2eG6uctncdw9z3Eo/RyJSCFHXct6N9imKE9Qsdco=%
  658. --rbxassetid%1014475%
  659. -------- OMG HAX
  660.  
  661. r = game:service("RunService")
  662.  
  663.  
  664. local damage = 5
  665.  
  666.  
  667. local slash_damage = 10
  668. local lunge_damage = 30
  669.  
  670. sword = script.Parent.Handle
  671. Tool = script.Parent
  672.  
  673. local UnsheathSound = Instance.new("Sound")
  674. UnsheathSound.SoundId = "rbxassetid://1183744582"
  675. UnsheathSound.Parent = sword
  676. UnsheathSound.Volume = 1
  677.  
  678.  
  679. function blow(hit)
  680. if (hit.Parent == nil) then return end -- happens when bullet hits sword
  681.  
  682. local humanoid = hit.Parent:findFirstChild("Humanoid")
  683. local vCharacter = Tool.Parent
  684. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  685. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  686. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  687. -- final check, make sure sword is in-hand
  688.  
  689. local right_arm = vCharacter:FindFirstChild("Right Arm")
  690. if (right_arm ~= nil) then
  691. local joint = right_arm:FindFirstChild("RightGrip")
  692. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  693. tagHumanoid(humanoid, vPlayer)
  694. humanoid:TakeDamage(damage)
  695. wait(1)
  696. untagHumanoid(humanoid)
  697. end
  698. end
  699.  
  700.  
  701. end
  702. end
  703.  
  704.  
  705. function tagHumanoid(humanoid, player)
  706. local creator_tag = Instance.new("ObjectValue")
  707. creator_tag.Value = player
  708. creator_tag.Name = "creator"
  709. creator_tag.Parent = humanoid
  710. end
  711.  
  712. function untagHumanoid(humanoid)
  713. if humanoid ~= nil then
  714. local tag = humanoid:findFirstChild("creator")
  715. if tag ~= nil then
  716. tag.Parent = nil
  717. end
  718. end
  719. end
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726. Tool.Enabled = true
  727. local last_attack = 0
  728. function onActivated()
  729.  
  730. if not Tool.Enabled then
  731. return
  732. end
  733.  
  734. Tool.Enabled = false
  735.  
  736. local character = Tool.Parent;
  737. local humanoid = character.Humanoid
  738. if humanoid == nil then
  739. print("Humanoid not found")
  740. return
  741. end
  742.  
  743. t = r.Stepped:wait()
  744.  
  745. if (t - last_attack < .2) then
  746. lunge()
  747. else
  748. attack()
  749. end
  750.  
  751. last_attack = t
  752.  
  753. --wait(.5)
  754.  
  755. Tool.Enabled = true
  756. end
  757.  
  758.  
  759. function onEquipped()
  760. UnsheathSound:play()
  761. end
  762.  
  763.  
  764. script.Parent.Activated:connect(onActivated)
  765. script.Parent.Equipped:connect(onEquipped)
  766.  
  767.  
  768.  
  769. end))
  770. Part20.Parent = Tool0
  771. Part20.Material = Enum.Material.Wood
  772. Part20.BrickColor = BrickColor.new("Burnt Sienna")
  773. Part20.Transparency = 1
  774. Part20.Rotation = Vector3.new(-2.18000007, -0.00999999978, -138.339996)
  775. Part20.CanCollide = false
  776. Part20.Size = Vector3.new(3.29998875, 1.11000013, 0.98999995)
  777. Part20.CFrame = CFrame.new(-27.2719517, 4.29400492, -18.8238487, -0.747118235, 0.664681733, -0.000153294735, -0.664209187, -0.746573806, 0.0380966738, 0.0252084155, 0.0285637975, 0.999272883)
  778. Part20.Color = Color3.new(0.415686, 0.223529, 0.0352941)
  779. Part20.Position = Vector3.new(-27.2719517, 4.29400492, -18.8238487)
  780. Part20.Orientation = Vector3.new(-2.18000007, -0.00999999978, -138.339996)
  781. Part20.Color = Color3.new(0.415686, 0.223529, 0.0352941)
  782. ParticleEmitter21.Name = "small"
  783. ParticleEmitter21.Parent = Part20
  784. ParticleEmitter21.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  785. ParticleEmitter21.Size = NumberSequence.new(0.0099999997764826,0.0099999997764826)
  786. ParticleEmitter21.LightEmission = 0.30000001192093
  787. ParticleEmitter21.Texture = "rbxassetid://243740013"
  788. ParticleEmitter21.ZOffset = 4
  789. ParticleEmitter21.Lifetime = NumberRange.new(2, 2)
  790. ParticleEmitter21.Rate = 45
  791. ParticleEmitter21.RotSpeed = NumberRange.new(-100, 100)
  792. ParticleEmitter21.Speed = NumberRange.new(0.5, 0.5)
  793. ParticleEmitter21.VelocitySpread = 15
  794. ParticleEmitter22.Name = "aura3"
  795. ParticleEmitter22.Parent = Part20
  796. ParticleEmitter22.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  797. ParticleEmitter22.Size = NumberSequence.new(0.89999997615814,0.89999997615814)
  798. ParticleEmitter22.LightEmission = 0.30000001192093
  799. ParticleEmitter22.Texture = "rbxassetid://833874434"
  800. ParticleEmitter22.ZOffset = -1
  801. ParticleEmitter22.Lifetime = NumberRange.new(2, 2)
  802. ParticleEmitter22.Rate = 50
  803. ParticleEmitter22.RotSpeed = NumberRange.new(-100, 100)
  804. ParticleEmitter22.Speed = NumberRange.new(0.5, 0.5)
  805. ParticleEmitter22.VelocitySpread = 15
  806. ParticleEmitter23.Name = "aura2"
  807. ParticleEmitter23.Parent = Part20
  808. ParticleEmitter23.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  809. ParticleEmitter23.Size = NumberSequence.new(0.94999998807907,0.94999998807907)
  810. ParticleEmitter23.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1))
  811. ParticleEmitter23.LightEmission = 0.30000001192093
  812. ParticleEmitter23.Texture = "rbxassetid://833874434"
  813. ParticleEmitter23.ZOffset = -3
  814. ParticleEmitter23.Lifetime = NumberRange.new(2, 2)
  815. ParticleEmitter23.Rate = 50
  816. ParticleEmitter23.RotSpeed = NumberRange.new(-100, 100)
  817. ParticleEmitter23.Speed = NumberRange.new(0.5, 0.5)
  818. ParticleEmitter23.VelocitySpread = 15
  819. ParticleEmitter23.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1))
  820. ParticleEmitter24.Name = "aura"
  821. ParticleEmitter24.Parent = Part20
  822. ParticleEmitter24.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  823. ParticleEmitter24.Color = ColorSequence.new(Color3.new(0, 0.666667, 1),Color3.new(0, 0.666667, 1))
  824. ParticleEmitter24.LightEmission = 0.30000001192093
  825. ParticleEmitter24.Texture = "rbxassetid://833874434"
  826. ParticleEmitter24.ZOffset = -2
  827. ParticleEmitter24.Lifetime = NumberRange.new(2, 2)
  828. ParticleEmitter24.Rate = 50
  829. ParticleEmitter24.RotSpeed = NumberRange.new(-100, 100)
  830. ParticleEmitter24.Speed = NumberRange.new(0.5, 0.5)
  831. ParticleEmitter24.VelocitySpread = 15
  832. ParticleEmitter24.Color = ColorSequence.new(Color3.new(0, 0.666667, 1),Color3.new(0, 0.666667, 1))
  833. Part25.Parent = Tool0
  834. Part25.Material = Enum.Material.Wood
  835. Part25.BrickColor = BrickColor.new("Burnt Sienna")
  836. Part25.Transparency = 1
  837. Part25.Rotation = Vector3.new(-2.19000006, -0.00999999978, -47.3499985)
  838. Part25.CanCollide = false
  839. Part25.Size = Vector3.new(3.85999012, 0.0700000003, 1.20999968)
  840. Part25.CFrame = CFrame.new(-26.1151047, 2.37776899, -18.6405067, 0.677490175, 0.735527515, -0.000203502947, -0.734988153, 0.677005947, 0.0381324738, 0.0281848814, -0.0256851483, 0.999272048)
  841. Part25.Color = Color3.new(0.415686, 0.223529, 0.0352941)
  842. Part25.Position = Vector3.new(-26.1151047, 2.37776899, -18.6405067)
  843. Part25.Orientation = Vector3.new(-2.19000006, -0.00999999978, -47.3499985)
  844. Part25.Color = Color3.new(0.415686, 0.223529, 0.0352941)
  845. ParticleEmitter26.Name = "small"
  846. ParticleEmitter26.Parent = Part25
  847. ParticleEmitter26.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  848. ParticleEmitter26.Size = NumberSequence.new(0.0099999997764826,0.0099999997764826)
  849. ParticleEmitter26.LightEmission = 0.30000001192093
  850. ParticleEmitter26.Texture = "rbxassetid://243740013"
  851. ParticleEmitter26.ZOffset = 4
  852. ParticleEmitter26.Lifetime = NumberRange.new(2, 2)
  853. ParticleEmitter26.Rate = 45
  854. ParticleEmitter26.RotSpeed = NumberRange.new(-100, 100)
  855. ParticleEmitter26.Speed = NumberRange.new(0.5, 0.5)
  856. ParticleEmitter26.VelocitySpread = 15
  857. ParticleEmitter27.Name = "aura3"
  858. ParticleEmitter27.Parent = Part25
  859. ParticleEmitter27.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  860. ParticleEmitter27.Size = NumberSequence.new(0.89999997615814,0.89999997615814)
  861. ParticleEmitter27.LightEmission = 0.30000001192093
  862. ParticleEmitter27.Texture = "rbxassetid://833874434"
  863. ParticleEmitter27.ZOffset = -1
  864. ParticleEmitter27.Lifetime = NumberRange.new(2, 2)
  865. ParticleEmitter27.Rate = 50
  866. ParticleEmitter27.RotSpeed = NumberRange.new(-100, 100)
  867. ParticleEmitter27.Speed = NumberRange.new(0.5, 0.5)
  868. ParticleEmitter27.VelocitySpread = 15
  869. ParticleEmitter28.Name = "aura2"
  870. ParticleEmitter28.Parent = Part25
  871. ParticleEmitter28.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  872. ParticleEmitter28.Size = NumberSequence.new(0.94999998807907,0.94999998807907)
  873. ParticleEmitter28.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1))
  874. ParticleEmitter28.LightEmission = 0.30000001192093
  875. ParticleEmitter28.Texture = "rbxassetid://833874434"
  876. ParticleEmitter28.ZOffset = -3
  877. ParticleEmitter28.Lifetime = NumberRange.new(2, 2)
  878. ParticleEmitter28.Rate = 50
  879. ParticleEmitter28.RotSpeed = NumberRange.new(-100, 100)
  880. ParticleEmitter28.Speed = NumberRange.new(0.5, 0.5)
  881. ParticleEmitter28.VelocitySpread = 15
  882. ParticleEmitter28.Color = ColorSequence.new(Color3.new(0.333333, 0, 1),Color3.new(0.333333, 0, 1))
  883. ParticleEmitter29.Name = "aura"
  884. ParticleEmitter29.Parent = Part25
  885. ParticleEmitter29.Transparency = NumberSequence.new(1,0.70491802692413,0.7322404384613,1)
  886. ParticleEmitter29.Color = ColorSequence.new(Color3.new(0, 0.666667, 1),Color3.new(0, 0.666667, 1))
  887. ParticleEmitter29.LightEmission = 0.30000001192093
  888. ParticleEmitter29.Texture = "rbxassetid://833874434"
  889. ParticleEmitter29.ZOffset = -2
  890. ParticleEmitter29.Lifetime = NumberRange.new(2, 2)
  891. ParticleEmitter29.Rate = 50
  892. ParticleEmitter29.RotSpeed = NumberRange.new(-100, 100)
  893. ParticleEmitter29.Speed = NumberRange.new(0.5, 0.5)
  894. ParticleEmitter29.VelocitySpread = 15
  895. ParticleEmitter29.Color = ColorSequence.new(Color3.new(0, 0.666667, 1),Color3.new(0, 0.666667, 1))
  896. for i,v in pairs(mas:GetChildren()) do
  897. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  898. pcall(function() v:MakeJoints() end)
  899. end
  900. mas:Destroy()
  901. for i,v in pairs(cors) do
  902. spawn(function()
  903. pcall(v)
  904. end)
  905. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement