hawoody

Gravity Hammer

Apr 20th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.61 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  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. Script1 = Instance.new("Script")
  20. Script2 = Instance.new("Script")
  21. Script3 = Instance.new("Script")
  22. Part4 = Instance.new("Part")
  23. BoolValue5 = Instance.new("BoolValue")
  24. Sparkles6 = Instance.new("Sparkles")
  25. LocalScript7 = Instance.new("LocalScript")
  26. BoolValue8 = Instance.new("BoolValue")
  27. BoolValue9 = Instance.new("BoolValue")
  28. StringValue10 = Instance.new("StringValue")
  29. Script11 = Instance.new("Script")
  30. IntValue12 = Instance.new("IntValue")
  31. LocalScript13 = Instance.new("LocalScript")
  32. Animation14 = Instance.new("Animation")
  33. Animation15 = Instance.new("Animation")
  34. Animation16 = Instance.new("Animation")
  35. Animation17 = Instance.new("Animation")
  36. Animation18 = Instance.new("Animation")
  37. ScreenGui19 = Instance.new("ScreenGui")
  38. Frame20 = Instance.new("Frame")
  39. Frame21 = Instance.new("Frame")
  40. Frame22 = Instance.new("Frame")
  41. TextLabel23 = Instance.new("TextLabel")
  42. Script24 = Instance.new("Script")
  43. Script25 = Instance.new("Script")
  44. Sound26 = Instance.new("Sound")
  45. Script27 = Instance.new("Script")
  46. Script28 = Instance.new("Script")
  47. Part29 = Instance.new("Part")
  48. CylinderMesh30 = Instance.new("CylinderMesh")
  49. Part31 = Instance.new("Part")
  50. CylinderMesh32 = Instance.new("CylinderMesh")
  51. PointLight33 = Instance.new("PointLight")
  52. Script34 = Instance.new("Script")
  53. Part35 = Instance.new("Part")
  54. CylinderMesh36 = Instance.new("CylinderMesh")
  55. PointLight37 = Instance.new("PointLight")
  56. Script38 = Instance.new("Script")
  57. Part39 = Instance.new("Part")
  58. CylinderMesh40 = Instance.new("CylinderMesh")
  59. Script41 = Instance.new("Script")
  60. Part42 = Instance.new("Part")
  61. CylinderMesh43 = Instance.new("CylinderMesh")
  62. Script44 = Instance.new("Script")
  63. Tool45 = Instance.new("Tool")
  64. Part46 = Instance.new("Part")
  65. SpecialMesh47 = Instance.new("SpecialMesh")
  66. Sound48 = Instance.new("Sound")
  67. Script49 = Instance.new("Script")
  68. LocalScript50 = Instance.new("LocalScript")
  69. Tool0.Name = "CeleSword"
  70. Tool0.Parent = mas
  71. Tool0.TextureId = "http://www.roblox.com/Asset?ID=203700782"
  72. Tool0.GripForward = Vector3.new(-1, -0, -0)
  73. Tool0.GripPos = Vector3.new(0, 0, -1.5)
  74. Tool0.GripRight = Vector3.new(0, 1, 0)
  75. Tool0.GripUp = Vector3.new(0, 0, 1)
  76. Script1.Name = "SwordScript"
  77. Script1.Parent = Tool0
  78. table.insert(cors,sandbox(Script1,function()
  79. -------- OMG HAX
  80.  
  81. r = game:service("RunService")
  82.  
  83.  
  84. local damage = 50
  85.  
  86.  
  87. local slash_damage = 50
  88. local lunge_damage = 500
  89.  
  90. sword = script.Parent.Handle
  91. Tool = script.Parent
  92.  
  93.  
  94. local SlashSound = Instance.new("Sound")
  95. SlashSound.SoundId = "http://www.roblox.com/Asset?ID=186112092"
  96. SlashSound.Parent = sword
  97. SlashSound.Volume = 1
  98. SlashSound.Pitch = .9
  99.  
  100. local LungeSound = Instance.new("Sound")
  101. LungeSound.SoundId = "http://www.roblox.com/Asset?ID=186112092"
  102. LungeSound.Parent = sword
  103. LungeSound.Volume = 1
  104. LungeSound.Pitch = 1.6
  105.  
  106. local UnsheathSound = Instance.new("Sound")
  107. UnsheathSound.SoundId = "http://www.roblox.com/Asset?ID=155827029"
  108. UnsheathSound.Parent = sword
  109. UnsheathSound.Volume = 1
  110. UnsheathSound.Pitch = 1.1
  111.  
  112.  
  113. function blow(hit)
  114. if (hit.Parent == nil) then return end -- happens when bullet hits sword
  115.  
  116. local humanoid = hit.Parent:findFirstChild("Humanoid")
  117. local vCharacter = Tool.Parent
  118. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  119. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  120. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  121. -- final check, make sure sword is in-hand
  122.  
  123. local right_arm = vCharacter:FindFirstChild("Right Arm")
  124. if (right_arm ~= nil) then
  125. local joint = right_arm:FindFirstChild("RightGrip")
  126. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  127. tagHumanoid(humanoid, vPlayer)
  128. humanoid:TakeDamage(damage)
  129. wait(1)
  130. untagHumanoid(humanoid)
  131. end
  132. end
  133.  
  134.  
  135. end
  136. end
  137.  
  138.  
  139. function tagHumanoid(humanoid, player)
  140. local creator_tag = Instance.new("ObjectValue")
  141. creator_tag.Value = player
  142. creator_tag.Name = "creator"
  143. creator_tag.Parent = humanoid
  144. end
  145.  
  146. function untagHumanoid(humanoid)
  147. if humanoid ~= nil then
  148. local tag = humanoid:findFirstChild("creator")
  149. if tag ~= nil then
  150. tag.Parent = nil
  151. end
  152. end
  153. end
  154.  
  155.  
  156. function attack()
  157.  
  158. damage = slash_damage
  159. SlashSound:play()
  160. local MoveUpBro = script.ForceScript:Clone()
  161. MoveUpBro.Parent = script.Parent.Parent.Torso
  162. MoveUpBro.Disabled = false
  163.  
  164. local anim = Instance.new("StringValue")
  165. anim.Name = "toolanim"
  166. anim.Value = "Slash"
  167. anim.Parent = Tool
  168.  
  169. wait(.15)
  170. end
  171.  
  172. function lunge()
  173. damage = lunge_damage
  174.  
  175. LungeSound:play()
  176. local spinForce = Instance.new("BodyAngularVelocity")
  177. spinForce.Name = "DDD"
  178. spinForce.P = 5000000
  179. spinForce.angularvelocity = Vector3.new(0,20,0)
  180. spinForce.maxTorque = Vector3.new(spinForce.P,spinForce.P,spinForce.P)
  181. spinForce.Parent = script.Parent.Parent.Torso
  182. local anim = Instance.new("StringValue")
  183. anim.Name = "toolanim"
  184. anim.Value = "Lunge"
  185. anim.Parent = Tool
  186.  
  187.  
  188. force = Instance.new("BodyVelocity")
  189. force.velocity = Vector3.new(0,0,0) --Tool.Parent.Torso.CFrame.lookVector * 80
  190. force.Parent = Tool.Parent.Torso
  191. wait(.25)
  192. swordOut()
  193. wait(.25)
  194. force.Parent = nil
  195. wait(.5)
  196. swordUp()
  197. spinForce:remove()
  198.  
  199. damage = slash_damage
  200. end
  201.  
  202. function swordUp()
  203. Tool.GripForward = Vector3.new(-1,0,0)
  204. Tool.GripRight = Vector3.new(0,1,0)
  205. Tool.GripUp = Vector3.new(0,0,1)
  206. end
  207.  
  208. function swordOut()
  209. Tool.GripForward = Vector3.new(-1,0,0)
  210. Tool.GripRight = Vector3.new(0,1,0)
  211. Tool.GripUp = Vector3.new(0,0,1)
  212. end
  213.  
  214. function swordAcross()
  215. -- parry
  216. end
  217.  
  218.  
  219. Tool.Enabled = true
  220. local last_attack = 0
  221. function onActivated()
  222.  
  223. if not Tool.Enabled then
  224. return
  225. end
  226.  
  227. Tool.Enabled = false
  228.  
  229. local character = Tool.Parent;
  230. local humanoid = character.Humanoid
  231. if humanoid == nil then
  232. print("Humanoid not found")
  233. return
  234. end
  235.  
  236. t = r.Stepped:wait()
  237.  
  238. if (t - last_attack < .3) then
  239. lunge()
  240. else
  241. attack()
  242. end
  243.  
  244. last_attack = t
  245.  
  246. --wait(.5)
  247.  
  248. Tool.Enabled = true
  249. end
  250.  
  251.  
  252. function onEquipped()
  253. UnsheathSound:play()
  254. end
  255.  
  256.  
  257. script.Parent.Activated:connect(onActivated)
  258. script.Parent.Equipped:connect(onEquipped)
  259.  
  260.  
  261. connection = sword.Touched:connect(blow)
  262.  
  263.  
  264.  
  265. end))
  266. Script2.Name = "ForceScript"
  267. Script2.Parent = Script1
  268. Script2.Disabled = true
  269. table.insert(cors,sandbox(Script2,function()
  270. while true do
  271. script.ForceClean.Disabled = false
  272. script.Parent.Velocity = script.Parent.CFrame.lookVector *180
  273. wait(0.01)
  274. end
  275.  
  276. end))
  277. Script3.Name = "ForceClean"
  278. Script3.Parent = Script2
  279. Script3.Disabled = true
  280. table.insert(cors,sandbox(Script3,function()
  281. wait(.03)
  282. script.Parent:remove()
  283. end))
  284. Part4.Name = "Handle"
  285. Part4.Parent = Tool0
  286. Part4.BrickColor = BrickColor.new("Dark stone grey")
  287. Part4.Reflectance = 0.40000000596046
  288. Part4.Transparency = 1
  289. Part4.Rotation = Vector3.new(-137.110001, 0, -90)
  290. Part4.Anchored = true
  291. Part4.Locked = true
  292. Part4.FormFactor = Enum.FormFactor.Plate
  293. Part4.Size = Vector3.new(1, 0.800000012, 4)
  294. Part4.CFrame = CFrame.new(1.68899989, 14.6541491, 24.2300224, 1.17159353e-15, 1, 0, 0.73271209, 0, 0.680538595, 0.680538595, 0, -0.73271209)
  295. Part4.BottomSurface = Enum.SurfaceType.Smooth
  296. Part4.TopSurface = Enum.SurfaceType.Smooth
  297. Part4.Color = Color3.new(0.388235, 0.372549, 0.384314)
  298. Part4.Position = Vector3.new(1.68899989, 14.6541491, 24.2300224)
  299. Part4.Orientation = Vector3.new(-42.8899994, 180, 90)
  300. Part4.Color = Color3.new(0.388235, 0.372549, 0.384314)
  301. BoolValue5.Name = "Blockable"
  302. BoolValue5.Parent = Part4
  303. BoolValue5.Value = true
  304. Sparkles6.Parent = Part4
  305. Sparkles6.Color = Color3.new(1.77083, 10.2, 0)
  306. Sparkles6.Enabled = false
  307. Sparkles6.SparkleColor = Color3.new(1, 1, 0)
  308. Sparkles6.Color = Color3.new(1.77083, 10.2, 0)
  309. LocalScript7.Name = "MouseIcon"
  310. LocalScript7.Parent = Tool0
  311. table.insert(cors,sandbox(LocalScript7,function()
  312. local MOUSE_ICON = 'rbxasset://textures/GunCursor.png'
  313. local RELOADING_ICON = 'rbxasset://textures/GunWaitCursor.png'
  314.  
  315. local Tool = script.Parent
  316.  
  317. local Mouse = nil
  318.  
  319. local function UpdateIcon()
  320. if Mouse then
  321. Mouse.Icon = Tool.Enabled and MOUSE_ICON or RELOADING_ICON
  322. end
  323. end
  324.  
  325. local function OnEquipped(mouse)
  326. Mouse = mouse
  327. UpdateIcon()
  328. end
  329.  
  330. local function OnChanged(property)
  331. if property == 'Enabled' then
  332. UpdateIcon()
  333. end
  334. end
  335.  
  336. Tool.Equipped:connect(OnEquipped)
  337. Tool.Changed:connect(OnChanged)
  338.  
  339. end))
  340. BoolValue8.Name = "MouseDown"
  341. BoolValue8.Parent = Tool0
  342. BoolValue9.Name = "Reloading"
  343. BoolValue9.Parent = Tool0
  344. StringValue10.Name = "RunAnim"
  345. StringValue10.Parent = Tool0
  346. Script11.Parent = Tool0
  347. table.insert(cors,sandbox(Script11,function()
  348. --Made by Stickmasterluke
  349.  
  350.  
  351. sp=script.Parent
  352.  
  353.  
  354. damage=500 -- +/- 10%
  355. damagewindow=1 --after clicking, how long does the player have to hit the opponent wioth their weapon to deal damage
  356. swingrate=.15
  357.  
  358. clashsounds={91154405,91154446,91154471,91154503,91154521}
  359. swooshsounds={54587039,165344304,197478029}
  360. hitsounds={131237241,137579113,91154954,159504677,133052541}
  361. anims={"Stab1","Stab2","LeftSlash"}
  362.  
  363.  
  364.  
  365. ready=false
  366. equipped=false
  367. rate=1/30
  368. lastswing=0
  369.  
  370.  
  371. function waitfor(a,b)
  372. while a:FindFirstChild(b)==nil do
  373. a.ChildAdded:wait()
  374. end
  375. return a:FindFirstChild(b)
  376. end
  377.  
  378. reloading=waitfor(sp,"Reloading")
  379. down=waitfor(sp,"MouseDown")
  380. runanim=waitfor(sp,"RunAnim")
  381. sparkles=waitfor(sp.Handle,"Sparkles")
  382. debris=game:getService("Debris")
  383. weaponhud=waitfor(sp,"WeaponHud")
  384. weaponnametag=waitfor(weaponhud,"WeaponName")
  385. guibar=waitfor(weaponhud,"Bar")
  386. guibarfill=waitfor(guibar,"Fill")
  387. weaponnametag.Text=sp.Name
  388.  
  389. function runsound(id,volume)
  390. local volume=volume or 1
  391. local sound=Instance.new("Sound")
  392. sound.Looped=false
  393. sound.Pitch=1
  394. sound.SoundId="http://www.roblox.com/asset/?id="..tostring(id)
  395. sound.PlayOnRemove=false
  396. sound.Volume=volume
  397. debris:AddItem(sound,3)
  398. sound.Parent=sp.Handle
  399. wait()
  400. sound:Play()
  401. end
  402.  
  403. function billboard(pos,text,time,color)
  404. local pos=pos or Vector3.new(0,0,0)
  405. local text=text or "Hello World!"
  406. local time=time or 2
  407. local color=color or Color3.new(1,0,0)
  408. local pos=pos+Vector3.new(0,5,0)
  409. local ep=Instance.new("Part")
  410. ep.Name="Effect"
  411. ep.formFactor="Custom"
  412. ep.Size=Vector3.new(0,0,0)
  413. ep.TopSurface="Smooth"
  414. ep.BottomSurface="Smooth"
  415. ep.CFrame=CFrame.new(pos)
  416. ep.Anchored=true
  417. ep.CanCollide=false
  418. ep.Transparency=1
  419. local bb=Instance.new("BillboardGui")
  420. bb.Size=UDim2.new(3,0,3,0)
  421. bb.Adornee=ep
  422. bb.Active=false
  423. local tl=Instance.new("TextLabel")
  424. tl.BackgroundTransparency=1
  425. tl.Size=UDim2.new(1,0,1,0)
  426. tl.Text=text
  427. tl.TextColor3=color
  428. tl.TextScaled=true
  429. tl.Font="ArialBold"
  430. tl.Visible=false
  431.  
  432. tl.Parent=bb
  433. bb.Parent=ep
  434. debris:AddItem(ep,time+.1)
  435. ep.Parent=game.Workspace
  436. delay(0,function()
  437. local frames=time/rate
  438. for frame=1,frames do
  439. wait(rate)
  440. local percent=frame/frames
  441. ep.CFrame=CFrame.new(pos)+Vector3.new(0,5*percent,0)
  442. tl.TextTransparency=percent
  443. end
  444. ep:remove()
  445. end)
  446. end
  447.  
  448. function makeblood(part)
  449. if part then
  450. local b=Instance.new("Part")
  451. b.BrickColor=BrickColor.new("Bright blue")
  452. b.formFactor="Custom"
  453. b.Transparency=math.random(0,1)*.5
  454. if math.random()<.5 then
  455. b.CanCollide=false
  456. else
  457. b.CanCollide=false
  458. end
  459. b.TopSurface="Smooth"
  460. b.BottomSurface="Smooth"
  461. b.Size=Vector3.new(.2*math.random(1,5),.2*math.random(1,5),.2*math.random(1,5))
  462. b.Velocity=part.Velocity+(Vector3.new((math.random()-.5),(math.random()-.5),(math.random()-.5))*30)
  463. b.RotVelocity=part.RotVelocity+(Vector3.new((math.random()-.5),(math.random()-.5),(math.random()-.5))*20)
  464. b.CFrame=part.CFrame*CFrame.new((math.random()-.5)*3,(math.random()-.5)*3,(math.random()-.5)*3)*CFrame.Angles(math.pi*2*math.random(),math.pi*2*math.random(),math.pi*2*math.random())
  465. debris:AddItem(b,math.random()*4)
  466. b.Parent=game.Workspace
  467. end
  468. end
  469.  
  470. sp.Handle.Touched:connect(function(hit)
  471. if ready and equipped and hit and hit.Parent~=nil and hit:IsDescendantOf(sp.Parent)==false and string.lower(string.sub(hit.Name,1,6))~="effect" and (tick()-lastswing)<=damagewindow then
  472. if hit:FindFirstChild("CanBlock") and sp.Handle:FindFirstChild("Blockable") then
  473. ready=false
  474. runsound(clashsounds[math.random(1,#clashsounds)])
  475. sparkles.Enabled=true
  476. delay(.2,function()
  477. sparkles.Enabled=false
  478. end)
  479. billboard(sp.Handle.Position,"Block",2,Color3.new(1,1,0))
  480. end
  481. local mh=sp.Parent:FindFirstChild("Humanoid")
  482. local eh=hit.Parent:FindFirstChild("Humanoid")
  483. local ra=sp.Parent:FindFirstChild("Right Arm")
  484. local plr=game.Players:GetPlayerFromCharacter(sp.Parent)
  485. if mh and eh and eh~=mh and mh.Health>0 and eh.Health>0 and ra and plr~=nil then
  486. if not plr.Neutral then
  487. local eplr=game.Players:GetPlayerFromCharacter(eh.Parent)
  488. if eplr~=nil and eplr.Neutral==false and eplr.TeamColor==plr.TeamColor then
  489. return --No team killing
  490. end
  491. end
  492. ready=false
  493. for i,v in ipairs(eh:GetChildren()) do
  494. if v.Name=="creator" then
  495. v:remove()
  496. end
  497. end
  498. local creator=Instance.new("ObjectValue")
  499. creator.Name="creator"
  500. creator.Value=plr
  501. creator.Parent=eh
  502. debris:AddItem(creator,1)
  503. local localdamage=math.floor(damage*(.9+(math.random()*.2)))
  504. eh:TakeDamage(localdamage)
  505. billboard(hit.Position,"-"..tostring(localdamage))
  506. runsound(hitsounds[math.random(1,#hitsounds)])
  507. local bloodeffects=math.ceil(localdamage/10)
  508. for i=1,math.random(bloodeffects-1,bloodeffects+1) do
  509. --[[if math.random()<.5 then
  510. makeblood(sp.Handle)
  511. else]]
  512. makeblood(hit)
  513. --end
  514. end
  515. end
  516. end
  517. end)
  518.  
  519.  
  520. function Activate()
  521. if equipped and (tick()-lastswing)>=swingrate then
  522. ready=true
  523. reloading.Value=true
  524.  
  525. runsound(swooshsounds[math.random(1,#swooshsounds)],.5)
  526.  
  527. newanim=anims[math.random(1,#anims)]
  528. while newanim==runanim.Value do
  529. newanim=anims[math.random(1,#anims)]
  530. end
  531. runanim.Value=newanim
  532.  
  533. lastswing=tick()
  534. updategui()
  535.  
  536. wait(swingrate)
  537.  
  538. reloading.Value=false
  539. --if down.Value then
  540. --Activate()
  541. --end
  542. end
  543. end
  544.  
  545. down.Changed:connect(function()
  546. if down.Value then
  547. Activate()
  548. end
  549. end)
  550.  
  551. function updategui()
  552. local swingpercent=math.min((tick()-lastswing)/swingrate,1)
  553. if swingpercent<.5 then --fade from red to yellow then to green
  554. guibarfill.BackgroundColor3=Color3.new(1,swingpercent*2,0)
  555. else
  556. guibarfill.BackgroundColor3=Color3.new(1-((swingpercent-.5)/.5),1,0)
  557. end
  558. guibarfill.Size=UDim2.new(swingpercent,0,1,0)
  559. end
  560.  
  561. sp.Equipped:connect(function(mouse)
  562. lastswing=tick()
  563. updategui()
  564.  
  565. reloading.Value=true
  566. ready=false
  567. equipped=true
  568.  
  569. delay(0,function() --HAAB (Hacking around a bug)
  570. local plr=game.Players:GetPlayerFromCharacter(sp.Parent)
  571. if plr~=nil then
  572. local plrgui=plr:FindFirstChild("PlayerGui")
  573. if plrgui~=nil and weaponhud~=nil then
  574. weaponhud.Parent=plrgui
  575. while equipped do
  576. updategui()
  577. wait(999)--rate)
  578. end
  579. end
  580. end
  581. end)
  582.  
  583. wait(swingrate)
  584.  
  585. reloading.Value=false
  586. --if down.Value then
  587. --Activate()
  588. --end
  589. end)
  590.  
  591. sp.Unequipped:connect(function()
  592. ready=false
  593. equipped=false
  594. delay(0,function() --HAAB
  595. weaponhud.Parent=sp
  596. end)
  597. end)
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604. end))
  605. IntValue12.Name = "WeaponSpeed"
  606. IntValue12.Parent = Tool0
  607. IntValue12.Value = 98
  608. LocalScript13.Parent = Tool0
  609. table.insert(cors,sandbox(LocalScript13,function()
  610. --Made by Stickmasterluke
  611.  
  612.  
  613. sp=script.Parent
  614.  
  615.  
  616. function waitfor(a,b)
  617. while a:FindFirstChild(b)==nil do
  618. a.ChildAdded:wait()
  619. end
  620. return a:FindFirstChild(b)
  621. end
  622.  
  623. reloading=waitfor(sp,"Reloading")
  624. down=waitfor(sp,"MouseDown")
  625. runanim=waitfor(sp,"RunAnim")
  626.  
  627. animspeed=1.2 --lower number is slower
  628. equipspeed=1.5
  629. originalgrip=CFrame.new(0,0,-1.1,0,0,1,1,0,0,0,1,0)
  630. currentgrip=originalgrip
  631. function swordUp()
  632. currentgrip=originalgrip
  633. sp.Grip=currentgrip
  634. end
  635. function swordOut()
  636. currentgrip=originalgrip*CFrame.Angles(math.pi/4,.4,0)
  637. sp.Grip=currentgrip
  638. end
  639. function spinsword(spintime)
  640. delay(0,function()
  641. local startspin=tick()
  642. local endspin=startspin+spintime
  643. while tick()<endspin do
  644. sp.Grip=currentgrip*CFrame.Angles(math.pi*2*((tick()-startspin)/spintime),0,0)
  645. wait()
  646. end
  647. sp.Grip=currentgrip
  648. end)
  649. end
  650.  
  651. function update(mouse)
  652. if mouse~=nil then
  653. if reloading.Value then
  654. mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
  655. else
  656. mouse.Icon="rbxasset://textures\\GunCursor.png"
  657. end
  658. end
  659. end
  660.  
  661. runanim.Changed:connect(function()
  662. local h=sp.Parent:FindFirstChild("Humanoid")
  663. local t=sp.Parent:FindFirstChild("Torso")
  664. local anim=sp:FindFirstChild(runanim.Value)
  665. if anim and t and h then
  666. local theanim=h:LoadAnimation(anim)
  667. if theanim and h.Health>0 then
  668. theanim:Play(nil,nil,animspeed)
  669. end
  670. end
  671. end)
  672.  
  673.  
  674. function Equipped(mouse)
  675. if mouse~=nil then
  676. update(mouse)
  677. reloading.Changed:connect(function()
  678. update(mouse)
  679. end)
  680. mouse.Button1Down:connect(function()
  681. down.Value=true
  682. end)
  683. mouse.Button1Up:connect(function()
  684. down.Value=false
  685. end)
  686. local h=sp.Parent:FindFirstChild("Humanoid")
  687. local t=sp.Parent:FindFirstChild("Torso")
  688. if t and h then
  689. local equipanim=sp:FindFirstChild("Equip")
  690. if equipanim~=nil then
  691. local EquipAnim=h:LoadAnimation(equipanim)
  692. if EquipAnim and h.Health>0 then
  693. EquipAnim:Play(nil,nil,equipspeed)
  694. end
  695. end
  696. local holdanim=sp:FindFirstChild("Hold")
  697. if holdanim~=nil then
  698. if HoldAnim then
  699. HoldAnim:Stop()
  700. end
  701. HoldAnim=h:LoadAnimation(holdanim)
  702. if HoldAnim and h.Health>0 then
  703. HoldAnim:Play()
  704. end
  705. end
  706. end
  707. end
  708. end
  709.  
  710. function Unequipped()
  711. down.Value=false
  712. if HoldAnim then
  713. HoldAnim:Stop()
  714. end
  715. end
  716.  
  717. sp.Equipped:connect(Equipped)
  718. sp.Unequipped:connect(Unequipped)
  719.  
  720. end))
  721. Animation14.Name = "Stab2"
  722. Animation14.Parent = Tool0
  723. Animation14.AnimationId = "http://www.roblox.com/Asset?ID=96559161"
  724. Animation15.Name = "Stab1"
  725. Animation15.Parent = Tool0
  726. Animation15.AnimationId = "http://www.roblox.com/Asset?ID=96559159"
  727. Animation16.Name = "LeftSlash"
  728. Animation16.Parent = Tool0
  729. Animation16.AnimationId = "http://www.roblox.com/Asset?ID=74894663"
  730. Animation17.Name = "Hold"
  731. Animation17.Parent = Tool0
  732. Animation17.AnimationId = "http://www.roblox.com/Asset?ID=96559165"
  733. Animation18.Name = "Equip"
  734. Animation18.Parent = Tool0
  735. Animation18.AnimationId = "http://www.roblox.com/Asset?ID=94160581"
  736. ScreenGui19.Name = "WeaponHud"
  737. ScreenGui19.Parent = Tool0
  738. Frame20.Name = "Bar"
  739. Frame20.Parent = ScreenGui19
  740. Frame20.Size = UDim2.new(0, 200, 0, 40)
  741. Frame20.Style = Enum.FrameStyle.RobloxRound
  742. Frame20.Position = UDim2.new(0.5, -100, 1, -160)
  743. Frame20.Visible = false
  744. Frame20.ZIndex = 4
  745. Frame21.Name = "Fill"
  746. Frame21.Parent = Frame20
  747. Frame21.Size = UDim2.new(1, 0, 1, 0)
  748. Frame21.Visible = false
  749. Frame21.BackgroundColor3 = Color3.new(0, 1, 0)
  750. Frame21.BorderSizePixel = 0
  751. Frame21.ZIndex = 5
  752. Frame22.Name = "Backing"
  753. Frame22.Parent = Frame20
  754. Frame22.Size = UDim2.new(1, 0, 1, 0)
  755. Frame22.Visible = false
  756. Frame22.BackgroundColor3 = Color3.new(0, 0, 0)
  757. Frame22.BorderSizePixel = 0
  758. Frame22.ZIndex = 4
  759. TextLabel23.Name = "WeaponName"
  760. TextLabel23.Parent = ScreenGui19
  761. TextLabel23.Transparency = 1
  762. TextLabel23.Size = UDim2.new(0, 400, 0, 20)
  763. TextLabel23.Text = "Dagger"
  764. TextLabel23.Position = UDim2.new(0.5, -200, 1, -185)
  765. TextLabel23.Visible = false
  766. TextLabel23.BackgroundTransparency = 1
  767. TextLabel23.BorderSizePixel = 0
  768. TextLabel23.ZIndex = 4
  769. TextLabel23.ClipsDescendants = true
  770. TextLabel23.Font = Enum.Font.ArialBold
  771. TextLabel23.FontSize = Enum.FontSize.Size18
  772. TextLabel23.TextColor3 = Color3.new(0, 0, 0)
  773. TextLabel23.TextStrokeColor3 = Color3.new(0.698039, 0.698039, 0.698039)
  774. TextLabel23.TextTransparency = 0.20000000298023
  775. Script24.Name = "UltimateWeld"
  776. Script24.Parent = Tool0
  777. table.insert(cors,sandbox(Script24,function()
  778. --DO NOT USE BOTH WELDING SCRIPTS PROVIDED BY THIS MODEL
  779. --The regular script is recommended
  780.  
  781.  
  782.  
  783. --[[
  784. Prevents welds from breaking/transforming when player uses the tool
  785. This recreates the EXACT weld every time
  786. This also prevents lag build up by clearing old welds, the tradition weld script just keeps making new
  787. ones, which can lead to weapons have crazy amounts of welds that dont work (I saw 6000 in a weapon once)
  788. ]]
  789.  
  790. --[[Usage
  791. 1. Remove Old welding script (optional, only if updating a weapon and that weapon does not rely on that script)
  792. 2. Anchor all parts of tool and put inside of a tool object
  793. 3. Place this script in that tool (make sure you do this AFTER step 2, otherwise it may fail)
  794. 4. Treat like normal tool, nothing special has to be done with it
  795. ]]
  796.  
  797. --[[The local script included in this model can only be used if
  798. 1. The weapon is being placed in the players backpack first (i.e. the weapon is in starterpack and moves to player backpack)
  799. OR
  800. 2. The weapon is previously welded (weapon can be placed in workspace and picked up then)
  801. ]]
  802. repeat wait() until script.Parent:FindFirstChild("Handle")
  803. local welds={}
  804. function ClearOldWelds(tbl)
  805. for _,v in pairs(tbl) do
  806. if v:IsA('Weld') then
  807. v:Destroy()
  808. end
  809. end
  810. end
  811.  
  812. function Equipped()
  813. local handle=script.Parent:FindFirstChild('Handle')
  814. if not handle then return end
  815. local tble=handle:GetChildren()
  816. for _,v in pairs(script.Parent:GetChildren()) do
  817. if v:IsA('BasePart') and v~=handle then
  818. local c1
  819. for _1,v1 in pairs(welds) do
  820. if _1==v then
  821. c1=v1
  822. break
  823. end
  824. end
  825. if not c1 then
  826. welds[v]=v.CFrame:inverse()*handle.CFrame
  827. v.Anchored=false
  828. c1=welds[v]
  829. end
  830. local weld=Instance.new('Weld')
  831. weld.Part0=handle
  832. weld.Part1=v
  833. weld.C0=CFrame.new()
  834. weld.C1=c1
  835. weld.Parent=handle
  836. end
  837. end
  838. ClearOldWelds(tble)
  839. handle.Anchored=false
  840. end
  841. Equipped()
  842. script.Parent.Equipped:connect(Equipped)
  843.  
  844. --Made by DonnyTheDemented
  845.  
  846. end))
  847. Script25.Name = "Damage Script"
  848. Script25.Parent = mas
  849. table.insert(cors,sandbox(Script25,function()
  850. wait(5)
  851. function onTouched(hit)
  852. local human = hit.Parent:findFirstChild("Humanoid")
  853. if (human ~= nil) then
  854. human.Health = human.Health - 50 -- Change the amount to change the damage dealt on humanoid.
  855. end
  856. end
  857. script.Parent.Touched:connect(onTouched)
  858. end))
  859. Sound26.Parent = mas
  860. Sound26.Pitch = 2
  861. Sound26.SoundId = "http://www.roblox.com/asset/?id=147930482"
  862. Sound26.Volume = 1
  863. Script27.Name = "SoundX"
  864. Script27.Parent = Sound26
  865. table.insert(cors,sandbox(Script27,function()
  866. while true do
  867.  
  868. for i = 360, 400 do
  869. script.Parent.Pitch = i/100
  870. wait()
  871. end
  872. for i = 360, 400 do
  873. script.Parent.Pitch = 7.6-i/100
  874. wait()
  875.  
  876. end
  877. end
  878. end))
  879. Script28.Name = "SoundScript"
  880. Script28.Parent = mas
  881. table.insert(cors,sandbox(Script28,function()
  882. function onTouched(hit)
  883. wait(0) --Change the 0 to however long you want the sound to be delayed in seconds.
  884. script.Parent.Sound:play() --copy and paste this and the line above it to make the sound repeat.
  885. end
  886. script.Parent.Touched:connect(onTouched)
  887.  
  888.  
  889. end))
  890. Part29.Name = "FakeHandle"
  891. Part29.Parent = Tool0
  892. Part29.Material = Enum.Material.Fabric
  893. Part29.BrickColor = BrickColor.new("CGA brown")
  894. Part29.Rotation = Vector3.new(-171.220001, 65.1699982, 126.729996)
  895. Part29.Anchored = true
  896. Part29.CanCollide = false
  897. Part29.Locked = true
  898. Part29.FormFactor = Enum.FormFactor.Custom
  899. Part29.Size = Vector3.new(0.319487989, 2.17251825, 0.319487989)
  900. Part29.CFrame = CFrame.new(1.6176343, 13.8218098, 25.3037243, -0.251109898, -0.336483657, 0.907591999, -0.709234774, 0.702055991, 0.0640536994, -0.658732772, -0.627610981, -0.414939106)
  901. Part29.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  902. Part29.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  903. Part29.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  904. Part29.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  905. Part29.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  906. Part29.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  907. Part29.Color = Color3.new(0.666667, 0.333333, 0)
  908. Part29.Position = Vector3.new(1.6176343, 13.8218098, 25.3037243)
  909. Part29.Orientation = Vector3.new(-3.66999984, 114.57, -45.2899971)
  910. Part29.Color = Color3.new(0.666667, 0.333333, 0)
  911. CylinderMesh30.Parent = Part29
  912. Part31.Name = "Glow"
  913. Part31.Parent = Tool0
  914. Part31.Material = Enum.Material.Ice
  915. Part31.BrickColor = BrickColor.new("Deep orange")
  916. Part31.Rotation = Vector3.new(-47.1100006, 14.54, -69.659996)
  917. Part31.Anchored = true
  918. Part31.CanCollide = false
  919. Part31.Locked = true
  920. Part31.FormFactor = Enum.FormFactor.Custom
  921. Part31.Size = Vector3.new(0.926515162, 1.05431032, 0.926515162)
  922. Part31.CFrame = CFrame.new(0.972535849, 15.167778, 24.1004791, 0.336483657, 0.907591999, 0.251109898, -0.702055991, 0.0640536994, 0.709234774, 0.627610981, -0.414939106, 0.658732772)
  923. Part31.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  924. Part31.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  925. Part31.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  926. Part31.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  927. Part31.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  928. Part31.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  929. Part31.Color = Color3.new(1, 0.690196, 0)
  930. Part31.Position = Vector3.new(0.972535849, 15.167778, 24.1004791)
  931. Part31.Orientation = Vector3.new(-45.1699982, 20.8699989, -84.7900009)
  932. Part31.Color = Color3.new(1, 0.690196, 0)
  933. CylinderMesh32.Parent = Part31
  934. PointLight33.Parent = Part31
  935. PointLight33.Color = Color3.new(1, 0.666667, 0)
  936. PointLight33.Enabled = false
  937. PointLight33.Range = 10
  938. PointLight33.Color = Color3.new(1, 0.666667, 0)
  939. Script34.Name = "LightControl"
  940. Script34.Parent = PointLight33
  941. table.insert(cors,sandbox(Script34,function()
  942. while true do
  943. script.Parent.Enabled=true
  944. script.Parent.Range=16
  945. wait(.01)
  946. script.Parent.Range=15
  947. wait(.01)
  948. script.Parent.Range=14
  949. wait(.01)
  950. script.Parent.Range=13
  951. wait(.01)
  952. script.Parent.Range=12
  953. wait(.01)
  954. script.Parent.Range=11
  955. wait(.01)
  956. script.Parent.Range=10
  957. wait(.01)
  958. script.Parent.Range=9
  959. wait(.01)
  960. script.Parent.Range=8
  961. wait(.01)
  962. script.Parent.Range=9
  963. wait(.01)
  964. script.Parent.Range=10
  965. wait(.01)
  966. script.Parent.Range=11
  967. wait(.01)
  968. script.Parent.Range=12
  969. wait(.01)
  970. script.Parent.Range=13
  971. wait(.01)
  972. script.Parent.Range=14
  973. wait(.01)
  974. script.Parent.Range=15
  975. wait(.01)
  976. end
  977. end))
  978. Part35.Name = "GlowB"
  979. Part35.Parent = Tool0
  980. Part35.Material = Enum.Material.Ice
  981. Part35.BrickColor = BrickColor.new("Toothpaste")
  982. Part35.Rotation = Vector3.new(-47.1100006, 14.54, -69.659996)
  983. Part35.Anchored = true
  984. Part35.CanCollide = false
  985. Part35.Locked = true
  986. Part35.FormFactor = Enum.FormFactor.Custom
  987. Part35.Size = Vector3.new(0.511180818, 0.511180818, 0.511180818)
  988. Part35.CFrame = CFrame.new(2.21100831, 12.5837679, 26.4104881, 0.336483657, 0.907591999, 0.251109898, -0.702055991, 0.0640536994, 0.709234774, 0.627610981, -0.414939106, 0.658732772)
  989. Part35.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  990. Part35.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  991. Part35.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  992. Part35.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  993. Part35.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  994. Part35.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  995. Part35.Color = Color3.new(0, 1, 1)
  996. Part35.Position = Vector3.new(2.21100831, 12.5837679, 26.4104881)
  997. Part35.Orientation = Vector3.new(-45.1699982, 20.8699989, -84.7900009)
  998. Part35.Color = Color3.new(0, 1, 1)
  999. CylinderMesh36.Parent = Part35
  1000. PointLight37.Parent = Part35
  1001. PointLight37.Color = Color3.new(0, 1, 1)
  1002. PointLight37.Enabled = false
  1003. PointLight37.Color = Color3.new(0, 1, 1)
  1004. Script38.Name = "LightControl"
  1005. Script38.Parent = PointLight37
  1006. table.insert(cors,sandbox(Script38,function()
  1007. while true do
  1008. script.Parent.Enabled=true
  1009. script.Parent.Range=8
  1010. wait(.01)
  1011. script.Parent.Range=7
  1012. wait(.01)
  1013. script.Parent.Range=6
  1014. wait(.01)
  1015. script.Parent.Range=5
  1016. wait(.01)
  1017. script.Parent.Range=4
  1018. wait(.01)
  1019. script.Parent.Range=3
  1020. wait(.01)
  1021. script.Parent.Range=2
  1022. wait(.01)
  1023. script.Parent.Range=3
  1024. wait(.01)
  1025. script.Parent.Range=4
  1026. wait(.01)
  1027. script.Parent.Range=5
  1028. wait(.01)
  1029. script.Parent.Range=6
  1030. wait(.01)
  1031. script.Parent.Range=7
  1032. wait(.01)
  1033. end
  1034. end))
  1035. Part39.Name = "GlowBTrans"
  1036. Part39.Parent = Tool0
  1037. Part39.Material = Enum.Material.Ice
  1038. Part39.BrickColor = BrickColor.new("Toothpaste")
  1039. Part39.Transparency = 0.5
  1040. Part39.Rotation = Vector3.new(-47.1100006, 14.54, -69.659996)
  1041. Part39.Anchored = true
  1042. Part39.CanCollide = false
  1043. Part39.Locked = true
  1044. Part39.FormFactor = Enum.FormFactor.Custom
  1045. Part39.Size = Vector3.new(0.543129563, 0.543129563, 0.543129563)
  1046. Part39.CFrame = CFrame.new(2.21100831, 12.5837679, 26.4104881, 0.336483657, 0.907591999, 0.251109898, -0.702055991, 0.0640536994, 0.709234774, 0.627610981, -0.414939106, 0.658732772)
  1047. Part39.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  1048. Part39.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  1049. Part39.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  1050. Part39.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  1051. Part39.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  1052. Part39.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  1053. Part39.Color = Color3.new(0, 1, 1)
  1054. Part39.Position = Vector3.new(2.21100831, 12.5837679, 26.4104881)
  1055. Part39.Orientation = Vector3.new(-45.1699982, 20.8699989, -84.7900009)
  1056. Part39.Color = Color3.new(0, 1, 1)
  1057. CylinderMesh40.Parent = Part39
  1058. Script41.Name = "TransparencyControl"
  1059. Script41.Parent = Part39
  1060. table.insert(cors,sandbox(Script41,function()
  1061. while true do
  1062. script.Parent.Transparency=1
  1063. wait(12)
  1064. script.Parent.Transparency=.9
  1065. wait(.02)
  1066. script.Parent.Transparency=.8
  1067. wait(.02)
  1068. script.Parent.Transparency=.7
  1069. wait(.02)
  1070. script.Parent.Transparency=.6
  1071. wait(.02)
  1072. script.Parent.Transparency=.5
  1073. wait(.02)
  1074. script.Parent.Transparency=.6
  1075. wait(.02)
  1076. script.Parent.Transparency=.7
  1077. wait(.02)
  1078. script.Parent.Transparency=.8
  1079. wait(.02)
  1080. script.Parent.Transparency=.9
  1081. wait(.02)
  1082. end
  1083. end))
  1084. Part42.Name = "GlowTrans"
  1085. Part42.Parent = Tool0
  1086. Part42.Material = Enum.Material.Ice
  1087. Part42.BrickColor = BrickColor.new("New Yeller")
  1088. Part42.Transparency = 0.5
  1089. Part42.Rotation = Vector3.new(-47.1100006, 14.54, -69.659996)
  1090. Part42.Anchored = true
  1091. Part42.CanCollide = false
  1092. Part42.Locked = true
  1093. Part42.FormFactor = Enum.FormFactor.Custom
  1094. Part42.Size = Vector3.new(0.958463907, 1.21405435, 0.958463907)
  1095. Part42.CFrame = CFrame.new(0.972535849, 15.167778, 24.1004791, 0.336483657, 0.907591999, 0.251109898, -0.702055991, 0.0640536994, 0.709234774, 0.627610981, -0.414939106, 0.658732772)
  1096. Part42.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  1097. Part42.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  1098. Part42.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  1099. Part42.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  1100. Part42.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  1101. Part42.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  1102. Part42.Color = Color3.new(1, 1, 0)
  1103. Part42.Position = Vector3.new(0.972535849, 15.167778, 24.1004791)
  1104. Part42.Orientation = Vector3.new(-45.1699982, 20.8699989, -84.7900009)
  1105. Part42.Color = Color3.new(1, 1, 0)
  1106. CylinderMesh43.Parent = Part42
  1107. Script44.Name = "TransparencyControl"
  1108. Script44.Parent = Part42
  1109. table.insert(cors,sandbox(Script44,function()
  1110. while true do
  1111. script.Parent.Transparency=1
  1112. wait(12)
  1113. script.Parent.Transparency=.9
  1114. wait(.02)
  1115. script.Parent.Transparency=.8
  1116. wait(.02)
  1117. script.Parent.Transparency=.7
  1118. wait(.02)
  1119. script.Parent.Transparency=.6
  1120. wait(.02)
  1121. script.Parent.Transparency=.5
  1122. wait(.02)
  1123. script.Parent.Transparency=.6
  1124. wait(.02)
  1125. script.Parent.Transparency=.7
  1126. wait(.02)
  1127. script.Parent.Transparency=.8
  1128. wait(.02)
  1129. script.Parent.Transparency=.9
  1130. wait(.02)
  1131. end
  1132. end))
  1133. Tool45.Name = "GravityHammer"
  1134. Tool45.Parent = mas
  1135. Tool45.TextureId = "http://www.roblox.com/asset/?id=1256305"
  1136. Tool45.GripForward = Vector3.new(-1, -0, -0)
  1137. Tool45.GripPos = Vector3.new(0, 0, -3.25)
  1138. Tool45.GripRight = Vector3.new(0, 1, 0)
  1139. Tool45.GripUp = Vector3.new(0, 0, 1)
  1140. Part46.Name = "Handle"
  1141. Part46.Parent = Tool45
  1142. Part46.BrickColor = BrickColor.new("Dark stone grey")
  1143. Part46.Reflectance = 0.40000000596046
  1144. Part46.Rotation = Vector3.new(0.049999997, -39.9899979, -90.4499969)
  1145. Part46.FormFactor = Enum.FormFactor.Plate
  1146. Part46.Size = Vector3.new(1, 0.800000012, 10)
  1147. Part46.CFrame = CFrame.new(-67.2475739, 99.2972641, 578.133911, -0.00603066897, 0.766138911, -0.64264679, -0.999964714, -0.00838722941, -0.000615152472, -0.00586126279, 0.642620385, 0.766162395)
  1148. Part46.BottomSurface = Enum.SurfaceType.Smooth
  1149. Part46.TopSurface = Enum.SurfaceType.Smooth
  1150. Part46.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1151. Part46.Position = Vector3.new(-67.2475739, 99.2972641, 578.133911)
  1152. Part46.Orientation = Vector3.new(0.0399999991, -39.9899979, -90.4799957)
  1153. Part46.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1154. SpecialMesh47.Parent = Part46
  1155. SpecialMesh47.MeshId = "http://www.roblox.com/asset/?id=1256290"
  1156. SpecialMesh47.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  1157. SpecialMesh47.TextureId = "http://www.roblox.com/asset/?id=1256283"
  1158. SpecialMesh47.VertexColor = Vector3.new(1, 1, 1.29999995)
  1159. SpecialMesh47.MeshType = Enum.MeshType.FileMesh
  1160. SpecialMesh47.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  1161. Sound48.Parent = Part46
  1162. Sound48.SoundId = "http://www.roblox.com/asset/?id=1255794"
  1163. Sound48.Volume = 1
  1164. Script49.Name = "GravityHammerScript"
  1165. Script49.Parent = Tool45
  1166. table.insert(cors,sandbox(Script49,function()
  1167. --Jacob6441443's Gravity Hammer
  1168.  
  1169. r = game:service("RunService")
  1170.  
  1171.  
  1172. local damage = 0
  1173.  
  1174.  
  1175. local slash_damage = 10
  1176. local lunge_damage = 30
  1177.  
  1178. sword = script.Parent.Handle
  1179. Tool = script.Parent
  1180.  
  1181. SlashSound = sword.Sound
  1182.  
  1183. function blow(hit)
  1184. Grip = Tool.Parent["Right Arm"].RightGrip:clone()
  1185. humanoid = hit.Parent:findFirstChild("Humanoid")
  1186. if (humanoid ~= nil and humanoid.Parent.Name == Tool.Parent.Name) then
  1187. return
  1188. end
  1189.  
  1190. if (humanoid ~= nil) then
  1191. print(humanoid.Parent.Name)
  1192. tagHumanoid(humanoid, creator)
  1193. humanoid.Health = humanoid.Health - math.random(80 , 100)
  1194. Gravity(hit)
  1195. wait(0.5)
  1196. untagHumanoid(humanoid)
  1197. UnGlitch(hit)
  1198. else
  1199. explode(hit)
  1200. end
  1201.  
  1202. end
  1203.  
  1204. function UnGlitch(part)
  1205. local Para = part.Parent
  1206. local parts = Para:GetChildren()
  1207. for i = 1, #parts do
  1208. if parts[i]:findFirstChild("- Gravity") ~= nil then
  1209. parts[i]:findFirstChild("- Gravity"):remove()
  1210. print("Fixed("..parts[i].Name..")")
  1211. end
  1212. end
  1213. end
  1214.  
  1215. function propel(part)
  1216. if(part.Anchored) then return end
  1217. direction = (part.Position - Tool.Parent.Torso.Position).unit
  1218. direction = direction + Vector3.new(0,1,0)
  1219. direction = direction * 200
  1220. part.Velocity = part.Velocity + direction
  1221. end
  1222.  
  1223. function Gravity(part)
  1224. local Par = part.Parent
  1225. if Par ~= nil and Par.Name ~= "Workspace" and part.Anchored == false then
  1226. local c = Par:GetChildren()
  1227. for i = 1, #c do
  1228. local Fly = Instance.new("BodyPosition")
  1229. Fly.Name = "- Gravity"
  1230. local Dir = (part.Position - Tool.Parent.Torso.Position).unit
  1231. Dir = Dir + Vector3.new(0, 1, 0)
  1232. Dir = Dir * 200
  1233. Fly.maxForce = Dir
  1234. if c[i].className == "Part" then
  1235. print(c[i].Name)
  1236. Fly.position = c[i].Position * Dir
  1237. Fly.Parent = c[i]
  1238. c[i]:BreakJoints()
  1239. end
  1240. end
  1241. end
  1242. end
  1243.  
  1244.  
  1245. debounce = true
  1246.  
  1247. function explode(part)
  1248.  
  1249. if not debounce then return end
  1250.  
  1251. debounce = false
  1252. direction = (part.Position - Tool.Parent.Torso.Position).unit
  1253. pos = direction * 12 + Tool.Parent.Torso.Position
  1254. explosion = Instance.new("Explosion")
  1255. explosion.BlastRadius = 4
  1256. explosion.BlastPressure = 1
  1257. explosion.Position = pos
  1258. explosion.Parent = game.Workspace
  1259. explosion.Hit:connect(function(part, distance) propel(part) end)
  1260. wait(.1)
  1261. Grip:clone().Parent = Tool.Parent["Right Arm"]
  1262. debounce = true
  1263. end
  1264.  
  1265. function onPlayerBlownUp(part, distance, creator)
  1266.  
  1267. if part.Name == "Head" then
  1268.  
  1269. local humanoid = part.Parent.Humanoid
  1270. tagHumanoid(humanoid, creator)
  1271. end
  1272. end
  1273.  
  1274. function tagHumanoid(humanoid, creator)
  1275. local creator_tag = Instance.new("ObjectValue")
  1276. creator_tag.Value = player
  1277. creator_tag.Name = "creator"
  1278. creator_tag.Parent = humanoid
  1279. end
  1280.  
  1281. function untagHumanoid(humanoid)
  1282. if humanoid ~= nil then
  1283. local tag = humanoid:findFirstChild("creator")
  1284. if tag ~= nil then
  1285. tag.Parent = nil
  1286. end
  1287. end
  1288. end
  1289.  
  1290. function attack()
  1291. SlashSound:play()
  1292. local anim = Instance.new("StringValue")
  1293. anim.Name = "toolanim"
  1294. anim.Value = "Slash"
  1295. anim.Parent = Tool
  1296. end
  1297.  
  1298. function lunge()
  1299. attack()
  1300. force = Instance.new("BodyPosition")
  1301. force.maxForce = Vector3.new(1e+005, 1e+004, 1e+005)
  1302. dir = Tool.Parent.Humanoid.targetPoint
  1303. if((dir - sword.Position).magnitude > 15) then return end
  1304. force.position = dir
  1305. force.Parent = sword
  1306. wait(.25)
  1307. force.Parent = nil
  1308. end
  1309.  
  1310. function swordUp()
  1311. Tool.GripForward = Vector3.new(-1,0,0)
  1312. Tool.GripRight = Vector3.new(0,1,0)
  1313. Tool.GripUp = Vector3.new(0,0,1)
  1314. end
  1315.  
  1316. function swordOut()
  1317. Tool.GripForward = Vector3.new(0,0,1)
  1318. Tool.GripRight = Vector3.new(0,-1,0)
  1319. Tool.GripUp = Vector3.new(-1,0,0)
  1320. end
  1321.  
  1322. function swordAcross()
  1323.  
  1324. end
  1325.  
  1326.  
  1327. Tool.Enabled = true
  1328. local last_attack = 0
  1329. function onActivated()
  1330.  
  1331. if not Tool.Enabled then
  1332. return
  1333. end
  1334.  
  1335. Tool.Enabled = false
  1336.  
  1337. local character = Tool.Parent;
  1338. local humanoid = character.Humanoid
  1339. if humanoid == nil then
  1340. print("Humanoid not found")
  1341. return
  1342. end
  1343.  
  1344. t = r.Stepped:wait()
  1345. connection = sword.Touched:connect(blow)
  1346. lunge()
  1347.  
  1348. wait(.4)
  1349. connection:disconnect()
  1350. last_attack = t
  1351. Tool.Enabled = true
  1352.  
  1353.  
  1354. end
  1355. script.Parent.Activated:connect(onActivated)
  1356.  
  1357. end))
  1358. LocalScript50.Name = "Local Gui"
  1359. LocalScript50.Parent = Tool45
  1360. table.insert(cors,sandbox(LocalScript50,function()
  1361. local Tool = script.Parent;
  1362.  
  1363. enabled = true
  1364. function onButton1Down(mouse)
  1365. if not enabled then
  1366. return
  1367. end
  1368.  
  1369. enabled = false
  1370. mouse.Icon ="http://www.roblox.com/asset/?id=1981212"
  1371.  
  1372. wait(7)
  1373. mouse.Icon ="http://www.roblox.com/asset/?id=1981212"
  1374. enabled = true
  1375.  
  1376. end
  1377.  
  1378. function onEquippedLocal(mouse)
  1379.  
  1380. if mouse == nil then
  1381. print("Mouse not found")
  1382. return
  1383. end
  1384. mouse.Icon ="http://www.roblox.com/asset/?id=1981212"
  1385. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  1386. local Class = Tool.Parent:findFirstChild("Class Define")
  1387. local Hammer = Tool.Parent:findFirstChild("Hammer")
  1388. if Class ~= nil and Hammer ~= nil then
  1389. local GravHand = Hammer.Handle
  1390. local ClaHand = Class.Handle
  1391. if GravHand.Transparency == 0 and ClaHand.Transparency == 1 then
  1392. GravHand.Transparency = 1
  1393. ClaHand.Transparency = 0
  1394. end
  1395. end
  1396. end
  1397.  
  1398.  
  1399.  
  1400.  
  1401. Tool.Equipped:connect(onEquippedLocal)
  1402.  
  1403.  
  1404. end))
  1405. for i,v in pairs(mas:GetChildren()) do
  1406. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  1407. pcall(function() v:MakeJoints() end)
  1408. end
  1409. mas:Destroy()
  1410. for i,v in pairs(cors) do
  1411. spawn(function()
  1412. pcall(v)
  1413. end)
  1414. end
Add Comment
Please, Sign In to add comment