Advertisement
Pukaciu

trailtest

Aug 31st, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. repeat
  3. wait(0.4)
  4. until plr.Character
  5. chr = plr.Character
  6. human = chr:FindFirstChild("Humanoid")
  7. mouse = plr:GetMouse()
  8. cam = workspace.CurrentCamera
  9. selected = false
  10. equipd = false
  11. tors = chr.Torso
  12. rarm = chr["Right Arm"]
  13. larm = chr["Left Arm"]
  14. rleg = chr["Right Leg"]
  15. lleg = chr["Left Leg"]
  16. hrp = chr.HumanoidRootPart
  17. hed = chr.Head
  18. anim = human.Animator
  19. activu = false
  20. ragged = false
  21. batting = false
  22. Heartbeat = Instance.new("BindableEvent")
  23. Heartbeat.Name = "Heartbeat"
  24. Heartbeat.Parent = script
  25. Music = false
  26. Berserk = false
  27. Combo = 1
  28. frame = 0.03333333333333333
  29. tf = 0
  30. Maedl = Instance.new("Model",chr)
  31. local ColorsArray = {ColorSequenceKeypoint.new(0, Color3.new(0,1,0)),
  32. ColorSequenceKeypoint.new(0.16, Color3.new(0,1,0)),
  33. ColorSequenceKeypoint.new(0.32, Color3.new(0,1,0)),
  34. ColorSequenceKeypoint.new(0.48, Color3.new(0.5,1,0)),
  35. ColorSequenceKeypoint.new(0.64, Color3.new(0.5,1,0)),
  36. ColorSequenceKeypoint.new(0.80, Color3.new(0.5,1,0)),
  37. ColorSequenceKeypoint.new(0.96, Color3.new(0.5,1,0)),
  38. ColorSequenceKeypoint.new(1, Color3.new(0.5,1,0))}
  39. local fire = Instance.new("ParticleEmitter", tors)
  40. fire.Enabled = false
  41. fire.Lifetime = NumberRange.new(1.5)
  42. fire.RotSpeed = NumberRange.new(10)
  43. fire.Rate = 250
  44. fire.VelocitySpread = 360
  45. fire.Speed = NumberRange.new(2,8)
  46. fire.Rotation = NumberRange.new(151515)
  47. fire.Name = "Fire"
  48. fire.LightEmission = 0.78
  49. fire.Texture = "http://www.roblox.com/asset/?id=280516525"
  50. fire.Color = ColorSequence.new(ColorsArray)
  51. fire.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 6), NumberSequenceKeypoint.new(1, 0)})
  52. fire.ZOffset = 3
  53.  
  54. function Lightningz(pos, pos2, radius, numParts, model, removalTime)
  55. radius = radius or 0.2
  56. numParts = numParts or 10
  57. model = model or game.Workspace
  58. local pos = pos
  59. local lastpos = lastpos
  60. local lv = CFrame.new(pos,pos2).lookVector
  61. removalTime = 0.001
  62. local dist = (pos-pos2).magnitude
  63. local trans = 0
  64. local color = BrickColor.new("Lime green")
  65. local dbp = dist/numParts
  66. local last = pos
  67. for i = 1,numParts do
  68. local p = Instance.new("Part")
  69. p.FormFactor = "Custom"
  70. p.Size = Vector3.new(1,1,1)
  71. p.CanCollide = false
  72. p.Transparency = trans
  73. p.Anchored = true
  74. p.BrickColor = color
  75. p.Material = "Neon"
  76. local x = math.random(-100,100)/100*dbp*4
  77. local y = math.random(-100,100)/100*dbp*4
  78. local p2 = CFrame.new(pos+lv*(i*dbp),pos2+lv)*CFrame.new(x,y,0)
  79. local dist2 = (p2.p-last).magnitude
  80. local mid = (p2.p+last)/2
  81. local m = Instance.new("BlockMesh",p)
  82. m.Scale = Vector3.new(radius,radius,dist2 + (radius/4))
  83. p.CFrame = CFrame.new(mid,p2.p)
  84. last = p2.p
  85. p.Parent = model
  86. game.Debris:AddItem(p, 0.05)
  87. end
  88. if model ~= game.Workspace then
  89. game.Debris:AddItem(model, 0)
  90. end
  91. end
  92.  
  93. function Lightningz2(pos, pos2, radius, numParts, model, removalTime)
  94. radius = radius or 0.2
  95. numParts = numParts or 10
  96. model = model or game.Workspace
  97. local pos = pos
  98. local lastpos = lastpos
  99. local lv = CFrame.new(pos,pos2).lookVector
  100. removalTime = 0.001
  101. local dist = (pos-pos2).magnitude
  102. local trans = 0
  103. local color = BrickColor.new("Toothpaste")
  104. local dbp = dist/numParts
  105. local last = pos
  106. for i = 1,numParts do
  107. local p = Instance.new("Part")
  108. p.FormFactor = "Custom"
  109. p.Size = Vector3.new(1,1,1)
  110. p.CanCollide = false
  111. p.Transparency = trans
  112. p.Anchored = true
  113. p.BrickColor = color
  114. p.Material = "Neon"
  115. local x = math.random(-100,100)/100*dbp/2
  116. local y = math.random(-100,100)/100*dbp/2
  117. local p2 = CFrame.new(pos+lv*(i*dbp),pos2+lv)*CFrame.new(x,y,0)
  118. local dist2 = (p2.p-last).magnitude
  119. local mid = (p2.p+last)/2
  120. local m = Instance.new("BlockMesh",p)
  121. m.Scale = Vector3.new(radius,radius,dist2 + (radius/4))
  122. p.CFrame = CFrame.new(mid,p2.p)
  123. last = p2.p
  124. p.Parent = model
  125. game.Debris:AddItem(p, 0.05)
  126. end
  127. if model ~= game.Workspace then
  128. game.Debris:AddItem(model, 0)
  129. end
  130. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement