Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.87 KB | None | 0 0
  1. local Killx = Instance.new("ScreenGui")
  2. local Main = Instance.new("Frame")
  3. local Title = Instance.new("Frame")
  4. local Scripts = Instance.new("ScrollingFrame")
  5. local Title = Instance.new("Frame")
  6. local plr = game.Players.LocalPlayer
  7. local CG = game.CoreGui
  8. local TitleLabel = Instance.new("TextLabel")
  9. local Players = Instance.new("Frame")
  10. local Player5 = Instance.new("TextButton")
  11. local Player6 = Instance.new("TextButton")
  12. local Player1 = Instance.new("TextButton")
  13. local Player4 = Instance.new("TextButton")
  14. local Player3 = Instance.new("TextButton")
  15. local Player2 = Instance.new("TextButton")
  16. local TpToPlr = Instance.new("TextButton")
  17. local PlrSelected = Instance.new("TextLabel")
  18. local Lightning = Instance.new("TextButton")
  19. local AimBot = Instance.new("TextButton")
  20. local Fencing = Instance.new("TextButton")
  21. local BirdWings = Instance.new("TextButton")
  22. local Close = Instance.new("TextButton")
  23. local Open = Instance.new("TextButton")
  24. local HackList = Instance.new("TextLabel")
  25.  
  26. Killx.Name = "Killx By Fluxx"
  27. Killx.Parent = CG
  28.  
  29. local CGG = CG["Killx By Fluxx"]
  30.  
  31. Title.Name = "Killx By Fluxx"
  32. Title.Parent = Main
  33. Title.BackgroundColor3 = Color3.new(1, 0.333333, 0.345098)
  34. Title.Size = UDim2.new(0, 500, 0, 35)
  35.  
  36. TitleLabel.Name = "TitleLabel"
  37. TitleLabel.Parent = Title
  38. TitleLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  39. TitleLabel.BackgroundTransparency = 1
  40. TitleLabel.Position = UDim2.new(0, 5, 0, 0)
  41. TitleLabel.Size = UDim2.new(0, 200, 0, 35)
  42. TitleLabel.Font = Enum.Font.SourceSansBold
  43. TitleLabel.FontSize = Enum.FontSize.Size18
  44. TitleLabel.Text = "Killx By Fluxx"
  45. TitleLabel.TextColor3 = Color3.new(0.901961, 0.901961, 0.901961)
  46. TitleLabel.TextSize = 18
  47. TitleLabel.TextXAlignment = Enum.TextXAlignment.Left
  48.  
  49. Main.Name = "Main"
  50. Main.Parent = Killx
  51. Main.BackgroundColor3 = Color3.new(0.101961, 0.101961, 0.101961)
  52. Main.BorderColor3 = Color3.new(0.101961, 0.101961, 0.101961)
  53. Main.Position = UDim2.new(0, 500, 0, 150)
  54. Main.Size = UDim2.new(0, 500, 0, 350)
  55. Main.Visible = true
  56. Main.Draggable = true
  57. Main.Active = true
  58.  
  59. HackList.Name = "HackList"
  60. HackList.Parent = Main
  61. HackList.BackgroundColor3 = Color3.new(1, 0.333333, 0.345098)
  62. HackList.Position = UDim2.new(0, 15, 0, 75)
  63. HackList.Size = UDim2.new(0, 125, 0, 35)
  64. HackList.Font = Enum.Font.SourceSansBold
  65. HackList.FontSize = Enum.FontSize.Size18
  66. HackList.Text = "Hack List"
  67. HackList.TextSize = 15
  68. HackList.TextWrapped = true
  69.  
  70. Scripts.Name = "Scripts"
  71. Scripts.Parent = Main
  72. Scripts.BackgroundColor3 = Color3.new(1, 0.333333, 0.345098)
  73. Scripts.Position = UDim2.new(0, 15, 0, 125)
  74. Scripts.Size = UDim2.new(0, 125, 0, 200)
  75. Scripts.CanvasSize = UDim2.new(0, 0, 1, 60)
  76. Scripts.ScrollBarThickness = 6
  77.  
  78. Lightning.Name = "Lightning"
  79. Lightning.Parent = Scripts
  80. Lightning.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  81. Lightning.Position = UDim2.new(0, 0, 0, 75)
  82. Lightning.Size = UDim2.new(0, 117, 0, 30)
  83. Lightning.Font = Enum.Font.Cartoon
  84. Lightning.FontSize = Enum.FontSize.Size14
  85. Lightning.Text = " LightningBtools"
  86. Lightning.TextSize = 14
  87. Lightning.TextXAlignment = Enum.TextXAlignment.Left
  88.  
  89. AimBot.Name = "AimBot"
  90. AimBot.Parent = Scripts
  91. AimBot.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  92. AimBot.Position = UDim2.new(0, 0, 0, 25)
  93. AimBot.Size = UDim2.new(0, 117, 0, 30)
  94. AimBot.Font = Enum.Font.Cartoon
  95. AimBot.FontSize = Enum.FontSize.Size14
  96. AimBot.Text = " AimBot"
  97. AimBot.TextSize = 14
  98. AimBot.TextXAlignment = Enum.TextXAlignment.Left
  99.  
  100. Fencing.Name = "Fencing"
  101. Fencing.Parent = Scripts
  102. Fencing.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  103. Fencing.Position = UDim2.new(0, 0, 0, 50)
  104. Fencing.Size = UDim2.new(0, 117, 0, 30)
  105. Fencing.Font = Enum.Font.Cartoon
  106. Fencing.FontSize = Enum.FontSize.Size14
  107. Fencing.Text = " Fencing"
  108. Fencing.TextSize = 14
  109. Fencing.TextXAlignment = Enum.TextXAlignment.Left
  110.  
  111. BirdWings.Name = "BirdWings"
  112. BirdWings.Parent = Scripts
  113. BirdWings.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  114. BirdWings.Size = UDim2.new(0, 117, 0, 30)
  115. BirdWings.Font = Enum.Font.Cartoon
  116. BirdWings.FontSize = Enum.FontSize.Size14
  117. BirdWings.Text = " Bird Wings"
  118. BirdWings.TextSize = 14
  119. BirdWings.TextXAlignment = Enum.TextXAlignment.Left
  120.  
  121. Players.Name = "Players"
  122. Players.Parent = Main
  123. Players.BackgroundColor3 = Color3.new(1, 0.333333, 0.345098)
  124. Players.Position = UDim2.new(0, 170, 0, 125)
  125. Players.Size = UDim2.new(0, 160, 0, 180)
  126.  
  127. Player5.Name = "Player5"
  128. Player5.Parent = Players
  129. Player5.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  130. Player5.BorderSizePixel = 0
  131. Player5.Position = UDim2.new(0, 0, 0, 120)
  132. Player5.Size = UDim2.new(0, 160, 0, 30)
  133. Player5.Font = Enum.Font.SciFi
  134. Player5.FontSize = Enum.FontSize.Size14
  135. Player5.Text = ""
  136. Player5.TextSize = 14
  137.  
  138. Player6.Name = "Player6"
  139. Player6.Parent = Players
  140. Player6.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  141. Player6.BorderSizePixel = 0
  142. Player6.Position = UDim2.new(0, 0, 0, 150)
  143. Player6.Size = UDim2.new(0, 160, 0, 30)
  144. Player6.Font = Enum.Font.SciFi
  145. Player6.FontSize = Enum.FontSize.Size14
  146. Player6.Text = ""
  147. Player6.TextSize = 14
  148.  
  149. Player1.Name = "Player1"
  150. Player1.Parent = Players
  151. Player1.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  152. Player1.BorderSizePixel = 0
  153. Player1.Size = UDim2.new(0, 160, 0, 30)
  154. Player1.Font = Enum.Font.SciFi
  155. Player1.FontSize = Enum.FontSize.Size14
  156. Player1.Text = ""
  157. Player1.TextSize = 14
  158.  
  159. Player4.Name = "Player4"
  160. Player4.Parent = Players
  161. Player4.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  162. Player4.BorderSizePixel = 0
  163. Player4.Position = UDim2.new(0, 0, 0, 90)
  164. Player4.Size = UDim2.new(0, 160, 0, 30)
  165. Player4.Font = Enum.Font.SciFi
  166. Player4.FontSize = Enum.FontSize.Size14
  167. Player4.Text = ""
  168. Player4.TextSize = 14
  169.  
  170. Player3.Name = "Player3"
  171. Player3.Parent = Players
  172. Player3.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  173. Player3.BorderSizePixel = 0
  174. Player3.Position = UDim2.new(0, 0, 0, 60)
  175. Player3.Size = UDim2.new(0, 160, 0, 30)
  176. Player3.Font = Enum.Font.SciFi
  177. Player3.FontSize = Enum.FontSize.Size14
  178. Player3.Text = ""
  179. Player3.TextSize = 14
  180.  
  181. Player2.Name = "Player2"
  182. Player2.Parent = Players
  183. Player2.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  184. Player2.BorderSizePixel = 0
  185. Player2.Position = UDim2.new(0, 0, 0, 30)
  186. Player2.Size = UDim2.new(0, 160, 0, 30)
  187. Player2.Font = Enum.Font.SciFi
  188. Player2.FontSize = Enum.FontSize.Size14
  189. Player2.Text = ""
  190. Player2.TextSize = 14
  191.  
  192. PlrSelected.Name = "PlrSelected"
  193. PlrSelected.Parent = Main
  194. PlrSelected.BackgroundColor3 = Color3.new(1, 0.333333, 0.345098)
  195. PlrSelected.Position = UDim2.new(0, 170, 0, 75)
  196. PlrSelected.Size = UDim2.new(0, 160, 0, 35)
  197. PlrSelected.Font = Enum.Font.SourceSansBold
  198. PlrSelected.FontSize = Enum.FontSize.Size18
  199. PlrSelected.Text = " No Player Selected"
  200. PlrSelected.TextSize = 16
  201. PlrSelected.TextWrapped = true
  202.  
  203. TpToPlr.Name = "TpToPlr"
  204. TpToPlr.Parent = Main
  205. TpToPlr.BackgroundColor3 = Color3.new(0.780392, 0.309804, 0.341176)
  206. TpToPlr.Position = UDim2.new(0, 335, 0, 300)
  207. TpToPlr.Size = UDim2.new(0, 160, 0, 30)
  208. TpToPlr.Font = Enum.Font.SciFi
  209. TpToPlr.FontSize = Enum.FontSize.Size14
  210. TpToPlr.Text = "Teleport To Player"
  211. TpToPlr.TextSize = 14
  212.  
  213. Close.Name = "Close"
  214. Close.Parent = Main
  215. Close.BackgroundColor3 = Color3.new(1, 1, 1)
  216. Close.BackgroundTransparency = 1
  217. Close.Position = UDim2.new(0, 475, 0, 8)
  218. Close.Size = UDim2.new(0, 25, 0, 25)
  219. Close.Font = Enum.Font.SciFi
  220. Close.FontSize = Enum.FontSize.Size18
  221. Close.Text = "X"
  222. Close.TextColor3 = Color3.new(0.0470588, 0.52549, 0.631373)
  223. Close.TextSize = 18
  224.  
  225. Open.Name = "Open"
  226. Open.Parent = Killx
  227. Open.BackgroundColor3 = Color3.new(1, 1, 1)
  228. Open.Position = UDim2.new(0, 0, 0, 300)
  229. Open.Size = UDim2.new(0, 50, 0, 25)
  230. Open.Visible = false
  231. Open.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
  232. Open.Font = Enum.Font.SourceSans
  233. Open.FontSize = Enum.FontSize.Size14
  234. Open.Text = "Open"
  235. Open.TextSize = 14
  236.  
  237. CGG.Main.TpToPlr.MouseButton1Down:connect(function()
  238. if CGG.Main.PlrSelected.Text == " No Player Selected" then
  239. warn("No Player Selected")
  240. else
  241. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = workspace[CGG.Main.PlrSelected.Text].HumanoidRootPart.CFrame
  242. end
  243. end)
  244.  
  245.  
  246. CGG.Main.Scripts.AimBot.MouseButton1Down:connect(function()
  247.  
  248. for i,player in pairs(game:GetService('Players'):GetPlayers()) do
  249. if player.TeamColor ~= game:GetService('Players').LocalPlayer.TeamColor then
  250. local weld = Instance.new('Weld',player.Character.Torso)
  251. local part = Instance.new('Part',player.Character)
  252. part.Size = Vector3.new(150,150,150)
  253. part.Material = "Neon"
  254. part.BrickColor = BrickColor.new('Really red')
  255. part.CFrame = player.Character.Torso.CFrame
  256. part.CanCollide = false
  257. weld.C0 = player.Character.Torso.CFrame:inverse()
  258. weld.Part0 = player.Character.Torso
  259. weld.C1 = part.CFrame:inverse()
  260. weld.Part1 = part
  261. end
  262. end
  263. end)
  264.  
  265. CGG.Main.Scripts.Lightning.MouseButton1Down:connect(function()
  266. local isScriptNil = false
  267.  
  268. local PlrName = game.Players.LocalPlayer.Name
  269. local Plrs = game:GetService("Players")
  270. local RunService = game:GetService("RunService")
  271. local Content = game:GetService("ContentProvider")
  272. local LP = Plrs.LocalPlayer
  273. local Char = LP.Character
  274. local PlrGui = LP.PlayerGui
  275. local Backpack = LP.Backpack
  276. local Mouse = LP:GetMouse()
  277.  
  278. local Camera = Workspace.CurrentCamera
  279. local LastCamCF = Camera.CoordinateFrame
  280. local AnimJoints = {}
  281. local Cons = {}
  282. local mDown = false
  283. local Multi = false
  284. local Grabbing = false
  285. local Current = {}
  286. local Alpha = 1
  287. local LightNum = 1
  288.  
  289. Current.Part = nil
  290. Current.BP = nil
  291. Current.BA = nil
  292. Current.Mass = nil
  293.  
  294. local LastPart = nil
  295.  
  296. local Head = Char["Head"]
  297. local Torso = Char["Torso"]
  298. local Humanoid = Char["Humanoid"]
  299. local LA = Char["Left Arm"]
  300. local RA = Char["Right Arm"]
  301. local LL = Char["Left Leg"]
  302. local RL = Char["Right Leg"]
  303.  
  304. local LS, RS;
  305.  
  306. local OrigLS = Torso["Left Shoulder"]
  307. local OrigRS = Torso["Right Shoulder"]
  308.  
  309. for _,v in pairs(Char:GetChildren()) do
  310. if v.Name == ModID then
  311. v:Destroy()
  312. end
  313. end
  314.  
  315. for _,v in pairs(PlrGui:GetChildren()) do
  316. if v.Name == "PadsGui" then
  317. v:Destroy()
  318. end
  319. end
  320.  
  321. local ModID = "Pads"
  322. local Objects = {}
  323. local Grav = 196.2
  324.  
  325. local sin=math.sin
  326. local cos=math.cos
  327. local max=math.max
  328. local min=math.min
  329. local atan2=math.atan2
  330. local random=math.random
  331. local tau = 2 * math.pi
  332.  
  333. local BodyObjects = {
  334. ["BodyVelocity"] = true;
  335. ["BodyAngularVelocity"] = true;
  336. ["BodyForce"] = true;
  337. ["BodyThrust"] = true;
  338. ["BodyPosition"] = true;
  339. ["RocketPropulsion"] = true;
  340. }
  341.  
  342. if LP.Name == PlrName and isScriptNil then
  343. script.Parent = nil
  344. end
  345.  
  346. LP.CameraMode = "Classic"
  347.  
  348. local Assets = {
  349. }
  350.  
  351. local LS0, LS1 = OrigLS.C0, OrigLS.C1
  352. local RS0, RS1 = OrigRS.C0, OrigRS.C1
  353.  
  354. for i,v in pairs(Assets) do
  355. local ID = tostring(Assets[i])
  356. Assets[i] = "http://www.roblox.com/asset/?id=" .. ID
  357. Content:Preload("http://www.roblox.com/asset/?id=" .. ID)
  358. end
  359.  
  360. function QuaternionFromCFrame(cf)
  361. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
  362. local trace = m00 + m11 + m22 if trace > 0 then
  363. local s = math.sqrt(1 + trace);
  364. local recip = 0.5/s;
  365. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5;
  366. else
  367. local i = 0;
  368. if m11 > m00 then
  369. i = 1;
  370. end;
  371. if m22 > (i == 0 and m00 or m11) then
  372. i = 2 end if i == 0 then
  373. local s = math.sqrt(m00-m11-m22+1);
  374. local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip;
  375. elseif i == 1 then
  376. local s = math.sqrt(m11-m22-m00+1);
  377. local recip = 0.5/s;
  378. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip ;
  379. elseif i == 2 then
  380. local s = math.sqrt(m22-m00-m11+1);
  381. local recip = 0.5/s;
  382. return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip;
  383. end;
  384. end;
  385. end;
  386.  
  387. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  388. local xs, ys, zs = x + x, y + y, z + z;
  389. local wx, wy, wz = w*xs, w*ys, w*zs;
  390. local xx = x*xs;
  391. local xy = x*ys;
  392. local xz = x*zs;
  393. local yy = y*ys;
  394. local yz = y*zs;
  395. local zz = z*zs;
  396. 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))
  397. end;
  398.  
  399. function QuaternionSlerp(a, b, t)
  400. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4];
  401. local startInterp, finishInterp;
  402. if cosTheta >= 0.0001 then
  403. if (1 - cosTheta) > 0.0001 then
  404. local theta = math.acos(cosTheta);
  405. local invSinTheta = 1/math.sin(theta);
  406. startInterp = math.sin((1-t)*theta)*invSinTheta;
  407. finishInterp = math.sin(t*theta)*invSinTheta;
  408. else
  409. startInterp = 1-t finishInterp = t;
  410. end;
  411. else
  412. if (1+cosTheta) > 0.0001 then
  413. local theta = math.acos(-cosTheta);
  414. local invSinTheta = 1/math.sin(theta);
  415. startInterp = math.sin((t-1)*theta)*invSinTheta;
  416. finishInterp = math.sin(t*theta)*invSinTheta;
  417. else startInterp = t-1 finishInterp = t;
  418. end;
  419. end;
  420. 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;
  421. end;
  422.  
  423. function CLerp(a,b,t)
  424. local qa={QuaternionFromCFrame(a)};
  425. local qb={QuaternionFromCFrame(b)};
  426. local ax,ay,az=a.x,a.y,a.z;
  427. local bx,by,bz=b.x,b.y,b.z;
  428. local _t=1-t;
  429. return QuaternionToCFrame(_t*ax+t*bx,_t*ay+t*by,_t*az+t*bz,QuaternionSlerp(qa, qb, t));
  430. end
  431.  
  432. function GetWeld(weld)
  433. local obj
  434. for i, v in pairs(AnimJoints) do
  435. if v[1] == weld then
  436. obj = v
  437. break
  438. end
  439. end
  440. if not obj then
  441. obj = {weld,NV}
  442. table.insert(AnimJoints,obj)
  443. end
  444. return weld.C0.p, obj[2]
  445. end
  446.  
  447. function SetWeld(weld, i, loops, origpos, origangle, nextpos, nextangle, override, overrideLower, smooth)
  448. smooth = smooth or 1
  449. local obj
  450. for i, v in pairs(AnimJoints) do
  451. if v[1] == weld then
  452. obj = v
  453. break
  454. end
  455. end
  456. if not obj then
  457. obj = {weld,NV}
  458. table.insert(AnimJoints,obj)
  459. end
  460.  
  461. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  462.  
  463. local tox,toy,toz = 0,0,0
  464. tox = math.abs(origangle.x - nextangle.x) *perc
  465. toy = math.abs(origangle.y - nextangle.y) *perc
  466. toz = math.abs(origangle.z - nextangle.z) *perc
  467. tox = ((origangle.x > nextangle.x and -tox) or tox)
  468. toy = ((origangle.y > nextangle.y and -toy) or toy)
  469. toz = ((origangle.z > nextangle.z and -toz) or toz)
  470.  
  471. local tox2,toy2,toz2 = 0,0,0
  472. tox2 = math.abs(origpos.x - nextpos.x) *perc
  473. toy2 = math.abs(origpos.y - nextpos.y) *perc
  474. toz2 = math.abs(origpos.z - nextpos.z) *perc
  475. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  476. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  477. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  478.  
  479. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  480. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  481. end
  482.  
  483. function RotateCamera(x, y)
  484. 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)
  485. end
  486.  
  487. function GetAngles(cf)
  488. local lv = cf.lookVector
  489. return -math.asin(lv.y), math.atan2(lv.x, -lv.z)
  490. end
  491.  
  492. local LastCamCF = Camera.CoordinateFrame
  493.  
  494. function Look()
  495. if AlphaOn == true then
  496. local x, y = GetAngles(LastCamCF:toObjectSpace(Camera.CoordinateFrame))
  497. Camera.CoordinateFrame = LastCamCF
  498. RotateCamera(x * -(Alpha), y * -(Alpha))
  499. LastCamCF = Camera.CoordinateFrame
  500. end
  501. end
  502.  
  503. function Cor(Func)
  504. local Ok, Err = coroutine.resume(coroutine.create(Func))
  505. if not Ok then
  506. print(Err)
  507. end
  508. end
  509.  
  510. function Cor2(Func)
  511. local Ok, Err = ypcall(Func)
  512. if not Ok then
  513. print(Err)
  514. end
  515. end
  516.  
  517. function MakePads()
  518. -- 1 - VTelekinesis
  519. P1 = Instance.new("Model")
  520. P1.Name = ModID
  521.  
  522. -- 2 - RBase
  523. P2 = Instance.new("Part")
  524. P2.CFrame = CFrame.new(Vector3.new(21.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  525. P2.FormFactor = Enum.FormFactor.Custom
  526. P2.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  527. P2.Anchored = true
  528. P2.BrickColor = BrickColor.new("White")
  529. P2.Friction = 0.30000001192093
  530. P2.Shape = Enum.PartType.Block
  531. P2.Name = "RBase"
  532. P2.Parent = P1
  533. P2.Transparency = 1
  534. -- 3 - Mesh
  535. P3 = Instance.new("CylinderMesh")
  536. P3.Scale = Vector3.new(1, 0.5, 1)
  537. P3.Parent = P2
  538.  
  539. -- 4 - LBase
  540. P4 = Instance.new("Part")
  541. P4.CFrame = CFrame.new(Vector3.new(18.100008, 1.95000589, 11.899971)) * CFrame.Angles(-0, 0, -0)
  542. P4.FormFactor = Enum.FormFactor.Custom
  543. P4.Size = Vector3.new(0.799999952, 0.200000003, 0.800000012)
  544. P4.Anchored = true
  545. P4.BrickColor = BrickColor.new("White")
  546. P4.Friction = 0.30000001192093
  547. P4.Shape = Enum.PartType.Block
  548. P4.Name = "LBase"
  549. P4.Parent = P1
  550. P4.Transparency = 1
  551. -- 5 - Mesh
  552. P5 = Instance.new("CylinderMesh")
  553. P5.Scale = Vector3.new(1, 0.5, 1)
  554. P5.Parent = P4
  555.  
  556. -- 7 - Mesh
  557. P7 = Instance.new("CylinderMesh")
  558. P7.Scale = Vector3.new(1, 0.5, 1)
  559. P7.Parent = P6
  560.  
  561.  
  562.  
  563. -- 9 - Mesh
  564. P9 = Instance.new("CylinderMesh")
  565. P9.Scale = Vector3.new(1, 0.5, 1)
  566. P9.Parent = P8
  567.  
  568.  
  569.  
  570. -- 11 - Mesh
  571. P11 = Instance.new("CylinderMesh")
  572. P11.Scale = Vector3.new(1, 0.5, 1)
  573. P11.Parent = P10
  574.  
  575.  
  576. -- 13 - Mesh
  577. P13 = Instance.new("CylinderMesh")
  578. P13.Scale = Vector3.new(1, 0.5, 1)
  579. P13.Parent = P12
  580.  
  581.  
  582. -- 15 - Mesh
  583. P15 = Instance.new("CylinderMesh")
  584. P15.Scale = Vector3.new(1, 0.5, 1)
  585. P15.Parent = P14
  586.  
  587. -- 17 - Mesh
  588. P17 = Instance.new("CylinderMesh")
  589. P17.Scale = Vector3.new(1, 0.5, 1)
  590. P17.Parent = P16
  591.  
  592. P1.Parent = LP.Character
  593. P1:MakeJoints()
  594. return P1
  595. end
  596.  
  597. weldModel = function(model, unanchor, rooty)
  598. local parts = {}
  599. local function recurse(object)
  600. if object:IsA("BasePart") then
  601. table.insert(parts, object)
  602. end
  603. for _,child in pairs(object:GetChildren()) do
  604. recurse(child)
  605. end
  606. end
  607. recurse(model)
  608.  
  609. local rootPart = rooty or parts[1]
  610. for _, part in pairs(parts) do
  611. local cframe = rootPart.CFrame:toObjectSpace(part.CFrame)
  612. local weld = Instance.new("Weld")
  613. weld.Part0 = rootPart
  614. weld.Part1 = part
  615. weld.C0 = cframe
  616. weld.Parent = rootPart
  617. end
  618.  
  619. if unanchor then
  620. for _, part in pairs(parts) do
  621. part.Anchored = false
  622. part.CanCollide = false
  623. end
  624. end
  625. end
  626.  
  627. weldItem = function(rootPart, Item, TheC0, unanchor, ParentItem)
  628. local cframe = TheC0 or rootPart.CFrame:toObjectSpace(Item.CFrame)
  629. local weld = Instance.new("Weld")
  630. weld.Name = "Weld"
  631. weld.Part0 = rootPart
  632. weld.Part1 = Item
  633. weld.C0 = cframe
  634. weld.Parent = ParentItem and Item or rootPart
  635.  
  636. if unanchor then
  637. Item.Anchored = false
  638. end
  639. return weld, cframe
  640. end
  641.  
  642. scaleModel = function(model, scale)
  643. local parts = {}
  644. local function recurse(object)
  645. if object:IsA("BasePart") then
  646. table.insert(parts, object)
  647. end
  648. for _,child in pairs(object:GetChildren()) do
  649. recurse(child)
  650. end
  651. end
  652. recurse(model)
  653.  
  654. local top, bottom, left, right, back, front
  655. for _, part in pairs(parts) do
  656. if top == nil or top < part.Position.y then top = part.Position.y end
  657. if bottom == nil or bottom > part.Position.y then bottom = part.Position.y end
  658. if left == nil or left > part.Position.x then left = part.Position.x end
  659. if right == nil or right < part.Position.x then right = part.Position.x end
  660. if back == nil or back > part.Position.z then back = part.Position.z end
  661. if front == nil or front < part.Position.z then front = part.Position.z end
  662. end
  663.  
  664. local middle = Vector3.new( left+right, top+bottom, back+front )/2
  665. local minSize = Vector3.new(0.2, 0.2, 0.2)
  666.  
  667. for _, part in pairs(parts) do
  668. local foo = part.CFrame.p - middle
  669. local rotation = part.CFrame - part.CFrame.p
  670. local newSize = part.Size*scale
  671. part.FormFactor = "Custom"
  672. part.Size = newSize
  673. part.CFrame = CFrame.new( middle + foo*scale ) * rotation
  674.  
  675. if newSize.x < minSize.x or newSize.y < minSize.y or newSize.z < minSize.z then
  676. local mesh
  677. for _, child in pairs(part:GetChildren()) do
  678. if child:IsA("DataModelMesh") then
  679. mesh = child
  680. break
  681. end
  682. end
  683.  
  684. if mesh == nil then
  685. mesh = Instance.new("BlockMesh", part)
  686. end
  687.  
  688. local oScale = mesh.Scale
  689. local newScale = newSize/minSize * oScale
  690. if 0.2 < newSize.x then newScale = Vector3.new(1 * oScale.x, newScale.y, newScale.z) end
  691. if 0.2 < newSize.y then newScale = Vector3.new(newScale.x, 1 * oScale.y, newScale.z) end
  692. if 0.2 < newSize.z then newScale = Vector3.new(newScale.x, newScale.y, 1 * oScale.z) end
  693.  
  694. mesh.Scale = newScale
  695. end
  696. end
  697. end
  698.  
  699. function getMass(Obj, Total)
  700. local newTotal = Total
  701. local returnTotal = 0
  702.  
  703. if Obj:IsA("BasePart") then
  704. newTotal = newTotal + Objects[Obj]
  705. elseif BodyObjects[Obj.ClassName] then
  706. Obj:Destroy()
  707. end
  708.  
  709. if Obj:GetChildren() and #Obj:GetChildren() > 0 then
  710. for _,v in pairs(Obj:GetChildren()) do
  711. returnTotal = returnTotal + getMass(v, newTotal)
  712. end
  713. else
  714. returnTotal = newTotal
  715. end
  716.  
  717. return returnTotal
  718. end
  719.  
  720. function getTargFromCurrent()
  721. local Current = Current.Part
  722. if Current:IsA("BasePart") then
  723. return Current
  724. elseif Current:findFirstChild("Torso") then
  725. return Current.Torso
  726. else
  727. for _,v in pairs(Current:GetChildren()) do
  728. if v:IsA("BasePart") then
  729. return v
  730. end
  731. end
  732. end
  733. end
  734.  
  735. function Fire(Part, Vec, Inv)
  736. pcall(function()
  737. Current.BP:Destroy()
  738. Current.BP = nil
  739. end)
  740. pcall(function()
  741. Current.BA:Destroy()
  742. Current.BA = nil
  743. end)
  744. pcall(function()
  745. if Inv then
  746. Part.Velocity = -((Vec - Torso.Position).unit * Grav * 1.1)
  747. else
  748. Part.Velocity = ((Vec - Camera.CoordinateFrame.p).unit * Grav * 1.1)
  749. end
  750. Current.Mass = nil
  751. end)
  752. Reset()
  753. end
  754.  
  755. function Reset()
  756. LS.Parent = nil
  757. RS.Parent = nil
  758.  
  759. OrigLS.Parent = Torso
  760. OrigRS.Parent = Torso
  761.  
  762. OrigLS.C0 = LS0
  763. OrigRS.C0 = RS0
  764. end
  765.  
  766. function Start()
  767. Cor(function()
  768. repeat wait(1/30) until LP.Character and LP.Character.Parent == Workspace and LP.Character:findFirstChild("Torso")
  769. Char = LP.Character
  770. PlrGui = LP.PlayerGui
  771. Backpack = LP.Backpack
  772. Mouse = LP:GetMouse()
  773.  
  774. for _,v in pairs(Cons) do
  775. v:disconnect()
  776. end
  777. Cons = {}
  778.  
  779. Camera = Workspace.CurrentCamera
  780. LastCamCF = Camera.CoordinateFrame
  781. AnimJoints = {}
  782. mDown = false
  783. Multi = false
  784. Grabbing = false
  785. Current = {}
  786. Alpha = 1
  787.  
  788. Head = Char["Head"]
  789. Torso = Char["Torso"]
  790. Humanoid = Char["Humanoid"]
  791. LA = Char["Left Arm"]
  792. RA = Char["Right Arm"]
  793. LL = Char["Left Leg"]
  794. RL = Char["Right Leg"]
  795.  
  796. OrigLS = Torso["Left Shoulder"]
  797. OrigRS = Torso["Right Shoulder"]
  798.  
  799. for _,v in pairs(Char:GetChildren()) do
  800. if v.Name == ModID then
  801. v:Destroy()
  802. end
  803. end
  804.  
  805. for _,v in pairs(PlrGui:GetChildren()) do
  806. if v.Name == "PadsGui" then
  807. v:Destroy()
  808. end
  809. end
  810.  
  811. LS = Instance.new("Weld")
  812. RS = Instance.new("Weld")
  813.  
  814. LS.Name = OrigLS.Name
  815. LS.Part0 = Torso
  816. LS.Part1 = LA
  817. LS.C0 = LS0
  818. LS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  819.  
  820. RS.Name = OrigRS.Name
  821. RS.Part0 = Torso
  822. RS.Part1 = RA
  823. RS.C0 = RS0
  824. RS.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  825.  
  826. local Pads = MakePads()
  827. local LPad = Pads.LBase
  828. local RPad = Pads.RBase
  829.  
  830. weldModel(LPad, true, LPad)
  831. weldModel(RPad, true, RPad)
  832.  
  833. local GripWeldL = Instance.new("Weld")
  834. GripWeldL.Name = "GripWeldL"
  835. GripWeldL.Part0 = LA
  836. GripWeldL.Part1 = LPad
  837. GripWeldL.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  838. GripWeldL.Parent = LA
  839.  
  840. local GripWeldR = Instance.new("Weld")
  841. GripWeldR.Name = "GripWeldR"
  842. GripWeldR.Part0 = RA
  843. GripWeldR.Part1 = RPad
  844. GripWeldR.C0 = CFrame.new(0, -1.05, 0) * CFrame.Angles(0, math.rad(180), 0)
  845. GripWeldR.Parent = RA
  846.  
  847. local isParts = false
  848.  
  849. table.insert(Cons, Mouse.KeyDown:connect(function(Key)
  850. Key = Key:lower()
  851. if Key == "z" then
  852. --Stuff
  853. elseif Key == "f" then
  854. local Current = Current.Part
  855. if Current and Current.Parent ~= nil and not Multi then
  856. Current:BreakJoints()
  857. end
  858. elseif Key == "q" then
  859. if isParts then
  860. isParts = false
  861. for _,v in pairs(Workspace:GetChildren()) do
  862. if v.Name == "MyPartV" and v:IsA("BasePart") then
  863. v:Destroy()
  864. end
  865. end
  866. else
  867. isParts = true
  868. for i = 1, 50 do
  869. local Part = Instance.new("Part")
  870. Part.Color = Color3.new(math.random(), math.random(), math.random())
  871. Part.Transparency = 0
  872. Part.Size = Vector3.new(math.random(1, 3), math.random(1, 3), math.random(1, 3))
  873. Part.Archivable = true
  874. Part.CanCollide = false
  875. Part.Material = "Neon"
  876. Part.Locked = false
  877. Part.CFrame = Torso.CFrame * CFrame.new(math.random(-15, 15), -1, math.random(-15, 15))
  878. Part.Anchored = true
  879. Part.Name = "MyPartV"
  880. Part.TopSurface = "Smooth"
  881. Part.BottomSurface = "Smooth"
  882. Part.Parent = Workspace
  883. end
  884. end
  885. elseif Key == "e" then
  886. local Targ;
  887. if Current.Part and Current.Part ~= nil then
  888. Targ = getTargFromCurrent()
  889. else
  890. Targ = LastPart
  891. end
  892. if Targ and Targ.Parent ~= nil and not Multi then
  893. local Ex = Instance.new("Explosion", Workspace)
  894. Ex.Position = Targ.CFrame.p
  895. Ex.BlastRadius = 16
  896. Ex.DestroyJointRadiusPercent = 0.5
  897. end
  898. elseif Key == "c" then
  899. if Current.Part and Current.Part.Parent ~= nil and not Multi then
  900. local Part = getTargFromCurrent()
  901. if Part then
  902. Grabbing = false
  903. if Mouse.Hit then
  904. local TargPos = CFrame.new(Camera.CoordinateFrame.p, Mouse.Hit.p) * CFrame.new(0, 0, -1000)
  905. Fire(Part, TargPos.p)
  906. else
  907. Fire(Part, Mouse.Origin.p + Mouse.UnitRay.Direction, true)
  908. end
  909. end
  910. end
  911. end
  912. end))
  913.  
  914. table.insert(Cons, Mouse.Button1Up:connect(function()
  915. mDown = false
  916. if Grabbing == true and Multi == false then
  917. Grabbing = false
  918. Reset()
  919. end
  920. if Current.Part ~= nil then
  921. LastPart = getTargFromCurrent()
  922. Current = {}
  923. end
  924. end))
  925.  
  926. local function makeLightning(Par, Start, End, Width, Length, RandomScale, ArcScale, Num1)
  927. local oldParts = {}
  928. for _,v in pairs(Par:GetChildren()) do
  929. v.CFrame = CFrame.new(5e5, 5e5, 5e5)
  930. table.insert(oldParts, v)
  931. end
  932. local Distance = (Start-End).Magnitude
  933. local ArcScale = ArcScale or 1
  934. local RandomScale = RandomScale or 0
  935. local Last = Start
  936. local IterNum = 0
  937.  
  938. while Par.Parent do
  939. IterNum = IterNum + 1
  940. local New = nil
  941. if (Last-End).Magnitude < Length then
  942. New = CFrame.new(End)
  943. else
  944. if (End-Last).Magnitude < Length*2 then
  945. RandomScale = RandomScale*0.5
  946. ArcScale = ArcScale*0.5
  947. end
  948. local Direct = CFrame.new(Last,End)
  949. New = Direct*CFrame.Angles(math.rad(math.random(-RandomScale/4,RandomScale*ArcScale)),math.rad(math.random(-RandomScale,RandomScale)),math.rad(math.random(-RandomScale,RandomScale)))
  950. New = New*CFrame.new(0,0,-Length)
  951. end
  952. local Trail = nil
  953. if oldParts[IterNum] then
  954. Trail = oldParts[IterNum]
  955. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("Cyan")
  956. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  957. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  958. oldParts[IterNum] = nil
  959. else
  960. Trail = Instance.new("Part")
  961. Trail.Name = "Part"
  962. Trail.FormFactor = "Custom"
  963. Trail.BrickColor = ((Num1 % 2 == 0) and BrickColor.new("White")) or BrickColor.new("White")
  964. Trail.Transparency = 0
  965. Trail.Anchored = true
  966. Trail.CanCollide = false
  967. Trail.Locked = true
  968. Trail.BackSurface = "SmoothNoOutlines"
  969. Trail.BottomSurface = "SmoothNoOutlines"
  970. Trail.FrontSurface = "SmoothNoOutlines"
  971. Trail.LeftSurface = "SmoothNoOutlines"
  972. Trail.RightSurface = "SmoothNoOutlines"
  973. Trail.TopSurface = "SmoothNoOutlines"
  974. Trail.Material = "Neon"
  975. Trail.Size = Vector3.new(Width, (Last-New.p).Magnitude, Width)
  976. Trail.CFrame = CFrame.new(New.p, Last)*CFrame.Angles(math.rad(90),0,0)*CFrame.new(0, -(Last-New.p).Magnitude/2, 0)
  977. Trail.Parent = Par
  978. end
  979. Last = New.p
  980. if (Last-End).Magnitude < 1 then
  981. break
  982. end
  983. end
  984. for _,v in pairs(oldParts) do
  985. v:Destroy()
  986. end
  987. end
  988.  
  989. table.insert(Cons, Mouse.Button1Down:connect(function()
  990. mDown = true
  991. local Targ = Mouse.Target
  992. Cor(function()
  993. if Targ and Objects[Targ] and not Multi then
  994. Grabbing = true
  995. Current.Part = Targ
  996. local Mass = Objects[Targ]
  997. local ForceNum = 0
  998. local Hum = nil
  999.  
  1000. for _,v in pairs(Targ:GetChildren()) do
  1001. if BodyObjects[v.ClassName] then
  1002. v:Destroy()
  1003. end
  1004. end
  1005.  
  1006. for _,v in pairs(Workspace:GetChildren()) do
  1007. if v:findFirstChild("Humanoid") and v:IsAncestorOf(Targ) then
  1008. Hum = v.Humanoid
  1009. Mass = getMass(v, 0)
  1010. Current.Part = v
  1011. break
  1012. end
  1013. end
  1014.  
  1015. Current.Mass = Mass
  1016.  
  1017. if not Hum then
  1018. Targ:BreakJoints()
  1019. end
  1020.  
  1021. ForceNum = Mass * Grav
  1022. Targ.CanCollide = true
  1023. Targ.Anchored = false
  1024.  
  1025. local BP = Instance.new("BodyPosition")
  1026. BP.maxForce = Vector3.new(3 * ForceNum, 3 * ForceNum, 3 * ForceNum)
  1027. BP.Parent = Targ
  1028.  
  1029. local Ang = Instance.new("BodyAngularVelocity")
  1030. Ang.Parent = Targ
  1031.  
  1032. Current.BP = BP
  1033. Current.BA = Ang
  1034.  
  1035. OrigLS.Parent = nil
  1036. OrigRS.Parent = nil
  1037.  
  1038. LS.Parent = Torso
  1039. RS.Parent = Torso
  1040.  
  1041. LS.C0 = LS0
  1042. RS.C0 = RS0
  1043.  
  1044. local DirDot = Mouse.UnitRay.Direction:Dot(Targ.Position - Mouse.Origin.p)
  1045. local BPPos = Vector3.new(0, 0, 0)
  1046. local Vel = Vector3.new(0, 0, 0)
  1047. local Vlev = random() * math.pi
  1048. local RPos = Vector3.new(random() * 2 - 1, cos(Vlev), random() * 2 - 1)
  1049.  
  1050. local Ball = Instance.new("Part")
  1051. Ball.Name = "Ball"
  1052. Ball.FormFactor = "Custom"
  1053. Ball.Color = Color3.new(0, 1, 1)
  1054. Ball.Transparency = 0.3
  1055. Ball.Anchored = true
  1056. Ball.CanCollide = false
  1057. Ball.Locked = true
  1058. Ball.BottomSurface, Ball.TopSurface = "Smooth", "Smooth"
  1059. Ball.Size = Vector3.new(0.5, 0.5, 0.5)
  1060. Ball.CFrame = Torso.CFrame * CFrame.new(0, 1, -3)
  1061. Ball.Parent = Char
  1062.  
  1063. if Targ.Name == "MyPartV" then
  1064. Targ.Name = "MyPartF"
  1065. end
  1066.  
  1067. local LightMod = Instance.new("Model", Char)
  1068.  
  1069. local Mesh = Instance.new("SpecialMesh")
  1070. Mesh.MeshType = "Sphere"
  1071. Mesh.Parent = Ball
  1072.  
  1073. local Size = 0.5
  1074. local Rise = true
  1075.  
  1076. while Grabbing and BP and Ang and Targ.Parent ~= nil do
  1077. local BPPos = Mouse.Origin.p + Mouse.UnitRay.Direction * DirDot
  1078. Ang.angularvelocity = Vel
  1079. BP.position = BPPos + RPos
  1080. 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)))
  1081. 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)))
  1082. Vlev = (Vlev + 0.05) % tau
  1083.  
  1084. if Hum then
  1085. Hum.Sit = true
  1086. end
  1087.  
  1088. if LA.Parent ~= nil and RA.Parent ~= nil then
  1089. local LPos = (LA.CFrame * CFrame.new(0, -1, 0)).p
  1090. local RPos = (RA.CFrame * CFrame.new(0, -1, 0)).p
  1091. if Rise == true then
  1092. if Size < 0.6 then
  1093. Size = Size + 0.05
  1094. else
  1095. Size = Size + 0.1
  1096. end
  1097. if Size >= 2.2 then
  1098. Rise = false
  1099. end
  1100. else
  1101. if Size > 2.1 then
  1102. Size = Size - 0.05
  1103. else
  1104. Size = Size - 0.1
  1105. end
  1106. if Size <= 0.5 then
  1107. Rise = true
  1108. end
  1109. end
  1110. Ball.Size = Vector3.new(Size, Size, Size)
  1111. Ball.CFrame = CFrame.new(LPos:Lerp(RPos, 0.5), Targ.Position) * CFrame.new(0, 0, -2.2)
  1112. LightNum = LightNum + 1
  1113. makeLightning(LightMod, Ball.Position, Targ.Position, 0.2, 4, 50, 1, LightNum)
  1114. elseif Ball.Parent ~= nil then
  1115. Ball:Destroy()
  1116. end
  1117.  
  1118. if LS and LS.Parent == Torso then
  1119. 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))
  1120. end
  1121. if RS and RS.Parent == Torso then
  1122. 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))
  1123. end
  1124. RunService.Heartbeat:wait()
  1125. end
  1126.  
  1127. coroutine.resume(coroutine.create(function()
  1128. for i = 0.5, 1, 0.1 do
  1129. for i2,v in pairs(LightMod:GetChildren()) do
  1130. --v.Light.Range = 6-(i*5)
  1131. v.Transparency = i
  1132. end
  1133. wait(1/30)
  1134. end
  1135. LightMod:Destroy()
  1136. end))
  1137.  
  1138. if BP and BP.Parent ~= nil then
  1139. BP:Destroy()
  1140. end
  1141.  
  1142. if Ang and Ang.Parent ~= nil then
  1143. Ang:Destroy()
  1144. end
  1145.  
  1146. pcall(function() Ball:Destroy() end)
  1147. end
  1148. end)
  1149. end))
  1150. end)
  1151. end
  1152.  
  1153. function Add(Obj)
  1154. if Obj:IsA("BasePart") and not Objects[Obj] and not (Obj.Name == "Base" and Obj.ClassName == "Part") then
  1155. Objects[Obj] = Obj:GetMass()
  1156. Obj.Changed:connect(function(P)
  1157. if P:lower() == "size" and Objects[Obj] and Obj.Parent ~= nil then
  1158. Objects[Obj] = Obj:GetMass()
  1159. end
  1160. end)
  1161. end
  1162. end
  1163.  
  1164. function Rem(Obj)
  1165. if Objects[Obj] then
  1166. Objects[Obj] = nil
  1167. end
  1168. end
  1169.  
  1170. function Recursion(Obj)
  1171. ypcall(function()
  1172. Add(Obj)
  1173. if #Obj:GetChildren() > 0 then
  1174. for _,v in pairs(Obj:GetChildren()) do
  1175. Recursion(v)
  1176. end
  1177. end
  1178. end)
  1179. end
  1180.  
  1181. Workspace.DescendantAdded:connect(function(Obj)
  1182. Add(Obj)
  1183. end)
  1184.  
  1185. Workspace.DescendantRemoving:connect(function(Obj)
  1186. Rem(Obj)
  1187. end)
  1188.  
  1189. for _,v in pairs(Workspace:GetChildren()) do
  1190. Recursion(v)
  1191. end
  1192.  
  1193. Start()
  1194.  
  1195. if LP.Name == PlrName then
  1196. LP.CharacterAdded:connect(Start)
  1197. end
  1198.  
  1199. local verlet = {}
  1200. verlet.step_time = 1 / 50
  1201. verlet.gravity = Vector3.new(0, -10, 0)
  1202.  
  1203. local char = game.Players.LocalPlayer.Character
  1204. local torso = char:WaitForChild("Torso")
  1205. local parts = {}
  1206. local render = game:GetService("RunService").RenderStepped
  1207.  
  1208. wait(2)
  1209.  
  1210. local point = {}
  1211. local link = {}
  1212. local rope = {}
  1213.  
  1214. local function ccw(A,B,C)
  1215. return (C.y-A.y) * (B.x-A.x) > (B.y-A.y) * (C.x-A.x)
  1216. end
  1217.  
  1218. local function intersect(A,B,C,D)
  1219. return ccw(A,C,D) ~= ccw(B,C,D) and ccw(A,B,C) ~= ccw(A,B,D)
  1220. end
  1221.  
  1222. local function vec2(v)
  1223. return Vector2.new(v.x, v.z)
  1224. end
  1225.  
  1226. function point:step()
  1227. if not self.fixed then
  1228. local derivative = (self.position - self.last_position) * 0.95
  1229. self.last_position = self.position
  1230. self.position = self.position + derivative + (self.velocity * verlet.step_time ^ 2)
  1231. --[[local torsoP = torso.CFrame * CFrame.new(-1, 0, 0.5)
  1232. local torsoE = torso.CFrame * CFrame.new(1, 0, 0.5)
  1233. local pointE = self.position + torso.CFrame.lookVector * 100
  1234. local doIntersect = intersect(vec2(torsoP.p), vec2(torsoE.p), vec2(self.position), vec2(pointE))
  1235. if not doIntersect then
  1236. self.postition = self.position - torso.CFrame.lookVector * 10
  1237. end]]
  1238. end
  1239. end
  1240.  
  1241. function link:step()
  1242. for i = 1, 1 do
  1243. local distance = self.point1.position - self.point2.position
  1244. local magnitude = distance.magnitude
  1245. local differance = (self.length - magnitude) / magnitude
  1246. local translation = ((self.point1.fixed or self.point2.fixed) and 1 or 0.6) * distance * differance
  1247. if not self.point1.fixed then
  1248. self.point1.position = self.point1.position + translation
  1249. end
  1250. if not self.point2.fixed then
  1251. self.point2.position = self.point2.position - translation
  1252. end
  1253. end
  1254. end
  1255.  
  1256. function verlet.new(class, a, b, c)
  1257. if class == "Point" then
  1258. local new = {}
  1259. setmetatable(new, {__index = point})
  1260. new.class = class
  1261. new.position = a or Vector3.new()
  1262. new.last_position = new.position
  1263. new.velocity = verlet.gravity
  1264. new.fixed = false
  1265. return new
  1266. elseif class == "Link" then
  1267. local new = {}
  1268. setmetatable(new, {__index = link})
  1269. new.class = class
  1270. new.point1 = a
  1271. new.point2 = b
  1272. new.length = c or (a.position - b.position).magnitude
  1273. return new
  1274. elseif class == "Rope" then
  1275. local new = {}
  1276. setmetatable(new, {__index = link})
  1277. new.class = class
  1278. new.start_point = a
  1279. new.finish_point = b
  1280. new.points = {}
  1281. new.links = {}
  1282. local inc = (b - a) / 10
  1283. for i = 0, 10 do
  1284. table.insert(new.points, verlet.new("Point", a + (i * inc)))
  1285. end
  1286. for i = 2, #new.points do
  1287. table.insert(new.links, verlet.new("Link", new.points[i - 1], new.points[i]))
  1288. end
  1289. return new
  1290. end
  1291. end
  1292.  
  1293. local tris = {}
  1294. local triParts = {}
  1295.  
  1296. local function GetDiscoColor(hue)
  1297. local section = hue % 1 * 3
  1298. local secondary = 0.5 * math.pi * (section % 1)
  1299. if section < 1 then
  1300. return Color3.new(0, 0, 0)
  1301. elseif section < 2 then
  1302. return Color3.new(0, 0, 0)
  1303. else
  1304. return Color3.new(0, 0, 0)
  1305. end
  1306. end
  1307.  
  1308. local function setupPart(part)
  1309. part.Anchored = true
  1310. part.FormFactor = 3
  1311. part.CanCollide = false
  1312. part.TopSurface = 10
  1313. part.BottomSurface = 10
  1314. part.LeftSurface = 10
  1315. part.RightSurface = 10
  1316. part.FrontSurface = 10
  1317. part.BackSurface = 10
  1318. part.Material = "Neon"
  1319. local m = Instance.new("SpecialMesh", part)
  1320. m.MeshType = "Wedge"
  1321. m.Scale = Vector3.new(0.2, 1, 1)
  1322. return part
  1323. end
  1324.  
  1325. local function CFrameFromTopBack(at, top, back)
  1326. local right = top:Cross(back)
  1327. 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)
  1328. end
  1329.  
  1330. local function drawTri(parent, a, b, c)
  1331. local this = {}
  1332. local mPart1 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1333. local mPart2 = table.remove(triParts, 1) or setupPart(Instance.new("Part"))
  1334. function this:Set(a, b, c)
  1335. local ab, bc, ca = b-a, c-b, a-c
  1336. local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude
  1337. local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm))
  1338. local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm))
  1339. local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam))
  1340. if edg1 < edg2 then
  1341. if edg1 >= edg3 then
  1342. a, b, c = c, a, b
  1343. ab, bc, ca = ca, ab, bc
  1344. abm = cam
  1345. end
  1346. else
  1347. if edg2 < edg3 then
  1348. a, b, c = b, c, a
  1349. ab, bc, ca = bc, ca, ab
  1350. abm = bcm
  1351. else
  1352. a, b, c = c, a, b
  1353. ab, bc, ca = ca, ab, bc
  1354. abm = cam
  1355. end
  1356. end
  1357.  
  1358. local len1 = -ca:Dot(ab)/abm
  1359. local len2 = abm - len1
  1360. local width = (ca + ab.unit*len1).magnitude
  1361.  
  1362. local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit)
  1363.  
  1364. if len1 > 0.2 then
  1365. mPart1.Parent = parent
  1366. mPart1.Size = Vector3.new(0.2, width, len1)
  1367. mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
  1368. else
  1369. mPart1.Parent = nil
  1370. end
  1371.  
  1372. if len2 > 0.2 then
  1373. mPart2.Parent = parent
  1374. mPart2.Size = Vector3.new(0.2, width, len2)
  1375. mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
  1376. else
  1377. mPart2.Parent = nil
  1378. end
  1379. end
  1380. function this:SetProperty(prop, value)
  1381. mPart1[prop] = value
  1382. mPart2[prop] = value
  1383. end
  1384. this:Set(a, b, c)
  1385. function this:Destroy()
  1386. mPart1:Destroy()
  1387. mPart2:Destroy()
  1388. end
  1389. this.p1 = mPart1
  1390. this.p2 = mPart2
  1391. this.p1.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p1.CFrame.Y * 0.5 + time())))
  1392. this.p2.BrickColor = BrickColor.new(GetDiscoColor(math.noise(0.5, 0.5, this.p2.CFrame.Y * 0.5 + time())))
  1393. return this
  1394. end
  1395.  
  1396. function verlet.draw(object, id)
  1397. if object.class == "Point" then
  1398. local part = parts[id]
  1399. part.BrickColor = BrickColor.new(107, 0, 107)
  1400. part.Transparency = 0
  1401. part.formFactor = 3
  1402. part.Anchored = true
  1403. part.CanCollide = false
  1404. part.TopSurface = 0
  1405. part.BottomSurface = 0
  1406. part.Size = Vector3.new(0.35, 0.35, 0.35)
  1407. part.Material = "Neon"
  1408. part.CFrame = CFrame.new(object.position)
  1409. part.Parent = torso
  1410. return part
  1411. elseif object.class == "Link" then
  1412. local part = parts[id]
  1413. local dist = (object.point1.position - object.point2.position).magnitude
  1414. part.Size = Vector3.new(0.2, 0.2, dist)
  1415. part.CFrame = CFrame.new(object.point1.position, object.point2.position) * CFrame.new(0, 0, dist * -0.5)
  1416. part.Parent = torso
  1417. return part
  1418. end
  1419. end
  1420.  
  1421. function verlet.clear()
  1422. for _, v in pairs(workspace:GetChildren()) do
  1423. if v.Name == "Part" then
  1424. v:Destroy()
  1425. end
  1426. end
  1427. end
  1428.  
  1429. local points = {}
  1430. local links = {}
  1431.  
  1432. for x = 0, 2 do
  1433. points[x] = {}
  1434. for y = 0, 3 do
  1435. points[x][y] = verlet.new("Point", torso.Position + Vector3.new(x * 0.8 - 2, 2 - y * 0.8, 5 + y * 0.4))
  1436. points[x][y].fixed = y == 0
  1437. end
  1438. end
  1439.  
  1440. for x = 1, 2 do
  1441. for y = 0, 3 do
  1442. links[#links + 1] = verlet.new("Link", points[x][y], points[x - 1][y], 1 + y * 0.08)
  1443. end
  1444. end
  1445.  
  1446. for x = 0, 2 do
  1447. for y = 1, 3 do
  1448. links[#links + 1] = verlet.new("Link", points[x][y], points[x][y - 1], 1.2 + y * 0.03)
  1449. end
  1450. end
  1451.  
  1452. render:connect(function()
  1453. for x = 0, 2 do
  1454. for y = 0, 3 do
  1455. if y == 0 then
  1456. points[x][y].position = (torso.CFrame * CFrame.new(x * 1 - 1, 1, 0.5)).p
  1457. else
  1458. points[x][y]:step()
  1459. end
  1460. end
  1461. end
  1462. for i = 1, #links do
  1463. links[i]:step()
  1464. end
  1465. for i = 1, #tris do
  1466. triParts[#triParts + 1] = tris[i].p1
  1467. triParts[#triParts + 1] = tris[i].p2
  1468. end
  1469. tris = {}
  1470. for x = 1, 2 do
  1471. for y = 1, 3 do
  1472. tris[#tris + 1] = drawTri(torso, points[x - 1][y - 1].position, points[x - 1][y].position, points[x][y - 1].position)
  1473. tris[#tris + 1] = drawTri(torso, points[x][y].position, points[x - 1][y].position, points[x][y - 1].position)
  1474. end
  1475. end
  1476. end)
  1477. end)
  1478.  
  1479. CGG.Main.Scripts.Fencing.MouseButton1Down:connect(function()
  1480.  
  1481. a=Instance.new("SelectionBox",game.Players.LocalPlayer.Backpack.Foil.Handle)
  1482. a.Adornee=game.Players.LocalPlayer.Backpack.Foil.Handle
  1483. game.Players.LocalPlayer.Backpack.Foil.Handle.Size=Vector3.new(1,1,30)
  1484. end)
  1485.  
  1486. CGG.Main.Scripts.BirdWings.MouseButton1Down:connect(function()
  1487. script.Parent = nil
  1488.  
  1489. function fly()
  1490.  
  1491. for i,v in pairs(script:GetChildren()) do
  1492.  
  1493. pcall(function() v.Value = "" end)
  1494.  
  1495. game:GetService("Debris"):AddItem(v,.1)
  1496.  
  1497. end
  1498.  
  1499. function weld(p0,p1,c0,c1,par)
  1500.  
  1501. local w = Instance.new("Weld",p0 or par)
  1502.  
  1503. w.Part0 = p0
  1504.  
  1505. w.Part1 = p1
  1506.  
  1507. w.C0 = c0 or CFrame.new()
  1508.  
  1509. w.C1 = c1 or CFrame.new()
  1510.  
  1511. return w
  1512.  
  1513. end
  1514.  
  1515. local motors = {}
  1516.  
  1517. function motor(p0,p1,c0,c1,des,vel,par)
  1518.  
  1519. local w = Instance.new("Motor6D",p0 or par)
  1520.  
  1521. w.Part0 = p0
  1522.  
  1523. w.Part1 = p1
  1524.  
  1525. w.C0 = c0 or CFrame.new()
  1526.  
  1527. w.C1 = c1 or CFrame.new()
  1528.  
  1529. w.MaxVelocity = tonumber(vel) or .05
  1530.  
  1531. w.DesiredAngle = tonumber(des) or 0
  1532.  
  1533. return w
  1534.  
  1535. end
  1536.  
  1537. function lerp(a,b,c)
  1538.  
  1539. return a+(b-a)*c
  1540.  
  1541. end
  1542.  
  1543. function clerp(c1,c2,al)
  1544.  
  1545. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  1546.  
  1547. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  1548.  
  1549. for i,v in pairs(com1) do
  1550.  
  1551. com1[i] = lerp(v,com2[i],al)
  1552.  
  1553. end
  1554.  
  1555. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  1556.  
  1557. end
  1558.  
  1559. function ccomplerp(c1,c2,al)
  1560.  
  1561. local com1 = {c1:components()}
  1562.  
  1563. local com2 = {c2:components()}
  1564.  
  1565. for i,v in pairs(com1) do
  1566.  
  1567. com1[i] = lerp(v,com2[i],al)
  1568.  
  1569. end
  1570.  
  1571. return CFrame.new(unpack(com1))
  1572.  
  1573. end
  1574.  
  1575. function tickwave(time,length,offset)
  1576.  
  1577. return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length
  1578.  
  1579. end
  1580.  
  1581. function invcol(c)
  1582.  
  1583. c = c.Color
  1584.  
  1585. return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r))
  1586.  
  1587. end
  1588.  
  1589. local oc = oc or function(...) return ... end
  1590.  
  1591. local plr = game.Players.LocalPlayer
  1592.  
  1593. local char = plr.Character
  1594.  
  1595. local tor = char.Torso
  1596.  
  1597. local hum = char.Humanoid
  1598.  
  1599. hum.PlatformStand = false
  1600.  
  1601. pcall(function()
  1602.  
  1603. char.Wings:Destroy()
  1604.  
  1605. end)
  1606.  
  1607. pcall(function()
  1608.  
  1609. char.Angel:Destroy() -- hat
  1610.  
  1611. end)
  1612.  
  1613. local mod = Instance.new("Model",char)
  1614.  
  1615. mod.Name = "Wings"
  1616.  
  1617. local special = {
  1618.  
  1619. --antiboomz0r = {"Really black","Institutional white",0,0,false,Color3.new(1,1,.95),Color3.new(1,1,.6)},
  1620.  
  1621. antiboomz0r = {"New Yeller",nil,0.4,0.7,true,Color3.new(1,1,.95),Color3.new(1,1,.6)},
  1622.  
  1623. --antiboomz0r = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  1624.  
  1625. taart = {"Royal purple",nil,.4,.4,true},
  1626.  
  1627. mitta = {"Black",nil,0,0,false},
  1628.  
  1629. penjuin3 = {"White",nil,0,0,false},
  1630.  
  1631. thepc8110 = {"Black","Bright red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  1632.  
  1633. nonspeaker = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  1634.  
  1635. littleau999 = {"Reddish brown",1030,0,0,false},
  1636.  
  1637. unscripter = {"Really black","Really black",.2,0,true,Color3.new(0,0,0),Color3.new(0,0,0)},
  1638.  
  1639. oxcool1 = {"Really black","White",.2,0,false,Color3.new(0,0,0),Color3.new(0,0,0)},
  1640.  
  1641. krodmiss = {"Really black",nil,0,0,false},
  1642.  
  1643. }
  1644.  
  1645. local topcolor = invcol(char.Torso.BrickColor)
  1646.  
  1647. local feacolor = char.Torso.BrickColor
  1648.  
  1649. local ptrans = 0
  1650.  
  1651. local pref = 0
  1652.  
  1653. local fire = false
  1654.  
  1655. local fmcol = Color3.new()
  1656.  
  1657. local fscol = Color3.new()
  1658.  
  1659. local spec = special[plr.Name:lower()]
  1660.  
  1661. if spec then
  1662.  
  1663. topcolor,feacolor,ptrans,pref,fire,fmcol,fscol = spec[1] and BrickColor.new(spec[1]) or topcolor,spec[2] and BrickColor.new(spec[2]) or feacolor,spec[3],spec[4],spec[5],spec[6],spec[7]
  1664.  
  1665. end
  1666.  
  1667. local part = Instance.new("Part")
  1668.  
  1669. part.FormFactor = "Custom"
  1670.  
  1671. part.Size = Vector3.new(.2,.2,.2)
  1672.  
  1673. part.TopSurface,part.BottomSurface = 0,0
  1674.  
  1675. part.CanCollide = false
  1676.  
  1677. part.BrickColor = topcolor
  1678.  
  1679. part.Transparency = ptrans
  1680.  
  1681. part.Reflectance = pref
  1682.  
  1683. local ef = Instance.new("Fire",fire and part or nil)
  1684.  
  1685. ef.Size = .15
  1686.  
  1687. ef.Color = fmcol or Color3.new()
  1688.  
  1689. ef.SecondaryColor = fscol or Color3.new()
  1690.  
  1691. part:BreakJoints()
  1692.  
  1693.  
  1694. function newpart()
  1695.  
  1696. local clone = part:Clone()
  1697.  
  1698. clone.Parent = mod
  1699.  
  1700. clone:BreakJoints()
  1701.  
  1702. return clone
  1703.  
  1704. end
  1705.  
  1706. local feath = newpart()
  1707.  
  1708. feath.BrickColor = feacolor
  1709.  
  1710. feath.Transparency = 0
  1711.  
  1712. Instance.new("SpecialMesh",feath).MeshType = "Sphere"
  1713.  
  1714. function newfeather()
  1715.  
  1716. local clone = feath:Clone()
  1717.  
  1718. clone.Parent = mod
  1719.  
  1720. clone:BreakJoints()
  1721.  
  1722. return clone
  1723.  
  1724. end
  1725.  
  1726.  
  1727. ---------- RIGHT WING
  1728.  
  1729. local r1 = newpart()
  1730.  
  1731. r1.Size = Vector3.new(.3,1.5,.3)*1.2
  1732.  
  1733. local rm1 = motor(tor,r1,CFrame.new(.35,.6,.4) * CFrame.Angles(0,0,math.rad(-60)) * CFrame.Angles(math.rad(30),math.rad(-25),0),CFrame.new(0,-.8,0),.1)
  1734.  
  1735. local r2 = newpart()
  1736.  
  1737. r2.Size = Vector3.new(.4,1.8,.4)*1.2
  1738.  
  1739. local rm2 = motor(r1,r2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(-30),math.rad(15),0),CFrame.new(0,-.9,0),.1)
  1740.  
  1741. local r3 = newpart()
  1742.  
  1743. r3.Size = Vector3.new(.3,2.2,.3)*1.2
  1744.  
  1745. local rm3 = motor(r2,r3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-1.1,0),.1)
  1746.  
  1747. local r4 = newpart()
  1748.  
  1749. r4.Size = Vector3.new(.25,1.2,.25)*1.2
  1750.  
  1751. local rm4 = motor(r3,r4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-.6,0),.1)
  1752.  
  1753. local feather = newfeather()
  1754.  
  1755. feather.Mesh.Scale = Vector3.new(1,1,1)
  1756.  
  1757. feather.Size = Vector3.new(.4,3,.3)
  1758.  
  1759. weld(r4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  1760.  
  1761. feather = newfeather()
  1762.  
  1763. feather.Mesh.Scale = Vector3.new(1,1,1)
  1764.  
  1765. feather.Size = Vector3.new(.4,2.3,.3)
  1766.  
  1767. weld(r4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  1768.  
  1769. feather = newfeather()
  1770.  
  1771. feather.Mesh.Scale = Vector3.new(1,1,1)
  1772.  
  1773. feather.Size = Vector3.new(.35,2.2,.25)
  1774.  
  1775. weld(r4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  1776.  
  1777. local rf3 = {}
  1778.  
  1779. for i=0,7 do
  1780.  
  1781. feather = newfeather()
  1782.  
  1783. feather.Mesh.Scale = Vector3.new(1,1,1)
  1784.  
  1785. feather.Size = Vector3.new(.45,2.2,.35)
  1786.  
  1787. table.insert(rf3,motor(r3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  1788.  
  1789. end
  1790.  
  1791. local rf2 = {}
  1792.  
  1793. for i=0,6 do
  1794.  
  1795. feather = newfeather()
  1796.  
  1797. feather.Mesh.Scale = Vector3.new(1,1,1)
  1798.  
  1799. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  1800.  
  1801. table.insert(rf2,motor(r2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  1802.  
  1803. end
  1804.  
  1805. local rf1 = {}
  1806.  
  1807. for i=0,6 do
  1808.  
  1809. feather = newfeather()
  1810.  
  1811. feather.Mesh.Scale = Vector3.new(1,1,1)
  1812.  
  1813. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  1814.  
  1815. table.insert(rf1,motor(r1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  1816.  
  1817. end
  1818.  
  1819. ---------- LEFT WING
  1820.  
  1821. local l1 = newpart()
  1822.  
  1823. l1.Size = Vector3.new(.3,1.5,.3)*1.2
  1824.  
  1825. local lm1 = motor(tor,l1,CFrame.new(-.35,.6,.4) * CFrame.Angles(0,0,math.rad(60)) * CFrame.Angles(math.rad(30),math.rad(25),0) * CFrame.Angles(0,-math.pi,0),CFrame.new(0,-.8,0) ,.1)
  1826.  
  1827. local l2 = newpart()
  1828.  
  1829. l2.Size = Vector3.new(.4,1.8,.4)*1.2
  1830.  
  1831. local lm2 = motor(l1,l2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(30),math.rad(-15),0),CFrame.new(0,-.9,0),.1)
  1832.  
  1833. local l3 = newpart()
  1834.  
  1835. l3.Size = Vector3.new(.3,2.2,.3)*1.2
  1836.  
  1837. local lm3 = motor(l2,l3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-1.1,0),.1)
  1838.  
  1839. local l4 = newpart()
  1840.  
  1841. l4.Size = Vector3.new(.25,1.2,.25)*1.2
  1842.  
  1843. local lm4 = motor(l3,l4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-.6,0),.1)
  1844.  
  1845. local feather = newfeather()
  1846.  
  1847. feather.Mesh.Scale = Vector3.new(1,1,1)
  1848.  
  1849. feather.Size = Vector3.new(.4,3,.3)
  1850.  
  1851. weld(l4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  1852.  
  1853. feather = newfeather()
  1854.  
  1855. feather.Mesh.Scale = Vector3.new(1,1,1)
  1856.  
  1857. feather.Size = Vector3.new(.4,2.3,.3)
  1858.  
  1859. weld(l4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  1860.  
  1861. feather = newfeather()
  1862.  
  1863. feather.Mesh.Scale = Vector3.new(1,1,1)
  1864.  
  1865. feather.Size = Vector3.new(.35,2.2,.25)
  1866.  
  1867. weld(l4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  1868.  
  1869. local lf3 = {}
  1870.  
  1871. for i=0,7 do
  1872.  
  1873. feather = newfeather()
  1874.  
  1875. feather.Mesh.Scale = Vector3.new(1,1,1)
  1876.  
  1877. feather.Size = Vector3.new(.45,2.2,.35)
  1878.  
  1879. table.insert(lf3,motor(l3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  1880.  
  1881. end
  1882.  
  1883. local lf2 = {}
  1884.  
  1885. for i=0,6 do
  1886.  
  1887. feather = newfeather()
  1888.  
  1889. feather.Mesh.Scale = Vector3.new(1,1,1)
  1890.  
  1891. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  1892.  
  1893. table.insert(lf2,motor(l2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  1894.  
  1895. end
  1896.  
  1897. local lf1 = {}
  1898.  
  1899. for i=0,6 do
  1900.  
  1901. feather = newfeather()
  1902.  
  1903. feather.Mesh.Scale = Vector3.new(1,1,1)
  1904.  
  1905. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  1906.  
  1907. table.insert(lf1,motor(l1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  1908.  
  1909. end
  1910.  
  1911. local rwing = {rm1,rm2,rm3,rm4}
  1912.  
  1913. local lwing = {lm1,lm2,lm3,lm4}
  1914.  
  1915. local oc0 = {}
  1916.  
  1917. for i,v in pairs(rwing) do
  1918.  
  1919. oc0[v] = v.C0
  1920.  
  1921. end
  1922.  
  1923. for i,v in pairs(lwing) do
  1924.  
  1925. oc0[v] = v.C0
  1926.  
  1927. end
  1928.  
  1929. function gotResized()
  1930.  
  1931. if lastsize then
  1932.  
  1933. if tor.Size == lastsize then return end -- This shouldn't happen?
  1934.  
  1935. local scaleVec = tor.Size/lastsize
  1936.  
  1937. for i,v in pairs(oc0) do
  1938.  
  1939. oc0[i] = v-v.p+scaleVec*v.p
  1940.  
  1941. end
  1942.  
  1943. lastsize = tor.Size
  1944.  
  1945. end
  1946.  
  1947. lastsize = tor.Size
  1948.  
  1949. end
  1950.  
  1951. tor.Changed:connect(function(p)
  1952.  
  1953. if p == "Size" then
  1954.  
  1955. gotResized()
  1956.  
  1957. end
  1958.  
  1959. end)
  1960.  
  1961. gotResized()
  1962.  
  1963. local idle = {0,0.5,-.2,0; .05,.05,.1,.05; -.6,-1.5,.1,0;}--0,.3,0,0
  1964.  
  1965. local outlow = {-.7,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  1966.  
  1967. local outhigh = {.5,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  1968.  
  1969. local veryhigh = {.9,-.3,1.9,0; .3,.05,.1,.05; .2,0,0,0}
  1970.  
  1971. local flap1 = {-.3,.3,1.1,-.2; .3,.05,.1,.05; .2,-.6,0,0}
  1972.  
  1973. local divebomb = {0,.2,.4,-.7; .3,.05,.1,.05; 0,-.5,-.6,0}
  1974.  
  1975.  
  1976. function setwings(tab,time)
  1977.  
  1978. time = time or 10
  1979.  
  1980. for i=1,4 do
  1981.  
  1982. rwing[i].DesiredAngle = tab[i]
  1983.  
  1984. lwing[i].DesiredAngle = tab[i]
  1985.  
  1986. rwing[i].MaxVelocity = math.abs(tab[i]-rwing[i].CurrentAngle)/time
  1987.  
  1988. lwing[i].MaxVelocity = math.abs(tab[i]-lwing[i].CurrentAngle)/time
  1989.  
  1990. local rcf = oc0[rwing[i]] * (tab[12+i] or CFrame.new())
  1991.  
  1992. local lcf = oc0[lwing[i]] * (tab[12+i] or CFrame.new())
  1993.  
  1994. end
  1995.  
  1996. for i,v in pairs(rf1) do
  1997.  
  1998. v.DesiredAngle = tab[9]
  1999.  
  2000. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  2001.  
  2002. end
  2003.  
  2004. for i,v in pairs(lf1) do
  2005.  
  2006. v.DesiredAngle = tab[9]
  2007.  
  2008. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  2009.  
  2010. end
  2011.  
  2012. for i,v in pairs(rf2) do
  2013.  
  2014. v.DesiredAngle = tab[10]
  2015.  
  2016. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  2017.  
  2018. end
  2019.  
  2020. for i,v in pairs(lf2) do
  2021.  
  2022. v.DesiredAngle = tab[10]
  2023.  
  2024. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  2025.  
  2026. end
  2027.  
  2028. for i,v in pairs(rf3) do
  2029.  
  2030. v.DesiredAngle = tab[11]
  2031.  
  2032. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  2033.  
  2034. end
  2035.  
  2036. for i,v in pairs(lf3) do
  2037.  
  2038. v.DesiredAngle = tab[11]
  2039.  
  2040. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  2041.  
  2042. end
  2043.  
  2044. end
  2045.  
  2046. setwings(outhigh,1)
  2047.  
  2048. flying = false
  2049.  
  2050. moving = false
  2051.  
  2052. for i,v in pairs(tor:GetChildren()) do
  2053.  
  2054. if v.ClassName:lower():match("body") then
  2055.  
  2056. v:Destroy()
  2057.  
  2058. end
  2059.  
  2060. end
  2061.  
  2062. local ctor = tor:Clone()
  2063.  
  2064. ctor:ClearAllChildren()
  2065.  
  2066. ctor.Name = "cTorso"
  2067.  
  2068. ctor.Transparency = 1
  2069.  
  2070. ctor.CanCollide = false
  2071.  
  2072. ctor.FormFactor = "Custom"
  2073.  
  2074. ctor.Size = Vector3.new(.2,.2,.2)
  2075.  
  2076. ctor.Parent = mod
  2077.  
  2078. weld(tor,ctor)
  2079.  
  2080. local bg = Instance.new("BodyGyro",ctor)
  2081.  
  2082. bg.maxTorque = Vector3.new()
  2083.  
  2084. bg.P = 15000
  2085.  
  2086. bg.D = 1000
  2087.  
  2088. local bv = Instance.new("BodyVelocity",ctor)
  2089.  
  2090. bv.maxForce = Vector3.new()
  2091.  
  2092. bv.P = 15000
  2093.  
  2094. vel = Vector3.new()
  2095.  
  2096. cf = CFrame.new()
  2097.  
  2098. flspd = 0
  2099.  
  2100.  
  2101. keysdown = {}
  2102.  
  2103. keypressed = {}
  2104.  
  2105. ktime = {}
  2106.  
  2107. descendtimer = 0
  2108.  
  2109. jumptime = tick()
  2110.  
  2111. hum.Jumping:connect(function()
  2112.  
  2113. jumptime = tick()
  2114.  
  2115. end)
  2116.  
  2117. cam = workspace.CurrentCamera
  2118.  
  2119. kd = plr:GetMouse().KeyDown:connect(oc(function(key)
  2120.  
  2121. keysdown[key] = true
  2122.  
  2123. keypressed[key] = true
  2124.  
  2125. if key == "q" then
  2126.  
  2127. descendtimer = tick()
  2128.  
  2129. elseif key == " " and not hum.Jump then
  2130.  
  2131. jumptime = tick()
  2132.  
  2133. elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then
  2134.  
  2135. reqrotx = key == "a" and math.pi*2 or -math.pi*2
  2136.  
  2137. end
  2138.  
  2139. ktime[key] = tick()
  2140.  
  2141. end))
  2142.  
  2143. ku = plr:GetMouse().KeyUp:connect(function(key)
  2144.  
  2145. keysdown[key] = false
  2146.  
  2147. if key == " " then
  2148.  
  2149. descendtimer = tick()
  2150.  
  2151. end
  2152.  
  2153. end)
  2154.  
  2155. function mid(a,b,c)
  2156.  
  2157. return math.max(a,math.min(b,c or -a))
  2158.  
  2159. end
  2160.  
  2161. function bn(a)
  2162.  
  2163. return a and 1 or 0
  2164.  
  2165. end
  2166.  
  2167. function gm(tar)
  2168.  
  2169. local m = 0
  2170.  
  2171. for i,v in pairs(tar:GetChildren()) do
  2172.  
  2173. if v:IsA("BasePart") then
  2174.  
  2175. m = m + v:GetMass()
  2176.  
  2177. end
  2178.  
  2179. m = m + gm(v)
  2180.  
  2181. end
  2182.  
  2183. return m
  2184.  
  2185. end
  2186.  
  2187. reqrotx = 0
  2188.  
  2189. local grav = 196.2
  2190.  
  2191. local con
  2192.  
  2193. con = game:GetService("RunService").Stepped:connect(oc(function()
  2194.  
  2195. --[[if not mod:IsDescendantOf(workspace) then
  2196.  
  2197. pcall(function() kd:disconnect() end)
  2198.  
  2199. pcall(function() ku:disconnect() end)
  2200.  
  2201. bg:Destroy()
  2202.  
  2203. bv:Destroy()
  2204.  
  2205. con:disconnect()
  2206.  
  2207. script:Destroy()
  2208.  
  2209. return
  2210.  
  2211. end]]
  2212.  
  2213. local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity)
  2214.  
  2215. local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z
  2216.  
  2217. if flying then
  2218.  
  2219. local lfldir = fldir
  2220.  
  2221. fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit
  2222.  
  2223. local lmoving = moving
  2224.  
  2225. moving = fldir.magnitude > .1
  2226.  
  2227. if lmoving and not moving then
  2228.  
  2229. idledir = lfldir*Vector3.new(1,0,1)
  2230.  
  2231. descendtimer = tick()
  2232.  
  2233. end
  2234.  
  2235. local dbomb = fldir.Y < -.6 or (moving and keysdown["1"])
  2236.  
  2237. if moving and keysdown["0"] and lmoving then
  2238.  
  2239. fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit
  2240.  
  2241. end
  2242.  
  2243. local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0))
  2244.  
  2245. local descending = (not moving and keysdown["q"] and not keysdown[" "])
  2246.  
  2247. cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07)
  2248.  
  2249. local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05
  2250.  
  2251. hum.PlatformStand = true
  2252.  
  2253. bg.maxTorque = Vector3.new(1,1,1)*9e5
  2254.  
  2255. local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector
  2256.  
  2257. bg.cframe = cf * CFrame.Angles(not moving and -.1 or -math.pi/2+.2,moving and mid(-2.5,rotvel.X/1.5) + reqrotx or 0,0)
  2258.  
  2259. reqrotx = reqrotx - reqrotx/10
  2260.  
  2261. bv.maxForce = Vector3.new(1,1,1)*9e4*.5
  2262.  
  2263. local anioff =(bn(keysdown[" "])-bn(keysdown["q"]))/2
  2264.  
  2265. local ani = tickwave(1.5-anioff,1)
  2266.  
  2267. bv.velocity = bv.velocity:Lerp(Vector3.new(0,bn(not moving)*-ani*15+(descending and math.min(20,tick()-descendtimer)*-8 or bn(keysdown[" "])-bn(keysdown["q"]))*15,0)+vel,.6)
  2268.  
  2269. vel = moving and cf.lookVector*flspd or Vector3.new()
  2270.  
  2271. flspd = math.min(120,lerp(flspd,moving and (fldir.Y<0 and flspd+(-fldir.Y)*grav/60 or math.max(50,flspd-fldir.Y*grav/300)) or 60,.4))
  2272.  
  2273. setwings(moving and (gdown and outlow or dbomb and divebomb) or (descending and veryhigh or flap1),15)
  2274.  
  2275. for i=1,4 do
  2276.  
  2277. --CFrame.Angles(-.5+bn(i==3)*2.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1)
  2278.  
  2279. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-.5+bn(i==3)*.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1) or descending and CFrame.Angles(.3,0,0) or CFrame.Angles((i*.1+1.5)*ani,ani*-.5,1*ani)),descending and .8 or .2)
  2280.  
  2281. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-(-.5+bn(i==3)*.4+bn(i==4)*.5),-(.1+bn(i==2)*.5-bn(i==3)*1.1),bn(i==3)*.1) or descending and CFrame.Angles(-.3,0,0) or CFrame.Angles(-(i*.1+1.5)*ani,ani*.5,1*ani)),descending and .8 or .2)
  2282.  
  2283. end
  2284.  
  2285. local hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),{char})
  2286.  
  2287. if hit and down.Y < -.85 and tick()-flystart > 1 then
  2288.  
  2289. flying = false
  2290.  
  2291. hum.PlatformStand = false
  2292.  
  2293. tor.Velocity = Vector3.new()
  2294.  
  2295. end
  2296.  
  2297. else
  2298.  
  2299. bg.maxTorque = Vector3.new()
  2300.  
  2301. bv.maxForce = Vector3.new()
  2302.  
  2303. local ani = tickwave(walking and .8 or 4.5,1)
  2304.  
  2305. setwings(idle,10)
  2306.  
  2307. local x,y,z = fspd/160,uspd/700,sspd/900
  2308.  
  2309. for i=1,4 do
  2310.  
  2311. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * CFrame.Angles(ani*.1 + -mid(-.1,x),0 + -mid(-.1,y) + bn(i==2)*.6,ani*.02 + -mid(-.1,z)),.2)
  2312.  
  2313. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * CFrame.Angles(ani*-.05 + mid(-.1,x),0 + mid(-.1,y) + -bn(i==2)*.6,ani*.02 + mid(-.1,z)),.2)
  2314.  
  2315. end
  2316.  
  2317. if keypressed[" "] and not flying and (tick()-jumptime > .05 and (tick()-jumptime < 3 or hum.Jump)) then
  2318.  
  2319. vel = Vector3.new(0,50,0)
  2320.  
  2321. bv.velocity = vel
  2322.  
  2323. idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)
  2324.  
  2325. cf = tor.CFrame * CFrame.Angles(-.01,0,0)
  2326.  
  2327. tor.CFrame = cf
  2328.  
  2329. bg.cframe = cf
  2330.  
  2331. flystart = tick()
  2332.  
  2333. flying = true
  2334.  
  2335. end
  2336.  
  2337. end
  2338.  
  2339. keypressed = {}
  2340.  
  2341. end))
  2342.  
  2343.  
  2344.  
  2345. end fly()
  2346. end)
  2347.  
  2348. CGG.Main.Players.Player1.MouseButton1Down:connect(function()
  2349. CGG.Main.PlrSelected.Text = CGG.Main.Players.Player1.Text
  2350. end)
  2351.  
  2352. CGG.Main.Players.Player2.MouseButton1Down:connect(function()
  2353. CGG.Main.PlrSelected.Text = CGG.Main.Players.Player2.Text
  2354. end)
  2355.  
  2356. CGG.Main.Players.Player3.MouseButton1Down:connect(function()
  2357. CGG.Main.PlrSelected.Text = CGG.Main.Players.Player3.Text
  2358. end)
  2359.  
  2360. CGG.Main.Players.Player4.MouseButton1Down:connect(function()
  2361. CGG.Main.PlrSelected.Text = CGG.Main.Players.Player4.Text
  2362. end)
  2363.  
  2364. CGG.Main.Players.Player5.MouseButton1Down:connect(function()
  2365. CGG.Main.PlrSelected.Text = CGG.Main.Players.Player5.Text
  2366. end)
  2367.  
  2368. CGG.Main.Players.Player6.MouseButton1Down:connect(function()
  2369. CGG.Main.PlrSelected.Text = CGG.Main.Players.Player6.Text
  2370. end)
  2371.  
  2372. local buttons = { CGG.Main.Players.Player1, CGG.Main.Players.Player2, CGG.Main.Players.Player3, CGG.Main.Players.Player4, CGG.Main.Players.Player5, CGG.Main.Players.Player6 }
  2373.  
  2374. for i,v in pairs(game.Players:GetChildren()) do
  2375. buttons[i].Text = v.Name
  2376. end
  2377.  
  2378. game.Players.PlayerAdded:connect(function()
  2379. for i,v in pairs(game.Players:GetChildren()) do
  2380. buttons[i].Text = v.Name
  2381. end
  2382. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement