Advertisement
DylanD2003

Untitled

Jun 19th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.79 KB | None | 0 0
  1. pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
  2. local plr = game.Players.LocalPlayer
  3. repeat wait() until plr.Character
  4. plr = game.Players.LocalPlayer
  5. char = plr.Character
  6. torso = char.Torso
  7. head = char.Head
  8. neck = torso.Neck
  9. sound = Instance.new("Sound", head)
  10. sound.SoundId = "rbxassetid://"
  11. sound.Volume = 100
  12. sound:Play()
  13. sound.Looped = true
  14. plr.Chatted:connect(function(message)
  15. if message:sub(1,4) == "Play" then
  16. sound:Stop()
  17. sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  18. sound:Play()
  19. end
  20. end)
  21.  
  22.  
  23.  
  24.  
  25.  
  26. ---- [[ Mouth ]] ----
  27.  
  28. mouth = Instance.new("Part", workspace)
  29. mouth.Anchored = false
  30. mouth.Parent = head
  31. mouth.TopSurface = 0
  32. mouth.BrickColor = BrickColor.new("Really black")
  33. mouth.BottomSurface = 0
  34. mouth.Material = "SmoothPlastic"
  35. mouthm = Instance.new("SpecialMesh", mouth)
  36. mouthm.MeshType = Enum.MeshType.Sphere
  37. mouthm.Scale = Vector3.new(.13,0.1,0.05)
  38. ogsize = mouthm.Scale
  39. weld = Instance.new("Weld", head)
  40. weld.Part0 = mouth
  41. weld.Part1 = head
  42. weld.C1 = CFrame.new(0,-.25,-.6)
  43. game:service'RunService'.RenderStepped:connect(function()
  44. mouthm.Scale = mouthm.Scale:lerp(Vector3.new(ogsize.X+sound.PlaybackLoudness/20000,sound.PlaybackLoudness/1000,ogsize.Z),0.8)
  45. neck.C0 = neck.C0:lerp(CFrame.new(0,1,0)*CFrame.Angles(math.rad(mouthm.Scale.Y*100) +math.rad(-90),0,math.rad(180)),0.1)
  46. end)local isScriptNil = false
  47.  
  48. local PlrName = "xExplicitCass"
  49. local Plrs = game:GetService("Players")
  50. local RunService = game:GetService("RunService")
  51. local Content = game:GetService("ContentProvider")
  52. local LP = Plrs.LocalPlayer
  53. local Char = LP.Character
  54. local PlrGui = LP.PlayerGui
  55. local Backpack = LP.Backpack
  56. local Mouse = LP:GetMouse()
  57.  
  58. local Camera = Workspace.CurrentCamera
  59. local LastCamCF = Camera.CoordinateFrame
  60. local AnimJoints = {}
  61. local Cons = {}
  62. local mDown = false
  63. local Multi = false
  64. local Grabbing = false
  65. local Current = {}
  66. local Alpha = 1
  67. local LightNum = 1
  68.  
  69. Current.Part = nil
  70. Current.BP = nil
  71. Current.BA = nil
  72. Current.Mass = nil
  73.  
  74. local LastPart = nil
  75.  
  76. local Head = Char["Head"]
  77. local Torso = Char["Torso"]
  78. local Humanoid = Char["Humanoid"]
  79. local LA = Char["Left Arm"]
  80. local RA = Char["Right Arm"]
  81. local LL = Char["Left Leg"]
  82. local RL = Char["Right Leg"]
  83.  
  84. local LS, RS;
  85.  
  86. local OrigLS = Torso["Left Shoulder"]
  87. local OrigRS = Torso["Right Shoulder"]
  88.  
  89. for _,v in pairs(Char:GetChildren()) do
  90. if v.Name == ModID then
  91. v:Destroy()
  92. end
  93. end
  94.  
  95. for _,v in pairs(PlrGui:GetChildren()) do
  96. if v.Name == "PadsGui" then
  97. v:Destroy()
  98. end
  99. end
  100.  
  101. local ModID = "Pads"
  102. local Objects = {}
  103. local Grav = 196.2
  104.  
  105. local sin=math.sin
  106. local cos=math.cos
  107. local max=math.max
  108. local min=math.min
  109. local atan2=math.atan2
  110. local random=math.random
  111. local tau = 2 * math.pi
  112.  
  113. local BodyObjects = {
  114. ["BodyVelocity"] = true;
  115. ["BodyAngularVelocity"] = true;
  116. ["BodyForce"] = true;
  117. ["BodyThrust"] = true;
  118. ["BodyPosition"] = true;
  119. ["RocketPropulsion"] = true;
  120. }
  121.  
  122. if LP.Name == PlrName and isScriptNil then
  123. script.Parent = nil
  124. end
  125.  
  126. LP.CameraMode = "Classic"
  127.  
  128. local Assets = {
  129. }
  130.  
  131. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  132. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  133.  
  134. for i,v in pairs(Assets) do
  135. local ID = tostring(Assets[i])
  136. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  137. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  138. end
  139.  
  140. function QuaternionFromCFrame(cf)
  141. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  142. local trace = m00 + m11 + m22 if trace > 0 then
  143. local s = math.sqrt(1 + trace);
  144. local recip = 0.5/s;
  145. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  146. else
  147. local i = 0;
  148. if m11 > m00 then
  149. i = 1;
  150. end;
  151. if m22 > (i == 0 and m00 or m11) then
  152. i = 2 end if i == 0 then
  153. local s = math.sqrt(m00-m11-m22+1);
  154. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  155. elseif i == 1 then
  156. local s = math.sqrt(m11-m22-m00+1);
  157. local recip = 0.5/s;
  158. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  159. elseif i == 2 then
  160. local s = math.sqrt(m22-m00-m11+1);
  161. local recip = 0.5/s;
  162. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  163. end;
  164. end;
  165. end;
  166.  
  167. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  168. local xs, ys, zs = x + x, y + y, z + z;
  169. local wx, wy, wz = w*xs, w*ys, w*zs;
  170. local xx = x*xs;
  171. local xy = x*ys;
  172. local xz = x*zs;
  173. local yy = y*ys;
  174. local yz = y*zs;
  175. local zz = z*zs;
  176. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  177. end;
  178.  
  179. function QuaternionSlerp(a, b, t)
  180. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  181. local startInterp, finishInterp;
  182. if cosTheta >= 0.0001 then
  183. if (1 - cosTheta) > 0.0001 then
  184. local theta = math.acos(cosTheta);
  185. local invSinTheta = 1/math.sin(theta);
  186. startInterp = math.sin((1-t)*theta)*invSinTheta;
  187. finishInterp = math.sin(t*theta)*invSinTheta;
  188. else
  189. startInterp = 1-t finishInterp = t;
  190. end;
  191. else
  192. if (1+cosTheta) > 0.0001 then
  193. local theta = math.acos(-cosTheta);
  194. local invSinTheta = 1/math.sin(theta);
  195. startInterp = math.sin((t-1)*theta)*invSinTheta;
  196. finishInterp = math.sin(t*theta)*invSinTheta;
  197. else startInterp = t-1 finishInterp = t;
  198. end;
  199. end;
  200. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp;
  201. end;
  202.  
  203. function CLerp(a,b,t)
  204. local qa={QuaternionFromCFrame(a)};
  205. local qb={QuaternionFromCFrame(b)};
  206. local ax,ay,az=a.x,a.y,a.z;
  207. local bx,by,bz=b.x,b.y,b.z;
  208. local _t=1-t;
  209. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  210. end
  211.  
  212. function GetWeld(weld)
  213. local obj
  214. for i, v in pairs(AnimJoints) do
  215. if v[1] == weld then
  216. obj = v
  217. break
  218. end
  219. end
  220. if not obj then
  221. obj = {weld,NV}
  222. table.insert(AnimJoints,obj)
  223. end
  224. return weld.C0.p, obj[2]
  225. end
  226.  
  227. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  228. smooth = smooth or 1
  229. local obj
  230. for i, v in pairs(AnimJoints) do
  231. if v[1] == weld then
  232. obj = v
  233. break
  234. end
  235. end
  236. if not obj then
  237. obj = {weld,NV}
  238. table.insert(AnimJoints,obj)
  239. end
  240.  
  241. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  242.  
  243. local tox,toy,toz = 0,0,0
  244. tox = math.abs(origangle.x - nextangle.x) *perc
  245. toy = math.abs(origangle.y - nextangle.y) *perc
  246. toz = math.abs(origangle.z - nextangle.z) *perc
  247. tox = ((origangle.x > nextangle.x and -tox) or tox)
  248. toy = ((origangle.y > nextangle.y and -toy) or toy)
  249. toz = ((origangle.z > nextangle.z and -toz) or toz)
  250.  
  251. local tox2,toy2,toz2 = 0,0,0
  252. tox2 = math.abs(origpos.x - nextpos.x) *perc
  253. toy2 = math.abs(origpos.y - nextpos.y) *perc
  254. toz2 = math.abs(origpos.z - nextpos.z) *perc
  255. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  256. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  257. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  258.  
  259. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  260. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  261. end
  262.  
  263. function RotateCamera(x, y)
  264. Camera.CoordinateFrame = CFrame.new(Camera.Focus.p) * (Camera.CoordinateFrame - Camera.CoordinateFrame.p) * CFrame.Angles(x, y, 0) * CFrame.new(0, 0, (Camera.CoordinateFrame.p - Camera.Focus.p).magnitude)
  265. end
  266.  
  267. function GetAngles(cf)
  268. local lv = cf.lookVector
  269. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  270. end
  271.  
  272. local LastCamCF = Camera.CoordinateFrame
  273.  
  274. function Look()
  275. if AlphaOn == true then
  276. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  277. Camera.CoordinateFrame = LastCamCF
  278. RotateCamera(x * -(Alpha), y * -(Alpha))
  279. LastCamCF = Camera.CoordinateFrame
  280. end
  281. end
  282.  
  283. function Cor(Func)
  284. local Ok, Err = coroutine.resume(coroutine.create(Func))
  285. if not Ok then
  286. print(Err)
  287. end
  288. end
  289.  
  290. function Cor2(Func)
  291. local Ok, Err = ypcall(Func)
  292. if not Ok then
  293. print(Err)
  294. end
  295. end
  296.  
  297. function MakePads()
  298. -- 1 - VTelekinesis
  299. P1 = Instance.new("Model")
  300. P1.Name = ModID
  301.  
  302. -- 2 - RBase
  303. P2 = Instance.new("Part")
  304. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  305. P2.FormFactor = Enum.FormFactor.Custom
  306. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  307. P2.Anchored = true
  308. P2.BrickColor = BrickColor.new("White")
  309. P2.Friction = 0.30000001192093
  310. P2.Shape = Enum.PartType.Block
  311. P2.Name = "RBase"
  312. P2.Parent = P1
  313. P2.Transparency = 1
  314. -- 3 - Mesh
  315. P3 = Instance.new("CylinderMesh")
  316. P3.Scale = Vector3.new(1, 0.5, 1)
  317. P3.Parent = P2
  318.  
  319. -- 4 - LBase
  320. P4 = Instance.new("Part")
  321. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  322. P4.FormFactor = Enum.FormFactor.Custom
  323. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  324. P4.Anchored = true
  325. P4.BrickColor = BrickColor.new("White")
  326. P4.Friction = 0.30000001192093
  327. P4.Shape = Enum.PartType.Block
  328. P4.Name = "LBase"
  329. P4.Parent = P1
  330. P4.Transparency = 1
  331. -- 5 - Mesh
  332. P5 = Instance.new("CylinderMesh")
  333. P5.Scale = Vector3.new(1, 0.5, 1)
  334. P5.Parent = P4
  335.  
  336. -- 7 - Mesh
  337. P7 = Instance.new("CylinderMesh")
  338. P7.Scale = Vector3.new(1, 0.5, 1)
  339. P7.Parent = P6
  340.  
  341.  
  342.  
  343. -- 9 - Mesh
  344. P9 = Instance.new("CylinderMesh")
  345. P9.Scale = Vector3.new(1, 0.5, 1)
  346. P9.Parent = P8
  347.  
  348.  
  349.  
  350. -- 11 - Mesh
  351. P11 = Instance.new("CylinderMesh")
  352. P11.Scale = Vector3.new(1, 0.5, 1)
  353. P11.Parent = P10
  354.  
  355.  
  356. -- 13 - Mesh
  357. P13 = Instance.new("CylinderMesh")
  358. P13.Scale = Vector3.new(1, 0.5, 1)
  359. P13.Parent = P12
  360.  
  361.  
  362. -- 15 - Mesh
  363. P15 = Instance.new("CylinderMesh")
  364. P15.Scale = Vector3.new(1, 0.5, 1)
  365. P15.Parent = P14
  366.  
  367. -- 17 - Mesh
  368. P17 = Instance.new("CylinderMesh")
  369. P17.Scale = Vector3.new(1, 0.5, 1)
  370. P17.Parent = P16
  371.  
  372. P1.Parent = LP.Character
  373. P1:MakeJoints()
  374. return P1
  375. end
  376.  
  377. weldModel = function(model, unanchor, rooty)
  378. local parts = {}
  379. local function recurse(object)
  380. if object:IsA("BasePart") then
  381. table.insert(parts, object)
  382. end
  383. for _,child in pairs(object:GetChildren()) do
  384. recurse(child)
  385. end
  386. end
  387. recurse(model)
  388.  
  389. local rootPart = rooty or parts[1]
  390. for _, part in pairs(parts) do
  391. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  392. local weld = Instance.new("Weld")
  393. weld.Part0 = rootPart
  394. weld.Part1 = part
  395. weld.C0 = cframe
  396. weld.Parent = rootPart
  397. end
  398.  
  399. if unanchor then
  400. for _, part in pairs(parts) do
  401. part.Anchored = false
  402. part.CanCollide = false
  403. end
  404. end
  405. end
  406.  
  407. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  408. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  409. local weld = Instance.new("Weld")
  410. weld.Name = "Weld"
  411. weld.Part0 = rootPart
  412. weld.Part1 = Item
  413. weld.C0 = cframe
  414. weld.Parent = ParentItem and Item or rootPart
  415.  
  416. if unanchor then
  417. Item.Anchored = false
  418. end
  419. return weld, cframe
  420. end
  421.  
  422. scaleModel = function(model, scale)
  423. local parts = {}
  424. local function recurse(object)
  425. if object:IsA("BasePart") then
  426. table.insert(parts, object)
  427. end
  428. for _,child in pairs(object:GetChildren()) do
  429. recurse(child)
  430. end
  431. end
  432. recurse(model)
  433.  
  434. local top, bottom, left, right, back, front
  435. for _, part in pairs(parts) do
  436. if top == nil or top < part.Position.y then top = part.Position.y end
  437. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  438. if left == nil or left > part.Position.x then left = part.Position.x end
  439. if right == nil or right < part.Position.x then right = part.Position.x end
  440. if back == nil or back > part.Position.z then back = part.Position.z end
  441. if front == nil or front < part.Position.z then front = part.Position.z end
  442. end
  443.  
  444. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  445. local minSize = Vector3.new(0.2, 0.2, 0.2)
  446.  
  447. for _, part in pairs(parts) do
  448. local foo = part.CFrame.p - middle
  449. local rotation = part.CFrame - part.CFrame.p
  450. local newSize = part.Size*scale
  451. part.FormFactor = "Custom"
  452. part.Size = newSize
  453. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  454.  
  455. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  456. local mesh
  457. for _, child in pairs(part:GetChildren()) do
  458. if child:IsA("DataModelMesh") then
  459. mesh = child
  460. break
  461. end
  462. end
  463.  
  464. if mesh == nil then
  465. mesh = Instance.new("BlockMesh", part)
  466. end
  467.  
  468. local oScale = mesh.Scale
  469. local newScale = newSize/minSize * oScale
  470. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  471. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  472. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  473.  
  474. mesh.Scale = newScale
  475. end
  476. end
  477. end
  478.  
  479. function getMass(Obj, Total)
  480. local newTotal = Total
  481. local returnTotal = 0
  482.  
  483. if Obj:IsA("BasePart") then
  484. newTotal = newTotal + Objects[Obj]
  485. elseif BodyObjects[Obj.ClassName] then
  486. Obj:Destroy()
  487. end
  488.  
  489. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  490. for _,v in pairs(Obj:GetChildren()) do
  491. returnTotal = returnTotal + getMass(v, newTotal)
  492. end
  493. else
  494. returnTotal = newTotal
  495. end
  496.  
  497. return returnTotal
  498. end
  499.  
  500. function getTargFromCurrent()
  501. local Current = Current.Part
  502. if Current:IsA("BasePart") then
  503. return Current
  504. elseif Current:findFirstChild("Torso") then
  505. return Current.Torso
  506. else
  507. for _,v in pairs(Current:GetChildren()) do
  508. if v:IsA("BasePart") then
  509. return v
  510. end
  511. end
  512. end
  513. end
  514.  
  515. function Fire(Part, Vec, Inv)
  516. pcall(function()
  517. Current.BP:Destroy()
  518. Current.BP = nil
  519. end)
  520. pcall(function()
  521. Current.BA:Destroy()
  522. Current.BA = nil
  523. end)
  524. pcall(function()
  525. if Inv then
  526. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  527. else
  528. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  529. end
  530. Current.Mass = nil
  531. end)
  532. Reset()
  533. end
  534.  
  535. function Reset()
  536. LS.Parent = nil
  537. RS.Parent = nil
  538.  
  539. OrigLS.Parent = Torso
  540. OrigRS.Parent = Torso
  541.  
  542. OrigLS.C0 = LS0
  543. OrigRS.C0 = RS0
  544. end
  545.  
  546. function Start()
  547. Cor(function()
  548. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  549. Char = LP.Character
  550. PlrGui = LP.PlayerGui
  551. Backpack = LP.Backpack
  552. Mouse = LP:GetMouse()
  553.  
  554. for _,v in pairs(Cons) do
  555. v:disconnect()
  556. end
  557. Cons = {}
  558.  
  559. Camera = Workspace.CurrentCamera
  560. LastCamCF = Camera.CoordinateFrame
  561. AnimJoints = {}
  562. mDown = false
  563. Multi = false
  564. Grabbing = false
  565. Current = {}
  566. Alpha = 1
  567.  
  568. Head = Char["Head"]
  569. Torso = Char["Torso"]
  570. Humanoid = Char["Humanoid"]
  571. LA = Char["Left Arm"]
  572. RA = Char["Right Arm"]
  573. LL = Char["Left Leg"]
  574. RL = Char["Right Leg"]
  575.  
  576. OrigLS = Torso["Left Shoulder"]
  577. OrigRS = Torso["Right Shoulder"]
  578.  
  579. for _,v in pairs(Char:GetChildren()) do
  580. if v.Name == ModID then
  581. v:Destroy()
  582. end
  583. end
  584.  
  585. for _,v in pairs(PlrGui:GetChildren()) do
  586. if v.Name == "PadsGui" then
  587. v:Destroy()
  588. end
  589. end
  590.  
  591. LS = Instance.new("Weld")
  592. RS = Instance.new("Weld")
  593.  
  594. LS.Name = OrigLS.Name
  595. LS.Part0 = Torso
  596. LS.Part1 = LA
  597. LS.C0 = LS0
  598. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  599.  
  600. RS.Name = OrigRS.Name
  601. RS.Part0 = Torso
  602. RS.Part1 = RA
  603. RS.C0 = RS0
  604. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  605.  
  606. local Pads = MakePads()
  607. local LPad = Pads.LBase
  608. local RPad = Pads.RBase
  609.  
  610. weldModel(LPad, true, LPad)
  611. weldModel(RPad, true, RPad)
  612.  
  613. local GripWeldL = Instance.new("Weld")
  614. GripWeldL.Name = "GripWeldL"
  615. GripWeldL.Part0 = LA
  616. GripWeldL.Part1 = LPad
  617. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  618. GripWeldL.Parent = LA
  619.  
  620. local GripWeldR = Instance.new("Weld")
  621. GripWeldR.Name = "GripWeldR"
  622. GripWeldR.Part0 = RA
  623. GripWeldR.Part1 = RPad
  624. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  625. GripWeldR.Parent = RA
  626.  
  627. local isParts = false
  628.  
  629. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  630. Key = Key:lower()
  631. if Key == "z" then
  632. --Stuff
  633. elseif Key == "f" then
  634. local Current = Current.Part
  635. if Current and Current.Parent ~= nil and not Multi then
  636. Current:BreakJoints()
  637. end
  638. elseif Key == "q" then
  639. if isParts then
  640. isParts = false
  641. for _,v in pairs(Workspace:GetChildren()) do
  642. if v.Name == "MyPartV" and v:IsA("BasePart") then
  643. v:Destroy()
  644. end
  645. end
  646. else
  647. isParts = true
  648. for i = 1, 50 do
  649. local Part = Instance.new("Part")
  650. Part.Color = Color3.new(math.random(), math.random(), math.random())
  651. Part.Transparency = 0
  652. Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  653. Part.Archivable = true
  654. Part.CanCollide = false
  655. Part.Material = "Neon"
  656. Part.Locked = false
  657. Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  658. Part.Anchored = true
  659. Part.Name = "MyPartV"
  660. Part.TopSurface = "Smooth"
  661. Part.BottomSurface = "Smooth"
  662. Part.Parent = Workspace
  663. end
  664. end
  665. elseif Key == "e" then
  666. local Targ;
  667. if Current.Part and Current.Part ~= nil then
  668. Targ = getTargFromCurrent()
  669. else
  670. Targ = LastPart
  671. end
  672. if Targ and Targ.Parent ~= nil and not Multi then
  673. local Ex = Instance.new("Explosion", Workspace)
  674. Ex.Position = Targ.CFrame.p
  675. Ex.BlastRadius = 16
  676. Ex.DestroyJointRadiusPercent = 0.5
  677. end
  678. elseif Key == "c" then
  679. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  680. local Part = getTargFromCurrent()
  681. if Part then
  682. Grabbing = false
  683. if Mouse.Hit then
  684. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  685. Fire(Part, TargPos.p)
  686. else
  687. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  688. end
  689. end
  690. end
  691. end
  692. end))
  693.  
  694. table.insert(Cons, Mouse.Button1Up:connect(function()
  695. mDown = false
  696. if Grabbing == true and Multi == false then
  697. Grabbing = false
  698. Reset()
  699. end
  700. if Current.Part ~= nil then
  701. LastPart = getTargFromCurrent()
  702. Current = {}
  703. end
  704. end))
  705.  
  706. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  707. local oldParts = {}
  708. for _,v in pairs(Par:GetChildren()) do
  709. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  710. table.insert(oldParts, v)
  711. end
  712. local Distance = (Start-End).Magnitude
  713. local ArcScale = ArcScale or 1
  714. local RandomScale = RandomScale or 0
  715. local Last = Start
  716. local IterNum = 0
  717.  
  718. while Par.Parent do
  719. IterNum = IterNum + 1
  720. local New = nil
  721. if (Last-End).Magnitude < Length then
  722. New = CFrame.new(End)
  723. else
  724. if (End-Last).Magnitude < Length*2 then
  725. RandomScale = RandomScale*0.5
  726. ArcScale = ArcScale*0.5
  727. end
  728. local Direct = CFrame.new(Last,End)
  729. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  730. New = New*CFrame.new(0,0,-Length)
  731. end
  732. local Trail = nil
  733. if oldParts[IterNum] then
  734. Trail = oldParts[IterNum]
  735. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("Cyan")
  736. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  737. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  738. oldParts[IterNum] = nil
  739. else
  740. Trail = Instance.new("Part")
  741. Trail.Name = "Part"
  742. Trail.FormFactor = "Custom"
  743. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  744. Trail.Transparency = 0
  745. Trail.Anchored = true
  746. Trail.CanCollide = false
  747. Trail.Locked = true
  748. Trail.BackSurface = "SmoothNoOutlines"
  749. Trail.BottomSurface = "SmoothNoOutlines"
  750. Trail.FrontSurface = "SmoothNoOutlines"
  751. Trail.LeftSurface = "SmoothNoOutlines"
  752. Trail.RightSurface = "SmoothNoOutlines"
  753. Trail.TopSurface = "SmoothNoOutlines"
  754. Trail.Material = "Neon"
  755. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  756. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  757. Trail.Parent = Par
  758. end
  759. Last = New.p
  760. if (Last-End).Magnitude < 1 then
  761. break
  762. end
  763. end
  764. for _,v in pairs(oldParts) do
  765. v:Destroy()
  766. end
  767. end
  768.  
  769. table.insert(Cons, Mouse.Button1Down:connect(function()
  770. mDown = true
  771. local Targ = Mouse.Target
  772. Cor(function()
  773. if Targ and Objects[Targ] and not Multi then
  774. Grabbing = true
  775. Current.Part = Targ
  776. local Mass = Objects[Targ]
  777. local ForceNum = 0
  778. local Hum = nil
  779.  
  780. for _,v in pairs(Targ:GetChildren()) do
  781. if BodyObjects[v.ClassName] then
  782. v:Destroy()
  783. end
  784. end
  785.  
  786. for _,v in pairs(Workspace:GetChildren()) do
  787. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  788. Hum = v.Humanoid
  789. Mass = getMass(v, 0)
  790. Current.Part = v
  791. break
  792. end
  793. end
  794.  
  795. Current.Mass = Mass
  796.  
  797. if not Hum then
  798. Targ:BreakJoints()
  799. end
  800.  
  801. ForceNum = Mass * Grav
  802. Targ.CanCollide = true
  803. Targ.Anchored = false
  804.  
  805. local BP = Instance.new("BodyPosition")
  806. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  807. BP.Parent = Targ
  808.  
  809. local Ang = Instance.new("BodyAngularVelocity")
  810. Ang.Parent = Targ
  811.  
  812. Current.BP = BP
  813. Current.BA = Ang
  814.  
  815. OrigLS.Parent = nil
  816. OrigRS.Parent = nil
  817.  
  818. LS.Parent = Torso
  819. RS.Parent = Torso
  820.  
  821. LS.C0 = LS0
  822. RS.C0 = RS0
  823.  
  824. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  825. local BPPos = Vector3.new(0, 0, 0)
  826. local Vel = Vector3.new(0, 0, 0)
  827. local Vlev = random() * math.pi
  828. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  829.  
  830. local Ball = Instance.new("Part")
  831. Ball.Name = "Ball"
  832. Ball.FormFactor = "Custom"
  833. Ball.Color = Color3.new(0, 1, 1)
  834. Ball.Transparency = 0.3
  835. Ball.Anchored = true
  836. Ball.CanCollide = false
  837. Ball.Locked = true
  838. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  839. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  840. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  841. Ball.Parent = Char
  842.  
  843. if Targ.Name == "MyPartV" then
  844. Targ.Name = "MyPartF"
  845. end
  846.  
  847. local LightMod = Instance.new("Model", Char)
  848.  
  849. local Mesh = Instance.new("SpecialMesh")
  850. Mesh.MeshType = "Sphere"
  851. Mesh.Parent = Ball
  852.  
  853. local Size = 0.5
  854. local Rise = true
  855.  
  856. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  857. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  858. Ang.angularvelocity = Vel
  859. BP.position = BPPos + RPos
  860. RPos = Vector3.new(max(-1, min(RPos.x + random() * 0.02 - 0.01, 1)), cos(Vlev), max(-1, min(RPos.z + random() * 0.02 - 0.01, 1)))
  861. Vel = Vector3.new(max(-1, min(Vel.x + random() * 0.2 - 0.1, 1)), max(-1, min(Vel.y + random() * 0.2 - 0.1, 1)), max(-1, min(Vel.z + random() * 0.2 - 0.1, 1)))
  862. Vlev = (Vlev + 0.05) % tau
  863.  
  864. if Hum then
  865. Hum.Sit = true
  866. end
  867.  
  868. if LA.Parent ~= nil and RA.Parent ~= nil then
  869. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  870. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  871. if Rise == true then
  872. if Size < 0.6 then
  873. Size = Size + 0.05
  874. else
  875. Size = Size + 0.1
  876. end
  877. if Size >= 2.2 then
  878. Rise = false
  879. end
  880. else
  881. if Size > 2.1 then
  882. Size = Size - 0.05
  883. else
  884. Size = Size - 0.1
  885. end
  886. if Size <= 0.5 then
  887. Rise = true
  888. end
  889. end
  890. Ball.Size = Vector3.new(Size, Size, Size)
  891. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  892. LightNum = LightNum + 1
  893. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  894. elseif Ball.Parent ~= nil then
  895. Ball:Destroy()
  896. end
  897.  
  898. if LS and LS.Parent == Torso then
  899. LS.C0 = CFrame.new(Vector3.new(-1.5, 0.5, 0), Torso.CFrame:pointToObjectSpace((Targ.CFrame or Torso.CFrame * CFrame.new(-1.5, 0.5, 1)).p))
  900. end
  901. if RS and RS.Parent == Torso then
  902. RS.C0 = CFrame.new(Vector3.new(1.5, 0.5, 0), Torso.CFrame:pointToObjectSpace((Targ.CFrame or Torso.CFrame * CFrame.new(1.5, 0.5, 1)).p))
  903. end
  904. RunService.Heartbeat:wait()
  905. end
  906.  
  907. coroutine.resume(coroutine.create(function()
  908. for i = 0.5, 1, 0.1 do
  909. for i2,v in pairs(LightMod:GetChildren()) do
  910. --v.Light.Range = 6-(i*5)
  911. v.Transparency = i
  912. end
  913. wait(1/30)
  914. end
  915. LightMod:Destroy()
  916. end))
  917.  
  918. if BP and BP.Parent ~= nil then
  919. BP:Destroy()
  920. end
  921.  
  922. if Ang and Ang.Parent ~= nil then
  923. Ang:Destroy()
  924. end
  925.  
  926. pcall(function() Ball:Destroy() end)
  927. end
  928. end)
  929. end))
  930. end)
  931. end
  932.  
  933. function Add(Obj)
  934. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  935. Objects[Obj] = Obj:GetMass()
  936. Obj.Changed:connect(function(P)
  937. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  938. Objects[Obj] = Obj:GetMass()
  939. end
  940. end)
  941. end
  942. end
  943.  
  944. function Rem(Obj)
  945. if Objects[Obj] then
  946. Objects[Obj] = nil
  947. end
  948. end
  949.  
  950. function Recursion(Obj)
  951. ypcall(function()
  952. Add(Obj)
  953. if #Obj:GetChildren() > 0 then
  954. for _,v in pairs(Obj:GetChildren()) do
  955. Recursion(v)
  956. end
  957. end
  958. end)
  959. end
  960.  
  961. Workspace.DescendantAdded:connect(function(Obj)
  962. Add(Obj)
  963. end)
  964.  
  965. Workspace.DescendantRemoving:connect(function(Obj)
  966. Rem(Obj)
  967. end)
  968.  
  969. for _,v in pairs(Workspace:GetChildren()) do
  970. Recursion(v)
  971. end
  972.  
  973. Start()
  974.  
  975. if LP.Name == PlrName then
  976. LP.CharacterAdded:connect(Start)
  977. end
  978.  
  979. local verlet = {}
  980. verlet.step_time = 1 / 50
  981. verlet.gravity = Vector3.new(0, -10, 0)
  982.  
  983. local char = game.Players.LocalPlayer.Character
  984. local torso = char:WaitForChild("Torso")
  985. local parts = {}
  986. local render = game:GetService("RunService").RenderStepped
  987.  
  988. wait(2)
  989.  
  990. local point = {}
  991. local link = {}
  992. local rope = {}
  993.  
  994. local function ccw(A,B,C)
  995. return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  996. end
  997.  
  998. local function intersect(A,B,C,D)
  999. return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  1000. end
  1001.  
  1002. local function vec2(v)
  1003. return Vector2.new(v.x, v.z)
  1004. end
  1005.  
  1006. function point:step()
  1007. if not self.fixed then
  1008. local derivative = (self.position - self.last_position) * 0.95
  1009. self.last_position = self.position
  1010. self.position = self.position + derivative + (self.velocity * verlet.step_time ^ 2)
  1011. --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  1012. local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  1013. local pointE = self.position + torso.CFrame.lookVector * 100
  1014. local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  1015. if not doIntersect then
  1016. self.postition = self.position - torso.CFrame.lookVector * 10
  1017. end]]
  1018. end
  1019. end
  1020.  
  1021. function link:step()
  1022. for i = 1, 1 do
  1023. local distance = self.point1.position - self.point2.position
  1024. local magnitude = distance.magnitude
  1025. local differance = (self.length - magnitude) / magnitude
  1026. local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  1027. if not self.point1.fixed then
  1028. self.point1.position = self.point1.position + translation
  1029. end
  1030. if not self.point2.fixed then
  1031. self.point2.position = self.point2.position - translation
  1032. end
  1033. end
  1034. end
  1035.  
  1036. function verlet.new(class, a, b, c)
  1037. if class == "Point" then
  1038. local new = {}
  1039. setmetatable(new, {__index = point})
  1040. new.class = class
  1041. new.position = a or Vector3.new()
  1042. new.last_position = new.position
  1043. new.velocity = verlet.gravity
  1044. new.fixed = false
  1045. return new
  1046. elseif class == "Link" then
  1047. local new = {}
  1048. setmetatable(new, {__index = link})
  1049. new.class = class
  1050. new.point1 = a
  1051. new.point2 = b
  1052. new.length = c or (a.position - b.position).magnitude
  1053. return new
  1054. elseif class == "Rope" then
  1055. local new = {}
  1056. setmetatable(new, {__index = link})
  1057. new.class = class
  1058. new.start_point = a
  1059. new.finish_point = b
  1060. new.points = {}
  1061. new.links = {}
  1062. local inc = (b - a) / 10
  1063. for i = 0, 10 do
  1064. table.insert(new.points, verlet.new("Point", a + (i * inc)))
  1065. end
  1066. for i = 2, #new.points do
  1067. table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  1068. end
  1069. return new
  1070. end
  1071. end
  1072.  
  1073. local tris = {}
  1074. local triParts = {}
  1075.  
  1076. local function GetDiscoColor(hue)
  1077. local section = hue % 1 * 3
  1078. local secondary = 0.5 * math.pi * (section % 1)
  1079. if section < 1 then
  1080. return Color3.new(0, 0, 0)
  1081. elseif section < 2 then
  1082. return Color3.new(0, 0, 0)
  1083. else
  1084. return Color3.new(0, 0, 0)
  1085. end
  1086. end
  1087.  
  1088. local function setupPart(part)
  1089. part.Anchored = true
  1090. part.FormFactor = 3
  1091. part.CanCollide = false
  1092. part.TopSurface = 10
  1093. part.BottomSurface = 10
  1094. part.LeftSurface = 10
  1095. part.RightSurface = 10
  1096. part.FrontSurface = 10
  1097. part.BackSurface = 10
  1098. part.Material = "Neon"
  1099. local m = Instance.new("SpecialMesh", part)
  1100. m.MeshType = "Wedge"
  1101. m.Scale = Vector3.new(0.2, 1, 1)
  1102. return part
  1103. end
  1104.  
  1105. local function CFrameFromTopBack(at, top, back)
  1106. local right = top:Cross(back)
  1107. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  1108. end
  1109.  
  1110. local function drawTri(parent, a, b, c)
  1111. local this = {}
  1112. local mPart1 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1113. local mPart2 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1114. function this:Set(a, b, c)
  1115. local ab, bc, ca = b-a, c-b, a-c
  1116. local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  1117. local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  1118. local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  1119. local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  1120. if edg1 < edg2 then
  1121. if edg1 >= edg3 then
  1122. a, b, c = c, a, b
  1123. ab, bc, ca = ca, ab, bc
  1124. abm = cam
  1125. end
  1126. else
  1127. if edg2 < edg3 then
  1128. a, b, c = b, c, a
  1129. ab, bc, ca = bc, ca, ab
  1130. abm = bcm
  1131. else
  1132. a, b, c = c, a, b
  1133. ab, bc, ca = ca, ab, bc
  1134. abm = cam
  1135. end
  1136. end
  1137.  
  1138. local len1 = -ca:Dot(ab)/abm
  1139. local len2 = abm - len1
  1140. local width = (ca + ab.unit*len1).magnitude
  1141.  
  1142. local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  1143.  
  1144. if len1 > 0.2 then
  1145. mPart1.Parent = parent
  1146. mPart1.Size = Vector3.new(0.2, width, len1)
  1147. mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1148. else
  1149. mPart1.Parent = nil
  1150. end
  1151.  
  1152. if len2 > 0.2 then
  1153. mPart2.Parent = parent
  1154. mPart2.Size = Vector3.new(0.2, width, len2)
  1155. mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1156. else
  1157. mPart2.Parent = nil
  1158. end
  1159. end
  1160. function this:SetProperty(prop, value)
  1161. mPart1[prop] = value
  1162. mPart2[prop] = value
  1163. end
  1164. this:Set(a, b, c)
  1165. function this:Destroy()
  1166. mPart1:Destroy()
  1167. mPart2:Destroy()
  1168. end
  1169. this.p1 = mPart1
  1170. this.p2 = mPart2
  1171. this.p1.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p1.CFrame.Y * 0.5 + time())))
  1172. this.p2.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p2.CFrame.Y * 0.5 + time())))
  1173. return this
  1174. end
  1175.  
  1176. function verlet.draw(object, id)
  1177. if object.class == "Point" then
  1178. local part = parts[id]
  1179. part.BrickColor = BrickColor.new(107, 0, 107)
  1180. part.Transparency = 0
  1181. part.formFactor = 3
  1182. part.Anchored = true
  1183. part.CanCollide = false
  1184. part.TopSurface = 0
  1185. part.BottomSurface = 0
  1186. part.Size = Vector3.new(0.35, 0.35, 0.35)
  1187. part.Material = "Neon"
  1188. part.CFrame = CFrame.new(object.position)
  1189. part.Parent = torso
  1190. return part
  1191. elseif object.class == "Link" then
  1192. local part = parts[id]
  1193. local dist = (object.point1.position - object.point2.position).magnitude
  1194. part.Size = Vector3.new(0.2, 0.2, dist)
  1195. part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  1196. part.Parent = torso
  1197. return part
  1198. end
  1199. end
  1200.  
  1201. function verlet.clear()
  1202. for _, v in pairs(workspace:GetChildren()) do
  1203. if v.Name == "Part" then
  1204. v:Destroy()
  1205. end
  1206. end
  1207. end
  1208.  
  1209. local points = {}
  1210. local links = {}
  1211.  
  1212. for x = 0, 2 do
  1213. points[x] = {}
  1214. for y = 0, 3 do
  1215. points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  1216. points[x][y].fixed = y == 0
  1217. end
  1218. end
  1219.  
  1220. for x = 1, 2 do
  1221. for y = 0, 3 do
  1222. links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  1223. end
  1224. end
  1225.  
  1226. for x = 0, 2 do
  1227. for y = 1, 3 do
  1228. links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  1229. end
  1230. end
  1231.  
  1232. render:connect(function()
  1233. for x = 0, 2 do
  1234. for y = 0, 3 do
  1235. if y == 0 then
  1236. points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  1237. else
  1238. points[x][y]:step()
  1239. end
  1240. end
  1241. end
  1242. for i = 1, #links do
  1243. links[i]:step()
  1244. end
  1245. for i = 1, #tris do
  1246. triParts[#triParts + 1] = tris[i].p1
  1247. triParts[#triParts + 1] = tris[i].p2
  1248. end
  1249. tris = {}
  1250. for x = 1, 2 do
  1251. for y = 1, 3 do
  1252. tris[#tris + 1] = drawTri(torso, points[x - 1][y - 1].position, points[x - 1][y].position, points[x][y - 1].position)
  1253. tris[#tris + 1] = drawTri(torso, points[x][y].position, points[x - 1][y].position, points[x][y - 1].position)
  1254. end
  1255. end
  1256. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement