Advertisement
Finnegan5

Trail R6 Version

Sep 6th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.90 KB | None | 0 0
  1. wait(1 / 60)
  2. -- Trail Made by Gallizur
  3. --R15 Compatible in TrailSettings
  4. local Player = game:GetService('Players').LocalPlayer
  5. repeat wait() until Player.Character
  6. local Character = Player.Character
  7.  
  8. --All The Settings for Trails in this Script
  9. TrailSettings = {
  10. Lifetime = 0.5,
  11. Texture = 'rbxassetid://31270182',
  12. --Color1 is for UpperBody and Accessories, Color2 is for Lower Body
  13. Color1 = ColorSequence.new(BrickColor.new('Really red').Color,BrickColor.new('Crimson').Color),
  14. Color2 = ColorSequence.new(BrickColor.new('Bright red').Color,BrickColor.new('Maroon').Color),
  15. AllBody = true,
  16. UpperBodyOnly = false,
  17. LowerBodyOnly = false,
  18. Accessories = false,
  19. Extras = true,
  20. R15 = false, --Change to true if you're using R15
  21. R15Parts = {
  22. 'UpperTorso',
  23. 'LowerTorso',
  24. }
  25. }
  26.  
  27. local Trail; --Making other Trails uses this in this Script
  28.  
  29. --UpperBody Function
  30. UpperBody = function()
  31. if TrailSettings.R15 == false then
  32. A0 = Instance.new('Attachment',Character.Torso)
  33. A1 = Instance.new('Attachment',Character.Head)
  34. A2 = Instance.new('Attachment',Character['Right Arm'])
  35. A3 = Instance.new('Attachment',Character['Left Arm'])
  36. Trail = Instance.new('Trail',Character)
  37. Trail.Attachment0 = A0
  38. Trail.Attachment1 = A1
  39. Trail.Texture = TrailSettings.Texture
  40. Trail.Color = TrailSettings.Color1
  41. Trail.Lifetime = TrailSettings.Lifetime
  42. local Trail2 = Trail:Clone()
  43. Trail2.Parent = Character
  44. Trail2.Attachment1 = A2
  45. local Trail3 = Trail:Clone()
  46. Trail3.Parent = Character
  47. Trail3.Attachment1 = A3
  48. local Trail6 = Trail:Clone()
  49. Trail6.Parent = Character
  50. Trail6.Attachment0 = A1
  51. Trail6.Attachment1 = A2
  52. local Trail7 = Trail:Clone()
  53. Trail7.Parent = Character
  54. Trail7.Attachment0 = A1
  55. Trail7.Attachment1 = A3
  56. else
  57. A0 = Instance.new('Attachment',Character[TrailSettings.R15Parts[1]])
  58. A0R = Instance.new('Attachment',Character[TrailSettings.R15Parts[2]])
  59. A1 = Instance.new('Attachment',Character.Head)
  60. A2 = Instance.new('Attachment',Character['RightUpperArm'])
  61. A2R = Instance.new('Attachment',Character['RightLowerArm'])
  62. A3 = Instance.new('Attachment',Character['LeftUpperArm'])
  63. A3R = Instance.new('Attachment',Character['LeftLowerArm'])
  64. Trail = Instance.new('Trail',Character)
  65. Trail.Attachment0 = A0
  66. Trail.Attachment1 = A1
  67. Trail.Texture = TrailSettings.Texture
  68. Trail.Color = TrailSettings.Color1
  69. Trail.Lifetime = TrailSettings.Lifetime
  70. local Trail2 = Trail:Clone()
  71. Trail2.Parent = Character
  72. Trail2.Attachment1 = A2
  73. local Trail3 = Trail:Clone()
  74. Trail3.Parent = Character
  75. Trail3.Attachment1 = A3
  76. local Trail6 = Trail:Clone()
  77. Trail6.Parent = Character
  78. Trail6.Attachment0 = A1
  79. Trail6.Attachment1 = A2
  80. local Trail7 = Trail:Clone()
  81. Trail7.Parent = Character
  82. Trail7.Attachment0 = A1
  83. Trail7.Attachment1 = A3
  84. --R15 Trails
  85. local Trail1R = Trail:Clone()
  86. Trail1R.Parent = Character
  87. Trail1R.Attachment1 = A2R
  88. local Trail2R = Trail:Clone()
  89. Trail2R.Parent = Character
  90. Trail2R.Attachment1 = A3R
  91. local Trail6R = Trail:Clone()
  92. Trail6.Parent = Character
  93. Trail6.Attachment0 = A1
  94. Trail6.Attachment1 = A2R
  95. local Trail7R = Trail:Clone()
  96. Trail7.Parent = Character
  97. Trail7.Attachment0 = A1
  98. Trail7.Attachment1 = A3R
  99. end
  100. end
  101.  
  102. --Lower Body Function
  103. LowerBody = function()
  104. if TrailSettings.R15 == false then
  105. A4 = Instance.new('Attachment',Character['Right Leg'])
  106. A5 = Instance.new('Attachment',Character['Left Leg'])
  107. local Trail4 = Trail:Clone()
  108. Trail4.Parent = Character
  109. Trail4.Attachment1 = A4
  110. local Trail5 = Trail:Clone()
  111. Trail5.Parent = Character
  112. Trail5.Attachment1 = A5
  113. local Trail8 = Trail:Clone()
  114. Trail8.Parent = Character
  115. Trail8.Attachment0 = A2
  116. Trail8.Attachment1 = A4
  117. Trail8.Color = TrailSettings.Color2
  118. local Trail9 = Trail:Clone()
  119. Trail9.Parent = Character
  120. Trail9.Attachment0 = A3
  121. Trail9.Attachment1 = A5
  122. Trail9.Color = TrailSettings.Color2
  123. local FT = Trail:Clone()
  124. FT.Parent = Character
  125. FT.Attachment0 = A4
  126. FT.Attachment1 = A5
  127. FT.Color = TrailSettings.Color2
  128. else
  129. A4 = Instance.new('Attachment',Character['RightLowerLeg'])
  130. A4R = Instance.new('Attachment',Character['RightUpperLeg'])
  131. A5 = Instance.new('Attachment',Character['LeftLowerLeg'])
  132. A5R = Instance.new('Attachment',Character['LeftUpperLeg'])
  133. local Trail4 = Trail:Clone()
  134. Trail4.Parent = Character
  135. Trail4.Attachment1 = A4
  136. local Trail5 = Trail:Clone()
  137. Trail5.Parent = Character
  138. Trail5.Attachment1 = A5
  139. local Trail8 = Trail:Clone()
  140. Trail8.Parent = Character
  141. Trail8.Attachment0 = A2
  142. Trail8.Attachment1 = A4
  143. Trail8.Color = TrailSettings.Color2
  144. local Trail9 = Trail:Clone()
  145. Trail9.Parent = Character
  146. Trail9.Attachment0 = A3
  147. Trail9.Attachment1 = A5
  148. Trail9.Color = TrailSettings.Color2
  149. local FT = Trail:Clone()
  150. FT.Parent = Character
  151. FT.Attachment0 = A4
  152. FT.Attachment1 = A5
  153. FT.Color = TrailSettings.Color2
  154. --R15 Trails
  155. local Trail3R = Trail:Clone()
  156. Trail3R.Parent = Character
  157. Trail3R.Attachment1 = A4R
  158. local Trail4R = Trail:Clone()
  159. Trail4R.Parent = Character
  160. Trail4R.Attachment1 = A5R
  161. local Trail8 = Trail:Clone()
  162. Trail8.Parent = Character
  163. Trail8.Attachment0 = A2R
  164. Trail8.Attachment1 = A4R
  165. Trail8.Color = TrailSettings.Color2
  166. local Trail9 = Trail:Clone()
  167. Trail9.Parent = Character
  168. Trail9.Attachment0 = A3R
  169. Trail9.Attachment1 = A5R
  170. Trail9.Color = TrailSettings.Color2
  171. local FT2R = Trail:Clone()
  172. FT2R.Parent = Character
  173. FT2R.Attachment0 = A4R
  174. FT2R.Attachment1 = A5R
  175. FT2R.Color = TrailSettings.Color2
  176. end
  177. end
  178.  
  179. --All Body Function calling Both Functions
  180. AllBody = function()
  181. UpperBody()
  182. LowerBody()
  183. end
  184.  
  185. --Checking to make sure that Only some Variables are Selected else do All Body
  186. if TrailSettings.AllBody == true and TrailSettings.UpperBodyOnly == true and TrailSettings.LowerBodyOnly == true then
  187. TrailSettings.UpperBodyOnly = false
  188. TrailSettings.LowerBodyOnly = false
  189. elseif TrailSettings.AllBody == true and TrailSettings.UpperBodyOnly == false and TrailSettings.LowerBodyOnly == true then
  190. TrailSettings.UpperBodyOnly = false
  191. TrailSettings.LowerBodyOnly = false
  192. elseif TrailSettings.AllBody == true and TrailSettings.UpperBodyOnly == true and TrailSettings.LowerBodyOnly == false then
  193. TrailSettings.UpperBodyOnly = false
  194. TrailSettings.LowerBodyOnly = false
  195. elseif TrailSettings.AllBody == false and TrailSettings.UpperBodyOnly == true and TrailSettings.LowerBodyOnly == true then
  196. TrailSettings.AllBody = true
  197. TrailSettings.UpperBodyOnly = false
  198. TrailSettings.LowerBodyOnly = false
  199. end
  200.  
  201. --Call Trail Functions
  202. if TrailSettings.UpperBodyOnly == true then
  203. UpperBody()
  204. print('Called Upper Body Trail')
  205. elseif TrailSettings.LowerBodyOnly == true then
  206. LowerBody()
  207. print('Called Lower Body Trail')
  208. elseif TrailSettings.AllBody == true then
  209. AllBody()
  210. print('Called Full Body Trail')
  211. end
  212.  
  213. --Trails for Accessories
  214. if TrailSettings.Accessories == true then
  215. for Index,Item in pairs(Character:GetChildren()) do
  216. if Item:IsA'Accessory' then
  217. local AA = Instance.new('Attachment',Item.Handle)
  218. local ATrail = Trail:Clone()
  219. ATrail.Parent = Character
  220. ATrail.Attachment1 = AA
  221. end
  222. end
  223. end
  224.  
  225. --Extras
  226. if TrailSettings.Extras == true then
  227. --Making an Invisible Platform Part
  228. local a = Instance.new('Part',Character)
  229. a.CanCollide = false
  230. a.Size = Vector3.new(2,.2,2)
  231. a.Transparency = 1
  232.  
  233. --Constantly putting it under your feet
  234. if TrailSettings.R15 == false then
  235. spawn(function()
  236. game:GetService('RunService').RenderStepped:connect(function()
  237. a.CFrame = Character.Torso.CFrame * CFrame.new(0,-3,0)
  238. end)
  239. end)
  240. else
  241. spawn(function()
  242. game:GetService('RunService').RenderStepped:connect(function()
  243. a.CFrame = Character[TrailSettings.R15Parts[2]].CFrame * CFrame.new(0,-2,0)
  244. end)
  245. end)
  246. end
  247.  
  248. --Make a Trail from both feet to the Platform
  249. spawn(function()
  250. repeat wait() until Trail
  251. local AB = Instance.new('Attachment',a)
  252. local ABT = Trail:Clone()
  253. ABT.Parent = Character
  254. ABT.Attachment0 = A4
  255. ABT.Attachment1 = AB
  256. ABT.Color = TrailSettings.Color2
  257. local ABT2 = Trail:Clone()
  258. ABT2.Parent = Character
  259. ABT2.Attachment0 = A5
  260. ABT2.Attachment1 = AB
  261. ABT2.Color = TrailSettings.Color2
  262. end)
  263. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement