Advertisement
Nico1702

Tentacles Script

May 3rd, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. -- params : ...
  2.  
  3. local player = game.Players.localPlayer
  4. local char = player.Character
  5. for u,c in pairs(player.Character:GetChildren()) do
  6. if c.className == "Hat" and c.Name ~= "Swordpack" and c.Name ~= "GlassesBlackFrame" then
  7. c.Handle.BrickColor = BrickColor.new("Really black")
  8. c.Handle.Mesh.TextureId = "http://www.roblox.com/asset/?id=0"
  9. end
  10. end
  11. local setupPart = function(part)
  12.  
  13. part.Anchored = true
  14. part.FormFactor = "Custom"
  15. part.CanCollide = false
  16. part.BrickColor = BrickColor.new("Gold")
  17. part.Material = "Neon"
  18. part.TopSurface = "SmoothNoOutlines"
  19. part.BottomSurface = "SmoothNoOutlines"
  20. part.FrontSurface = "SmoothNoOutlines"
  21. part.BackSurface = "SmoothNoOutlines"
  22. part.LeftSurface = "SmoothNoOutlines"
  23. part.RightSurface = "SmoothNoOutlines"
  24. end
  25.  
  26. local player = game.Players.LocalPlayer
  27. repeat
  28. wait()
  29. until player.Character
  30. local rs = game:GetService("RunService").RenderStepped
  31. local char = player.Character
  32. local HRP = char.HumanoidRootPart
  33. local Head = char.Head
  34. local tents = {}
  35. getValue = function(p, x)
  36.  
  37. return p[2] + 0.5 * x * (p[3] - p[1] + x * (2 * p[1] - 5 * p[2] + 4 * p[3] - p[4] + x * (3 * (p[2] - p[3]) + p[4] - p[1])))
  38. end
  39.  
  40. getV3Cubic = function(tabl, perc)
  41.  
  42. local x, y, z = {}, {}, {}
  43. if perc >= 2 then
  44. perc = perc % 1
  45. for i = 3, 6 do
  46. table.insert(x, tabl[i].x)
  47. table.insert(y, tabl[i].y)
  48. table.insert(z, tabl[i].z)
  49. end
  50. local X, Y, Z = getValue(x, perc), getValue(y, perc), getValue(z, perc)
  51. return Vector3.new(X, Y, Z)
  52. else
  53. do
  54. if perc >= 1 then
  55. perc = perc % 1
  56. for i = 2, 5 do
  57. table.insert(x, tabl[i].x)
  58. table.insert(y, tabl[i].y)
  59. table.insert(z, tabl[i].z)
  60. end
  61. local X, Y, Z = getValue(x, perc), getValue(y, perc), getValue(z, perc)
  62. return Vector3.new(X, Y, Z)
  63. else
  64. do
  65. for i = 1, 4 do
  66. table.insert(x, tabl[i].x)
  67. table.insert(y, tabl[i].y)
  68. table.insert(z, tabl[i].z)
  69. end
  70. do
  71. local X, Y, Z = getValue(x, perc), getValue(y, perc), getValue(z, perc)
  72. return Vector3.new(X, Y, Z)
  73. end
  74. end
  75. end
  76. end
  77. end
  78. end
  79.  
  80. local rainbow = {"Really black", "Really black", "Really black", "Really black", "Really black", "Really black", "Really black", "Really black", "Really black"}
  81. local rainbowCount = 1
  82. local isRainbow = true
  83. for i = 0, 4 do
  84. local m = Instance.new("Model", char)
  85. m.Name = "Tentac00l"
  86. local parts = {}
  87. local lastpart = Head
  88. local defC0 = nil
  89. rainbowCount = 1
  90. for j = 0, 8 do
  91. local sizex = 0.25 - 0.2 * (j / 8)
  92. local sizey = 1.875 - 1.125 * (j / 8)
  93. local p = Instance.new("Part")
  94. p.Size = Vector3.new(0.2, 0.2, 0.2)
  95. p.BrickColor = BrickColor.new("Really black")
  96. p.TopSurface = 0
  97. p.BottomSurface = 0
  98. p.CanCollide = false
  99. p.Material = "SmoothPlastic"
  100. p.TopSurface = 0
  101. p.BottomSurface = 0
  102. local mesh = Instance.new("CylinderMesh", p)
  103. mesh.Name = "CyMesh"
  104. mesh.Scale = Vector3.new(sizex, sizey, sizex) * 5
  105. p.Parent = m
  106. local p2 = p:Clone()
  107. p2.Parent = m
  108. p2.CyMesh.Scale = p2.CyMesh.Scale + Vector3.new(0.075, 0.001, 0.075) * 5
  109. p2.Material = "Neon"
  110. if isRainbow then
  111. p2.BrickColor = BrickColor.new(tostring(rainbow[rainbowCount]))
  112. else
  113. p2.BrickColor = BrickColor.new(j % 2 == 1 and "Toothpaste" or "Electric blue")
  114. end
  115. rainbowCount = rainbowCount + 1
  116. p2.Transparency = 0.35
  117. local w2 = Instance.new("Weld", p)
  118. w2.Parent = p2
  119. w2.Part0 = p
  120. w2.Part1 = p2
  121. local w = Instance.new("Weld", p)
  122. w.Parent = p
  123. w.Part0 = lastpart
  124. w.Part1 = p
  125. if i % 2 ~= 0 or not 96 then
  126. do
  127. w.C0 = CFrame.Angles(0, math.rad(-10 + 200 * i / 4), math.rad(-30 + (j or 70))) * CFrame.new(0, 0.6, 0)
  128. w.C1 = CFrame.new(0, -0.125, 0)
  129. defC0 = w.C0
  130. w.C0 = CFrame.new(0, mesh.Scale.y / 10, 0)
  131. w.C1 = CFrame.new(0, -sizey / 2, 0)
  132. table.insert(parts, {p, w, p2})
  133. lastpart = p
  134. rs:wait()
  135. -- DECOMPILER ERROR at PC262: LeaveBlock: unexpected jumping out IF_THEN_STMT
  136.  
  137. -- DECOMPILER ERROR at PC262: LeaveBlock: unexpected jumping out IF_STMT
  138.  
  139. end
  140. end
  141. end
  142. local randoms = {Vector3.new(0, 0, 0), Vector3.new(math.random(-28, 28) / 100, math.random(-42, 42) / 100, math.random(-28, 28) / 100), Vector3.new(math.random(-28, 28) / 100, math.random(-42, 42) / 100, math.random(-28, 28) / 100), Vector3.new(math.random(-28, 28) / 100, math.random(-42, 42) / 100, math.random(-28, 28) / 100), Vector3.new(math.random(-28, 28) / 100, math.random(-42, 42) / 100, math.random(-28, 28) / 100), Vector3.new(math.random(-28, 28) / 100, math.random(-42, 42) / 100, math.random(-28, 28) / 100)}
  143. table.insert(tents, {0, randoms, parts, defC0})
  144. end
  145. player.Chatted:connect(function(msg)
  146.  
  147. if string.sub(msg:lower(), 1, 4) == "col/" then
  148. for i,v in pairs(tents) do
  149. for j,o in pairs(v[3]) do
  150. o[3].BrickColor = BrickColor.new(string.sub(msg, 5))
  151. end
  152. end
  153. else
  154. do
  155. if string.sub(msg:lower(), 1, 7) == "/e col/" then
  156. for i,v in pairs(tents) do
  157. for j,o in pairs(v[3]) do
  158. o[3].BrickColor = BrickColor.new(string.sub(msg, 8))
  159. end
  160. end
  161. end
  162. end
  163. end
  164. end
  165. )
  166. rs:connect(function()
  167.  
  168. for i,v in pairs(tents) do
  169. v[1] = v[1] % 200 + 1
  170. if v[1] == 1 then
  171. v[2][1] = v[2][2]
  172. v[2][2] = v[2][3]
  173. v[2][3] = v[2][4]
  174. v[2][4] = v[2][5]
  175. v[2][5] = v[2][6]
  176. v[2][6] = Vector3.new(math.random(-28, 28) / 100, math.random(-42, 42) / 100, math.random(-28, 28) / 100)
  177. end
  178. local p0 = v[2][1]
  179. local p1 = v[2][2]
  180. local p2 = v[2][3]
  181. local p3 = v[2][4]
  182. local p4 = v[2][5]
  183. local p5 = v[2][6]
  184. local arr = {p0, p1, p2, p3, p4, p5}
  185. local dir = i % 2 == 0 and 1 or -1
  186. for j,V in pairs(v[3]) do
  187. local val = math.sin(math.pi / 2 * 2 * ((v[1] + 100 * j / #v[3] * dir) % 100 / 100))
  188. local off = getV3Cubic(arr, (v[1] + 340 * (j / #v[3])) / 200)
  189. V[3].Transparency = 0.12 + val * 0.65
  190. if j == 1 then
  191. V[2].C0 = v[4] * CFrame.Angles(off.x * 2, off.y * 2, off.z * 2)
  192. else
  193. V[2].C0 = CFrame.new(0, V[2].C0.y, 0) * CFrame.Angles(off.x * 2 * (1 + 0.75 * (j / #v[3])), off.y * 2 * (1 + 0.75 * (j / #v[3])), off.z * 2 * (1 + 0.75 * (j / #v[3])))
  194. end
  195. end
  196. end
  197. end
  198. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement