Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait()
- local charge_time = 2
- local recharge_time = 0
- local player = game.Players.LocalPlayer
- while player.Character == nil do wait() end
- local char = player.Character
- local mouse = player:GetMouse()
- local camera = game.Workspace.CurrentCamera
- while script:FindFirstChild("HakiGui") == nil do wait() end
- local hakiui = script.HakiGui
- local rusheffect = hakiui.RushEffect
- local blureffect = hakiui.BlurEffect
- local sound_zoom = script.HakiGui.ZoomSound
- -- 154021016
- local db = false
- local keydown = false
- local slowdown = nil
- local counter = 0
- function zoomTweenTo(tweento, tweentime, doeffect)
- local divider = 20*(tweentime/10)
- for i2 = 1, tweentime*10 do
- camera.FieldOfView = camera.FieldOfView + (tweento - camera.FieldOfView)/divider
- wait(0.03)
- end
- end
- function burstEffect(effecttime)
- rusheffect.Visible = true
- rusheffect.ImageTransparency = 0
- local fadecue = (effecttime*10)*0.7
- for i3 = 1, effecttime * 10 do
- wait(0.1)
- rusheffect.Rotation = math.random(-180, 180)
- if i3 > fadecue then
- rusheffect.ImageTransparency = rusheffect.ImageTransparency + 0.15
- end
- end
- rusheffect.Visible = false
- end
- local charged = false
- local onhaki = 0
- mouse.KeyDown:connect(function(key)
- if key == "h" then
- if char == nil then return end
- local hum = char:FindFirstChild("Humanoid")
- if hum == nil then return end
- if hum.Health <= 0 then return end
- if not db then
- db = true
- keydown = true
- charged = false
- sound_zoom:Play()
- if hum:FindFirstChild("Effects") ~= nil then
- slowdown = Instance.new("IntValue")
- slowdown.Name = "Speed"
- slowdown.Value = -9
- slowdown.Parent = hum:FindFirstChild("Effects")
- end
- rusheffect.ImageTransparency = 1
- rusheffect.Visible = true
- for i1 = 1, charge_time*30 do
- if keydown then
- wait(0.03)
- camera.FieldOfView = camera.FieldOfView - i1/(charge_time*20)
- rusheffect.ImageTransparency = rusheffect.ImageTransparency + (0 - rusheffect.ImageTransparency)/30
- if counter == 4 then
- rusheffect.Rotation = math.random(-180, 180)
- counter = 0
- else
- counter = counter + 1
- end
- end
- end
- rusheffect.Visible = false
- if slowdown ~= nil then
- slowdown:Destroy()
- end
- if keydown then
- charged = true
- coroutine.resume(coroutine.create(function()
- burstEffect(2)
- end))
- coroutine.resume(coroutine.create(function()
- zoomTweenTo(100, 7)
- zoomTweenTo(70, 13)
- end))
- script.Haki:FireServer()
- wait(recharge_time)
- else
- sound_zoom:Stop()
- zoomTweenTo(70, 2.5)
- end
- camera.FieldOfView = 70
- db = false
- end
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key == "h" then
- keydown = false
- if charged == false then -- tapped
- script.TapHaki:FireServer()
- local sound_blast = Instance.new("Sound")
- sound_blast.Name = "BlastSound"
- sound_blast.SoundId = "rbxassetid://130780020"--180516125, 180516545
- sound_blast.Pitch = 3
- sound_blast.Volume = 0.1
- sound_blast.Parent = player.Character.Torso
- sound_blast:Play()
- game.Debris:AddItem(sound_blast,3)
- coroutine.resume(coroutine.create(function()
- burstEffect(0.5)
- end))
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement