Advertisement
Liu-2

Shinra Tensei - [ Roblox ]

Jul 1st, 2019
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.35 KB | None | 0 0
  1. --- [[ Shinra Tensei remake ]] ---
  2. -- by fo43123
  3.  
  4. local me = game.Players.LocalPlayer
  5. local mouse = me:GetMouse()
  6. local char = me.Character
  7. local hum = char['Humanoid']
  8. local hd = char['Head']
  9. local ts = char['Torso']
  10. local ra = char['Right Arm']
  11. local la = char['Left Arm']
  12. local rl = char['Right Leg']
  13. local ll = char['Left Leg']
  14. local root = char['HumanoidRootPart']
  15. local rj = root['RootJoint']
  16. local rs = ts['Right Shoulder']
  17. local ls = ts['Left Shoulder']
  18. local rh = ts['Right Hip']
  19. local lh = ts['Left Hip']
  20. local nk = ts['Neck']
  21. local anim = char:FindFirstChild('Animate')
  22. local hitsounds = {'703633905', '264486467', '356551938'}
  23. local base = workspace:FindFirstChild('Baseplate') or workspace:FindFirstChild('Base')
  24. local sine = 0
  25. local fall = 0
  26. local fall2 = 0
  27. local change = 1
  28. local attack = false
  29. local cc = workspace.CurrentCamera
  30. local cos = math.cos
  31. local sin = math.sin
  32. local rad = math.rad
  33. local rand = math.random
  34. local cfn = CFrame.new
  35. local cfa = CFrame.Angles
  36. local v3 = Vector3.new
  37. hum.WalkSpeed = 23
  38. print('R - Activate')
  39.  
  40. ArtificialHB = Instance.new('BindableEvent', script)
  41. ArtificialHB.Name = 'Heartbeat'
  42. script:WaitForChild('Heartbeat')
  43.  
  44. frame = 1 / 60
  45. tf = 0
  46. allowframeloss = false
  47. tossremainder = false
  48. lastframe = tick()
  49. script.Heartbeat:Fire()
  50.  
  51. game:GetService('RunService').Heartbeat:connect(function(s, p)
  52.     tf = tf + s
  53.     if tf >= frame then
  54.         if allowframeloss then
  55.             script.Heartbeat:Fire()
  56.             lastframe = tick()
  57.         else
  58.             for i = 1, math.floor(tf / frame) do
  59.                 script.Heartbeat:Fire()
  60.             end
  61.             lastframe = tick()
  62.         end
  63.         if tossremainder then
  64.             tf = 0
  65.         else
  66.             tf = tf - frame * math.floor(tf / frame)
  67.         end
  68.     end
  69. end)
  70.  
  71. function swait(t)
  72.     if t == 0 or t == nil then
  73.         script.Heartbeat.Event:Wait()
  74.     else
  75.         for i = 0, t do
  76.             script.Heartbeat.Event:Wait()
  77.         end
  78.     end
  79. end
  80.  
  81. function sound(id, parent, volume, pitch, timepos, loop, name)
  82.     local s = Instance.new('Sound')
  83.     s.Parent = parent
  84.     s.SoundId = 'rbxassetid://'..id
  85.     s.Volume = volume
  86.     s.Name = name
  87.     s.PlaybackSpeed = pitch
  88.     s.Looped = loop
  89.     s.TimePosition = timepos
  90.     s:Play()
  91. end
  92.  
  93. function camshake(duration, intensity)
  94.     coroutine.wrap(function()
  95.         for i = 1, duration do
  96.             hum.CameraOffset = hum.CameraOffset:lerp(v3(rand(-1, 1), rand(-1, 1), rand(-1, 1)), 0.1 * intensity)
  97.             swait()
  98.         end
  99.         hum.CameraOffset = v3(0, 0, 0)
  100.     end)()
  101. end
  102.  
  103. function tensei()
  104.     attack = true
  105.     local rightarmlerp = Instance.new('ManualWeld', ts)
  106.     rightarmlerp.Part0 = root
  107.     rightarmlerp.Part1 = ra
  108.     rightarmlerp.C0 = cfn(1.5, 0, 0) * cfa(rad(0), rad(0), rad(0))
  109.     local leftarmlerp = Instance.new('ManualWeld', ts)
  110.     leftarmlerp.Part0 = root
  111.     leftarmlerp.Part1 = la
  112.     leftarmlerp.C0 = cfn(-1.5, 0, 0) * cfa(rad(0), rad(0), rad(0))
  113.     local headlerp = Instance.new('ManualWeld', ts)
  114.     headlerp.Part0 = root
  115.     headlerp.Part1 = hd
  116.     headlerp.C0 = cfn(0, 1.5, 0) * cfa(rad(0), rad(0), rad(0))
  117.     local rightleglerp = Instance.new('ManualWeld', ts)
  118.     rightleglerp.Part0 = root
  119.     rightleglerp.Part1 = rl
  120.     rightleglerp.C0 = cfn(0.5, -2, 0) * cfa(rad(0), rad(0), rad(0))
  121.     local leftleglerp = Instance.new('ManualWeld', ts)
  122.     leftleglerp.Part0 = root
  123.     leftleglerp.Part1 = ll
  124.     leftleglerp.C0 = cfn(-0.5, -2, 0) * cfa(rad(0), rad(0), rad(0))
  125.     local torsolerp = Instance.new('ManualWeld', ts)
  126.     torsolerp.Part0 = root
  127.     torsolerp.Part1 = ts
  128.     torsolerp.C0 = cfn(0, 0, 0) * cfa(rad(0), rad(0), rad(0))
  129.     hum.WalkSpeed = 0
  130.     hum.JumpPower = 0
  131.     root.Anchored = true
  132.     sound(1638576136, hd, 10, 1, 4.6, false, 'tensei')
  133.     for i = 1, 35 do
  134.         camshake(10, 0.1)
  135.         torsolerp.C0 = torsolerp.C0:lerp(cfn(0, 0, 0) * cfa(rad(-10), rad(0), rad(0)), 0.1)
  136.         headlerp.C0 = headlerp.C0:lerp(cfn(0, 1.418, -0.424) * cfa(rad(-30), rad(0), rad(0)), 0.1)
  137.         rightarmlerp.C0 = rightarmlerp.C0:lerp(cfn(0.707, 0.161, -0.638) * cfa(rad(60.9), rad(10.2), rad(-60.6)), 0.1)
  138.         leftarmlerp.C0 = leftarmlerp.C0:lerp(cfn(-0.707, 0.161, -0.638) * cfa(rad(60.9), rad(-10.2), rad(60.6)), 0.1)
  139.         rightleglerp.C0 = rightleglerp.C0:lerp(cfn(0.679, -2.056, 0.186) * cfa(rad(-0.15), rad(1.73), rad(9.85)), 0.1)
  140.         leftleglerp.C0 = leftleglerp.C0:lerp(cfn(-0.679, -2.056, 0.186) * cfa(rad(-0.15), rad(-1.73), rad(-9.85)), 0.1)
  141.         swait()
  142.     end
  143.     local effect = Instance.new('Part', char)
  144.     local fakeeffect = Instance.new('Part', char)
  145.     effect.Material = 'ForceField'
  146.     effect.Transparency = 0
  147.     effect.Anchored = true
  148.     effect.CanCollide = false
  149.     effect.Shape = 'Ball'
  150.     fakeeffect.Anchored = false
  151.     fakeeffect.CanCollide = false
  152.     effect.Size = v3(0, 0, 0)
  153.     fakeeffect.Shape = 'Ball'
  154.     fakeeffect.Material = 'Glass'
  155.     fakeeffect.Size = v3(0, 0, 0)
  156.     fakeeffect.Transparency = 1
  157.     fakeeffect.Touched:connect(function(hit)
  158.         if hit.Parent then
  159.             if not hit:IsDescendantOf(char) and hit ~= base then
  160.                 local bv = Instance.new('BodyVelocity', hit)
  161.                 hit.Anchored = false
  162.                 bv.MaxForce = v3(math.huge, math.huge, math.huge)
  163.                 bv.Velocity = cfn(effect.Position, hit.Position).lookVector*500
  164.                 hit:BreakJoints()
  165.                 game.Debris:AddItem(bv, 0.1)
  166.             end
  167.         end
  168.     end)
  169.     for i = 1, 2000 do
  170.         camshake(10, 3)
  171.         fakeeffect.CFrame = ts.CFrame
  172.         effect.CFrame = ts.CFrame
  173.         torsolerp.C0 = torsolerp.C0:lerp(cfn(0, 0, 0) * cfa(rad(20), rad(0), rad(0)), 0.2)
  174.         headlerp.C0 = headlerp.C0:lerp(cfn(0, 1.373, 0.592) * cfa(rad(30), rad(0), rad(0)), 0.15)
  175.         rightarmlerp.C0 = rightarmlerp.C0:lerp(cfn(1.992, 0.274, 0.283) * cfa(rad(27.6), rad(-12.9), rad(85.6)), 0.2)
  176.         leftarmlerp.C0 = leftarmlerp.C0:lerp(cfn(-1.992, 0.274, 0.283) * cfa(rad(27.6), rad(12.9), rad(-85.6)), 0.2)
  177.         rightleglerp.C0 = rightleglerp.C0:lerp(cfn(0.689, -2.01, -0.429) * cfa(rad(1.7), rad(-9.8), rad(9.8)), 0.2)
  178.         leftleglerp.C0 = leftleglerp.C0:lerp(cfn(-0.689, -2.01, -0.429) * cfa(rad(1.7), rad(9.8), rad(-9.8)), 0.2)
  179.         effect.Size = effect.Size:Lerp(v3(2000, 2000, 2000), 0.00025)
  180.         fakeeffect.Size = fakeeffect.Size:Lerp(v3(2000, 2000, 2000), 0.00025)
  181.         swait()
  182.     end
  183.     fakeeffect:Destroy()
  184.     effect:Destroy()
  185.     for _,v in pairs(hd:GetChildren()) do
  186.         if v:IsA('Sound') then
  187.             if v.Name == 'tensei' then
  188.                 v.Parent = nil
  189.             end
  190.         end
  191.     end
  192.     for _,v in pairs(ts:GetChildren()) do
  193.         if v:IsA('ManualWeld') then
  194.             v.Parent = nil
  195.         end
  196.     end
  197.     root.Anchored = false
  198.     hum.WalkSpeed = 23
  199.     hum.JumpPower = 50
  200.     wait(1)
  201.     attack = false
  202. end
  203.  
  204. mouse.KeyDown:connect(function(key)
  205.     if string.lower(key) == 'r' and attack == false then
  206.         tensei()
  207.     end
  208. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement