Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. wait()
  2.  
  3. local charge_time = 2
  4. local recharge_time = 0
  5.  
  6. local player = game.Players.LocalPlayer
  7. while player.Character == nil do wait() end
  8. local char = player.Character
  9. local mouse = player:GetMouse()
  10. local camera = game.Workspace.CurrentCamera
  11.  
  12.  
  13. while script:FindFirstChild("HakiGui") == nil do wait() end
  14. local hakiui = script.HakiGui
  15. local rusheffect = hakiui.RushEffect
  16. local blureffect = hakiui.BlurEffect
  17.  
  18. local sound_zoom = script.HakiGui.ZoomSound
  19. -- 154021016
  20.  
  21. local db = false
  22. local keydown = false
  23. local slowdown = nil
  24. local counter = 0
  25.  
  26.  
  27.  
  28. function zoomTweenTo(tweento, tweentime, doeffect)
  29. local divider = 20*(tweentime/10)
  30. for i2 = 1, tweentime*10 do
  31. camera.FieldOfView = camera.FieldOfView + (tweento - camera.FieldOfView)/divider
  32. wait(0.03)
  33. end
  34. end
  35.  
  36. function burstEffect(effecttime)
  37. rusheffect.Visible = true
  38. rusheffect.ImageTransparency = 0
  39. local fadecue = (effecttime*10)*0.7
  40. for i3 = 1, effecttime * 10 do
  41. wait(0.1)
  42. rusheffect.Rotation = math.random(-180, 180)
  43. if i3 > fadecue then
  44. rusheffect.ImageTransparency = rusheffect.ImageTransparency + 0.15
  45. end
  46. end
  47. rusheffect.Visible = false
  48. end
  49.  
  50. local charged = false
  51. local onhaki = 0
  52. mouse.KeyDown:connect(function(key)
  53. if key == "h" then
  54. if char == nil then return end
  55. local hum = char:FindFirstChild("Humanoid")
  56. if hum == nil then return end
  57. if hum.Health <= 0 then return end
  58. if not db then
  59. db = true
  60. keydown = true
  61. charged = false
  62. sound_zoom:Play()
  63. if hum:FindFirstChild("Effects") ~= nil then
  64. slowdown = Instance.new("IntValue")
  65. slowdown.Name = "Speed"
  66. slowdown.Value = -9
  67. slowdown.Parent = hum:FindFirstChild("Effects")
  68. end
  69. rusheffect.ImageTransparency = 1
  70. rusheffect.Visible = true
  71. for i1 = 1, charge_time*30 do
  72. if keydown then
  73. wait(0.03)
  74. camera.FieldOfView = camera.FieldOfView - i1/(charge_time*20)
  75. rusheffect.ImageTransparency = rusheffect.ImageTransparency + (0 - rusheffect.ImageTransparency)/30
  76. if counter == 4 then
  77. rusheffect.Rotation = math.random(-180, 180)
  78. counter = 0
  79. else
  80. counter = counter + 1
  81. end
  82. end
  83. end
  84. rusheffect.Visible = false
  85. if slowdown ~= nil then
  86. slowdown:Destroy()
  87. end
  88. if keydown then
  89. charged = true
  90. coroutine.resume(coroutine.create(function()
  91. burstEffect(2)
  92. end))
  93. coroutine.resume(coroutine.create(function()
  94. zoomTweenTo(100, 7)
  95. zoomTweenTo(70, 13)
  96. end))
  97. script.Haki:FireServer()
  98. wait(recharge_time)
  99. else
  100. sound_zoom:Stop()
  101. zoomTweenTo(70, 2.5)
  102. end
  103. camera.FieldOfView = 70
  104. db = false
  105. end
  106. end
  107. end)
  108. mouse.KeyUp:connect(function(key)
  109. if key == "h" then
  110. keydown = false
  111. if charged == false then -- tapped
  112.  
  113. script.TapHaki:FireServer()
  114.  
  115. local sound_blast = Instance.new("Sound")
  116. sound_blast.Name = "BlastSound"
  117. sound_blast.SoundId = "rbxassetid://130780020"--180516125, 180516545
  118. sound_blast.Pitch = 3
  119. sound_blast.Volume = 0.1
  120. sound_blast.Parent = player.Character.Torso
  121. sound_blast:Play()
  122. game.Debris:AddItem(sound_blast,3)
  123.  
  124. coroutine.resume(coroutine.create(function()
  125. burstEffect(0.5)
  126. end))
  127. end
  128.  
  129. end
  130. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement