MysteriousL

TransFormtest5

Jul 23rd, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.58 KB | None | 0 0
  1. game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
  2. if string.lower(key) == "x" then
  3. local p = game.Players.LocalPlayer
  4. local char = p.Character
  5. local mouse = p:GetMouse()
  6. local larm = char["Left Arm"]
  7. local rarm = char["Right Arm"]
  8. local lleg = char["Left Leg"]
  9. local rleg = char["Right Leg"]
  10. local hed = char.Head
  11. local torso = char.Torso
  12. local hum = char.Humanoid
  13. local cam = game.Workspace.CurrentCamera
  14. local root = char.HumanoidRootPart
  15.  
  16. z = Instance.new("Sound",hed)
  17. z.SoundId = "rbxassetid://232213955"
  18. z.Pitch = 1
  19. z.Volume = 1
  20.  
  21. local deb = false
  22. local shot = 0
  23. local debris=game:service"Debris"
  24. local l = game:GetService("Lighting")
  25. local rs = game:GetService("RunService").RenderStepped
  26. hum.MaxHealth = math.huge
  27. hum.Health = math.huge
  28. ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
  29. math.randomseed(os.time())
  30. for i,v in pairs (hed:GetChildren()) do
  31. if v:IsA("Sound") then
  32. v:Destroy()
  33. end
  34. end
  35.  
  36.  
  37. Debounces = {
  38. }
  39. ypcall(function()
  40. char.Shirt:Destroy()
  41. char.Pants:Destroy()
  42. shirt = Instance.new("Shirt", char)
  43. shirt.Name = "Shirt"
  44. pants = Instance.new("Pants", char)
  45. pants.Name = "Pants"
  46. char.Shirt.ShirtTemplate = "rbxassetid://268303759"
  47. char.Pants.PantsTemplate = "rbxassetid://268303786"
  48. end)
  49. function lerp(a, b, t) -- Linear interpolation
  50. return a + (b - a)*t
  51. end
  52.  
  53. function slerp(a, b, t) --Spherical interpolation
  54. dot = a:Dot(b)
  55. if dot > 0.99999 or dot < -0.99999 then
  56. return t <= 0.5 and a or b
  57. else
  58. r = math.acos(dot)
  59. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  60. end
  61. end
  62.  
  63. function matrixInterpolate(a, b, t)
  64. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  65. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  66. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  67. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  68. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  69. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  70. local t = v1:Dot(v2)
  71. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  72. return CFrame.new()
  73. end
  74. return CFrame.new(
  75. v0.x, v0.y, v0.z,
  76. v1.x, v1.y, v1.z,
  77. v2.x, v2.y, v2.z,
  78. v3.x, v3.y, v3.z)
  79. end
  80. function Lerp(c1,c2,al)
  81. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  82. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  83. for i,v in pairs(com1) do
  84. com1[i] = v+(com2[i]-v)*al
  85. end
  86. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  87. end
  88.  
  89. local Transforming = true
  90. hum.WalkSpeed = 0
  91. local fx = Instance.new("Part",torso)
  92. fx.Anchored = true
  93. fx.Material = "Neon"
  94. fx.CanCollide = false
  95. fx.Locked = true
  96. fx.Transparency = 1
  97. fx.Material = "SmoothPlastic"
  98. fx.Size = Vector3.new(1,1,1)
  99. fx.TopSurface = "SmoothNoOutlines"
  100. fx.BottomSurface = "SmoothNoOutlines"
  101. fx.BrickColor = BrickColor.new("Really red")
  102. fxm = Instance.new("SpecialMesh",fx)
  103. fxm.MeshId = "http://www.roblox.com/asset/?id=9982590"
  104. fxm.Scale = Vector3.new(1,1,1)
  105. for i = 1, 20 do rs:wait()
  106. fx.Transparency = fx.Transparency - (1/20)
  107. fx.CFrame = torso.CFrame
  108. fxm.Scale = fxm.Scale + Vector3.new(0.5,0.5,0.5)
  109. rs:wait()
  110. end
  111.  
  112. GroundWave1 = function()
  113. local HandCF = CFrame.new(root.Position - Vector3.new(0,3,0)) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  114. local Colors = {"Toothpaste", "Really blue"}
  115. local wave = Instance.new("Part", torso)
  116. wave.BrickColor = BrickColor.new('Really blue')
  117. wave.Anchored = true
  118. wave.CanCollide = false
  119. wave.Locked = true
  120. wave.Size = Vector3.new(1, 1, 1)
  121. wave.TopSurface = "Smooth"
  122. wave.BottomSurface = "Smooth"
  123. wave.Transparency = 0.35
  124. wave.CFrame = HandCF
  125. wm = Instance.new("SpecialMesh", wave)
  126. wm.MeshId = "rbxassetid://3270017"
  127. coroutine.wrap(function()
  128. for i = 1, 30, 1 do
  129. wm.Scale = Vector3.new(10 + i*20.4, 10 + i*20.4, 1)
  130. wave.Size = wm.Scale
  131. wave.CFrame = HandCF
  132. wave.Transparency = i/10
  133. wait()
  134. end
  135. wait()
  136. wave:Destroy()
  137. end)()
  138. end
  139.  
  140. GroundWave = function()
  141. if Transforming == true then
  142. local wave = Instance.new("Part", torso)
  143. wave.BrickColor = BrickColor.new("Really blue")
  144. wave.Anchored = true
  145. wave.CanCollide = false
  146. wave.Locked = true
  147. wave.Size = Vector3.new(1, 1, 1)
  148. wave.TopSurface = "Smooth"
  149. wave.BottomSurface = "Smooth"
  150. wave.Transparency = 0.35
  151. wave.CFrame = fx.CFrame
  152. wm = Instance.new("SpecialMesh", wave)
  153. wm.MeshType = "Sphere"
  154. wm.Scale = Vector3.new(1,1,1)
  155. coroutine.wrap(function()
  156. for i = 1, 18, 1 do
  157. wm.Scale = Vector3.new(8 + i*8, 8 + i*8, 8 + i*8)
  158. --wave.Size = wm.Scale
  159. wave.CFrame = fx.CFrame
  160. wave.Transparency = i/001
  161. wait()
  162. end
  163. wait()
  164. wave:Destroy()
  165. end)()
  166. elseif Transforming == false then
  167. wait()
  168. end
  169. end
  170.  
  171. for i = 1, 100 do rs:wait()
  172. fx.CFrame = torso.CFrame
  173. end
  174.  
  175. Spawn(function()
  176. while wait(1) do
  177. GroundWave()
  178. end
  179. end)
  180.  
  181. wait(4)
  182.  
  183. Transforming = false
  184.  
  185. for i = 1, 20 do rs:wait()
  186. fx.Transparency = fx.Transparency + (1/20)
  187. fx.CFrame = torso.CFrame
  188. fxm.Scale = fxm.Scale + Vector3.new(0.5,0.5,0.5)
  189. rs:wait()
  190. end
  191.  
  192. local HandCF = CFrame.new(root.Position - Vector3.new(0,3,0)) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  193. local wave = Instance.new("Part", torso)
  194. wave.BrickColor = BrickColor.new("Institutional white")
  195. wave.Anchored = true
  196. wave.CanCollide = false
  197. wave.Locked = true
  198. wave.Size = Vector3.new(1, 1, 1)
  199. wave.TopSurface = "Smooth"
  200. wave.BottomSurface = "Smooth"
  201. wave.Transparency = 0.35
  202. wave.CFrame = HandCF
  203. wm = Instance.new("SpecialMesh", wave)
  204. wm.MeshId = "rbxassetid://3270017"
  205. coroutine.wrap(function()
  206. for i = 1, 14, 1 do
  207. wm.Scale = Vector3.new(10 + i*10.1, 10 + i*10.1, 10)
  208. wave.Size = wm.Scale
  209. wave.CFrame = HandCF
  210. wave.Transparency = i/14
  211. wait()
  212. end
  213. wait()
  214. wave:Destroy()
  215. end)()
  216. hum.WalkSpeed = 16
  217. ----------------------------------------------------
  218. Blast = function()
  219. local Colors = {"Toothpaste", "Really blue"}
  220. local wave = Instance.new("Part", torso)
  221. wave.BrickColor = BrickColor.new(Colors[math.random(1,#Colors)])
  222. wave.Anchored = true
  223. wave.CanCollide = false
  224. wave.Locked = true
  225. wave.Size = Vector3.new(1, 1, 1)
  226. wave.TopSurface = "Smooth"
  227. wave.BottomSurface = "Smooth"
  228. wave.Transparency = 0.35
  229. wave.CFrame = rarm.CFrame
  230. wm = Instance.new("SpecialMesh", wave)
  231. wm.MeshType = "Sphere"
  232. wm.Scale = Vector3.new(1,1,1)
  233. z = Instance.new("Sound",wave)
  234. z.SoundId = "rbxassetid://237035051"
  235. z.Volume = 1
  236. z.Pitch = .9
  237. z:Play()
  238. coroutine.wrap(function()
  239. for i = 1, 30, 1 do
  240. wave.Size = Vector3.new(1 + i*4, 1 + i*4, 1 + i*4)
  241. --wave.Size = wm.Scale
  242. wave.CFrame = rarm.CFrame
  243. wave.Transparency = (1/14)
  244. rs:wait()
  245. end
  246. rs:wait()
  247. wave:Destroy()
  248. z:Destroy()
  249. end)()
  250. end
Advertisement
Add Comment
Please, Sign In to add comment