knowyourmom12

Untitled

Jul 21st, 2016
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.77 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. LeftArm = Character["Left Arm"]
  8. LeftLeg = Character["Left Leg"]
  9. RightArm = Character["Right Arm"]
  10. RightLeg = Character["Right Leg"]
  11. LS = Torso["Left Shoulder"]
  12. LH = Torso["Left Hip"]
  13. RS = Torso["Right Shoulder"]
  14. RH = Torso["Right Hip"]
  15. attack = false
  16. it=Instance.new
  17. vt=Vector3.new
  18. cf=CFrame.new
  19. euler=CFrame.fromEulerAnglesXYZ
  20. angles=CFrame.Angles
  21.  
  22. act = {key = {}}
  23. hold=false
  24. MMouse=nil
  25. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  26. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. grabbed=false
  28. speed=1
  29. jumpcount=0
  30. doinganimation=false
  31. moveforward=false
  32. movebackward=false
  33. moveleft=false
  34. moveright=false
  35. doflying=false
  36. --player
  37. player = nil
  38. --save shoulders
  39. RSH, LSH = nil, nil
  40. --welds
  41. RW, LW , RWL, LWL = it("Weld"), it("Weld"), it("Weld"), it("Weld")
  42. --what anim
  43. anim = "none"
  44.  
  45. bod = it("BodyPosition")
  46. bod.position = Torso.Position
  47. bod.maxForce = vt(4e+080, 4e+080, 4e+080)
  48.  
  49. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  50. local fp = it("Part")
  51. fp.formFactor = formfactor
  52. fp.Parent = parent
  53. fp.Reflectance = reflectance
  54. fp.Transparency = transparency
  55. fp.CanCollide = false
  56. fp.BrickColor = brickcolor
  57. fp.Name = name
  58. fp.Size = size
  59. fp.Position = Torso.Position
  60. fp.BottomSurface="Smooth"
  61. fp.TopSurface="Smooth"
  62. fp:BreakJoints()
  63. return fp
  64. end
  65.  
  66. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  67. local mesh = it(Mesh)
  68. mesh.Parent = part
  69. if Mesh=="SpecialMesh" then
  70. mesh.MeshType = meshtype
  71. mesh.MeshId = meshid
  72. end
  73. mesh.Offset=offset
  74. mesh.Scale=scale
  75. return mesh
  76. end
  77.  
  78. if Character:findFirstChild("Steampunk Wings",true) ~= nil then
  79. Character:findFirstChild("Steampunk Wings",true).Parent = nil
  80. end
  81.  
  82. local modelzorz = it("Model")
  83. modelzorz.Name = "Steampunk Wings"
  84. modelzorz.Parent = Character
  85.  
  86. local part1 = part(1,modelzorz,0,0,BrickColor.new("Br. yellowish green"),"Part1",vt(1,1,1))
  87. local part2 = part(1,modelzorz,0,0,BrickColor.new("Dark green"),"Part2",vt(1,1,1))
  88. local part3 = part(1,modelzorz,0,0,Torso.BrickColor,"Part3",vt(1,1,1))
  89. local part4 = part(1,modelzorz,0,0,BrickColor.new("Br. yellowish green"),"Part4",vt(1,1,1))
  90. local part5 = part(1,modelzorz,0,0,BrickColor.new("Br. yellowish green"),"Part5",vt(1,1,1))
  91. local part6 = part(1,modelzorz,0,0,BrickColor.new("Br. yellowish green"),"Part6",vt(1,1,1))
  92. local part7 = part(1,modelzorz,0,0,BrickColor.new("Br. yellowish green"),"Part7",vt(1,1,1))
  93. local part8 = part(1,modelzorz,0,0,BrickColor.new("Br. yellowish green"),"Part8",vt(1,1,1))
  94. local part9 = part(1,modelzorz,0,0,BrickColor.new("Bright green"),"Part9",vt(1,1,1))
  95. local part10 = part(1,modelzorz,0,0,BrickColor.new("White"),"Part10",vt(1,1,1))
  96. local part11 = part(1,modelzorz,0,1,BrickColor.new("Black"),"Part11",vt(1,1,1))
  97. local part12 = part(1,modelzorz,0,0,BrickColor.new("White"),"Part12",vt(1,1,1))
  98. local part13 = part(1,modelzorz,0,0,BrickColor.new("White"),"Part13",vt(1,1,1))
  99. local part14 = part(1,modelzorz,0,1,BrickColor.new("Black"),"Part14",vt(1,1,1))
  100. local part15 = part(1,modelzorz,0,0,BrickColor.new("White"),"Part15",vt(1,1,1))
  101.  
  102. local mesh1 = mesh("BlockMesh",part1,"","",vt(0,0,0),vt(2.1,0.5,1.1))
  103. local mesh2 = mesh("BlockMesh",part2,"","",vt(0,0,0),vt(1.3,1.3,0.8))
  104. local mesh3 = mesh("CylinderMesh",part3,"","",vt(0,0,0),vt(0.9,0.3,0.9))
  105. local mesh4 = mesh("BlockMesh",part4,"","",vt(0,0,0),vt(0.3,1.6,0.3))
  106. local mesh5 = mesh("BlockMesh",part5,"","",vt(0,0,0),vt(0.3,1.6,0.3))
  107. local mesh6 = mesh("BlockMesh",part6,"","",vt(0,0,0),vt(0.3,1.8,0.3))
  108. local mesh7 = mesh("BlockMesh",part7,"","",vt(0,0,0),vt(0.3,2,0.3))
  109. local mesh8 = mesh("BlockMesh",part8,"","",vt(0,0,0),vt(0.3,2,0.3))
  110. local mesh9 = mesh("BlockMesh",part9,"","",vt(0,0,0),vt(0.6,2.5,0.6))
  111. local mesh10 = mesh("BlockMesh",part10,"","",vt(0,0,0),vt(0.1,1.5,2))
  112. local mesh11 = mesh("BlockMesh",part11,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  113. local mesh12 = mesh("SpecialMesh",part12,"Wedge","",vt(0,0,0),vt(0.1,1.5,2))
  114. local mesh13 = mesh("BlockMesh",part13,"","",vt(0,0,0),vt(0.1,1.5,2))
  115. local mesh14 = mesh("BlockMesh",part14,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  116. local mesh15 = mesh("SpecialMesh",part15,"Wedge","",vt(0,0,0),vt(0.1,1.5,2))
  117.  
  118. local weld1 = it("Weld")
  119. weld1.Parent = part1
  120. weld1.Part0 = part1
  121. weld1.Part1 = Torso
  122. weld1.C0 = euler(0,0,0) * cf(0,0,0)
  123. local weld2 = it("Weld")
  124. weld2.Parent = part2
  125. weld2.Part0 = part2
  126. weld2.Part1 = part1
  127. weld2.C0 = euler(0,0,0) * cf(0,0,-0.9)
  128. local weld3 = it("Weld")
  129. weld3.Parent = part3
  130. weld3.Part0 = part3
  131. weld3.Part1 = part2
  132. weld3.C0 = euler(1.57,0,0) * cf(0,0,-0.3)
  133. local weld4 = it("Weld")
  134. weld4.Parent = part4
  135. weld4.Part0 = part4
  136. weld4.Part1 = part2
  137. weld4.C0 = euler(-0.7,0,0) * cf(0,-0.8,-0.9)
  138. local weld5 = it("Weld")
  139. weld5.Parent = part5
  140. weld5.Part0 = part5
  141. weld5.Part1 = part2
  142. weld5.C0 = euler(-1.1,0,0) * cf(0,-1.1,-0.6)
  143. local weld6 = it("Weld")
  144. weld6.Parent = part6
  145. weld6.Part0 = part6
  146. weld6.Part1 = part2
  147. weld6.C0 = euler(0,0,1.57) * cf(0,-0.5,0)
  148. local weld7 = it("Weld")
  149. weld7.Parent = part7
  150. weld7.Part0 = part7
  151. weld7.Part1 = part6
  152. weld7.C0 = euler(0,0,-0.5) * cf(0.6,-0.5,-0.8)
  153. weld7.C1 = euler(1,0,0)
  154. local weld8 = it("Weld")
  155. weld8.Parent = part8
  156. weld8.Part0 = part8
  157. weld8.Part1 = part6
  158. weld8.C0 = euler(0,0,0.5) * cf(0.6,0.5,-0.8)
  159. weld8.C1 = euler(-1,0,0)
  160. local weld9 = it("Weld")
  161. weld9.Parent = part9
  162. weld9.Part0 = part9
  163. weld9.Part1 = part2
  164. weld9.C0 = euler(-1.4,0,0) * cf(0,-1.5,-1.6)
  165. local weld10 = it("Weld")
  166. weld10.Parent = part10
  167. weld10.Part0 = part10
  168. weld10.Part1 = part9
  169. weld10.C0 = cf(0,-0.59,1.2) * euler(0,1.57,0)
  170. weld10.C1 = euler(0,-0.3,0)
  171. local weld11 = it("Weld")
  172. weld11.Parent = part11
  173. weld11.Part0 = part11
  174. weld11.Part1 = part10
  175. weld11.C0 = cf(0,0,1) * euler(0,0,0)
  176. local weld12 = it("Weld")
  177. weld12.Parent = part12
  178. weld12.Part0 = part12
  179. weld12.Part1 = part11
  180. weld12.C0 = cf(0,0,1) * euler(0,0,3.14)
  181. weld12.C1 = euler(0,-0.5,0)
  182. local weld13 = it("Weld")
  183. weld13.Parent = part13
  184. weld13.Part0 = part13
  185. weld13.Part1 = part9
  186. weld13.C0 = cf(0,-0.59,-1.2) * euler(0,1.57,0)
  187. weld13.C1 = euler(0,0.3,0)
  188. local weld14 = it("Weld")
  189. weld14.Parent = part14
  190. weld14.Part0 = part14
  191. weld14.Part1 = part13
  192. weld14.C0 = cf(0,0,-1) * euler(0,0,0)
  193. local weld15 = it("Weld")
  194. weld15.Parent = part15
  195. weld15.Part0 = part15
  196. weld15.Part1 = part14
  197. weld15.C0 = cf(0,0,1) * euler(0,3.14,3.14)
  198. weld15.C1 = euler(0,0.5,0)
  199.  
  200. local refpart = part(1,modelzorz,0,0,BrickColor.new("White"),"ReferencePart",vt(1,1,1))
  201.  
  202. derp=0
  203. for i=1,4 do
  204. local part = part(1,modelzorz,0,0,Torso.BrickColor,"PartGear",vt(1,1,1))
  205. local mesh = mesh("BlockMesh",part,"","",vt(0,0,0),vt(1.1,0.3,0.2))
  206. local weld = it("Weld")
  207. weld.Parent = part
  208. weld.Part0 = part
  209. weld.Part1 = part3
  210. weld.C0 = euler(0,derp,0) * cf(0,0,0)
  211. derp = derp + math.rad(45)
  212. end
  213. derp=0
  214. for i=1,8 do
  215. local part = part(1,modelzorz,0,0,Torso.BrickColor,"Part",vt(1,1,1))
  216. local mesh = mesh("BlockMesh",part,"","",vt(0,0,0),vt(0.61,0.1,0.61))
  217. local weld = it("Weld")
  218. weld.Parent = part
  219. weld.Part0 = part
  220. weld.Part1 = part9
  221. weld.C0 = euler(0,0,0) * cf(0,1.3-derp,0)
  222. derp = derp + 0.3
  223. end
  224. derp=0
  225. for i=1,7 do
  226. local part = part(1,modelzorz,0,0,BrickColor.new("Black"),"Part",vt(1,1,1))
  227. local mesh = mesh("CylinderMesh",part,"","",vt(0,0,0),vt(0.2,0.1,0.2))
  228. local weld = it("Weld")
  229. weld.Parent = part
  230. weld.Part0 = part
  231. weld.Part1 = part10
  232. weld.C0 = euler(0,0,1.57) * cf(0,-0.8,-1+derp)
  233. derp = derp + 0.3
  234. end
  235. derp=0
  236. for i=1,5 do
  237. local part = part(1,modelzorz,0,0,BrickColor.new("Black"),"Part",vt(1,1,1))
  238. local mesh = mesh("CylinderMesh",part,"","",vt(0,0,0),vt(0.2,0.1,0.2))
  239. local weld = it("Weld")
  240. weld.Parent = part
  241. weld.Part0 = part
  242. weld.Part1 = part12
  243. weld.C0 = euler(0,0,1.57) * cf(0,0.8,-1+0.3+derp)
  244. derp = derp + 0.3
  245. end
  246. derp=0
  247. for i=1,7 do
  248. local part = part(1,modelzorz,0,0,BrickColor.new("Black"),"Part",vt(1,1,1))
  249. local mesh = mesh("CylinderMesh",part,"","",vt(0,0,0),vt(0.2,0.1,0.2))
  250. local weld = it("Weld")
  251. weld.Parent = part
  252. weld.Part0 = part
  253. weld.Part1 = part13
  254. weld.C0 = euler(0,0,1.57) * cf(0,-0.8,-1+derp)
  255. derp = derp + 0.3
  256. end
  257. derp=0
  258. for i=1,5 do
  259. local part = part(1,modelzorz,0,0,BrickColor.new("Black"),"Part",vt(1,1,1))
  260. local mesh = mesh("CylinderMesh",part,"","",vt(0,0,0),vt(0.2,0.1,0.2))
  261. local weld = it("Weld")
  262. weld.Parent = part
  263. weld.Part0 = part
  264. weld.Part1 = part15
  265. weld.C0 = euler(0,0,1.57) * cf(0,0.8,-1+0.3+derp)
  266. derp = derp + 0.3
  267. end
  268.  
  269. BP=nil
  270. doflying=false
  271. --[[
  272. bv.velocity = mouse.Hit.lookVector * 40
  273. bg.cframe = CFrame.new(bg.Parent.Position, mouse.Hit.p)
  274. bv.Parent = Torso
  275. bf.Parent = Torso
  276. bf.force = Vector3.new(0, 190 * Torso:GetMass(), 0)
  277. ]]
  278. bv = Instance.new("BodyVelocity")
  279. bv.maxForce = Vector3.new(4e+020, 4e+020, 4e+020)
  280. bf = Instance.new("BodyForce")
  281. bf.force = Vector3.new(0, 196 * Torso:GetMass(), 0)
  282. local bodpos=Instance.new("BodyPosition")
  283. bodpos.maxForce = vt(80000,40000,80000)
  284. bodpos.Name = "BP"
  285. local bg = Instance.new("BodyGyro")
  286. bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  287. bg.P = 2000
  288. m = Player:GetMouse()
  289. m.KeyDown:connect(function(k)
  290. if k=="w" then
  291. if doflying==true then
  292. moveforward=true
  293. while moveforward==true do
  294. wait()
  295. speed=2
  296. refpart.Parent=modelzorz
  297. refweld=Instance.new("Weld")
  298. refweld.Parent=refpart
  299. refweld.Part0=refpart
  300. refweld.Part1=Torso
  301. refweld.C0=euler(-0.5,0,0)
  302. bv.Parent=Torso
  303. bv.velocity = refpart.CFrame.lookVector*25
  304. --bodpos.position=Torso.CFrame.lookVector
  305. end
  306. end
  307. end
  308. if k=="s" then
  309. if doflying==true then
  310. movebackward=true
  311. while movebackward==true do
  312. wait()
  313. speed=2
  314. refpart.Parent=modelzorz
  315. refweld=Instance.new("Weld")
  316. refweld.Parent=refpart
  317. refweld.Part0=refpart
  318. refweld.Part1=Torso
  319. refweld.C0=euler(0.5,0,0)
  320. bv.Parent=Torso
  321. bv.velocity = refpart.CFrame.lookVector*-25
  322. --bodpos.position=Torso.CFrame.lookVector
  323. end
  324. end
  325. end
  326. if k=="a" then
  327. if doflying==true then
  328. moveleft=true
  329. while moveleft==true do
  330. wait()
  331. speed=2
  332. refpart.Parent=modelzorz
  333. refweld=Instance.new("Weld")
  334. refweld.Parent=refpart
  335. refweld.Part0=refpart
  336. refweld.Part1=Torso
  337. refweld.C0=euler(0,-1.57,0.5)
  338. bv.Parent=Torso
  339. bv.velocity = refpart.CFrame.lookVector*25
  340. --bodpos.position=Torso.CFrame.lookVector
  341. end
  342. end
  343. end
  344. if k=="d" then
  345. if doflying==true then
  346. moveright=true
  347. while moveright==true do
  348. wait()
  349. speed=2
  350. refpart.Parent=modelzorz
  351. refweld=Instance.new("Weld")
  352. refweld.Parent=refpart
  353. refweld.Part0=refpart
  354. refweld.Part1=Torso
  355. refweld.C0=euler(0,1.57,-0.5)
  356. bv.Parent=Torso
  357. bv.velocity = refpart.CFrame.lookVector*25
  358. --bodpos.position=Torso.CFrame.lookVector
  359. end
  360. end
  361. end
  362. if k:byte() == 32 then
  363. print(doflying)
  364. jumpcount=jumpcount+1
  365. coroutine.resume(coroutine.create(function()
  366. wait(1)
  367. jumpcount=0
  368. end))
  369. if jumpcount==2 then
  370. if doflying==false then
  371. --print("YUNOWORK")
  372. doflying=true
  373. bg.Parent=Torso
  374. bodpos.Parent=Torso
  375. bodpos.position=Torso.Position+vt(0,10,0)
  376. BP=bodpos.position
  377. --print(mouse.Hit.p)
  378. print(bodpos.Parent)
  379. print("FLY PUPA, FLYYYYYYY")
  380. coroutine.resume(coroutine.create(function()
  381. while doflying==true do
  382. wait()
  383. doinganimation=true
  384. for i=0,1,0.1*speed do
  385. wait()
  386. bodpos.position=BP+vt(0,-4*i,0)
  387. weld10.C1 = euler(0,-0.3+0.5*i,0)
  388. weld12.C1 = euler(0,-0.5+0.7*i,0)
  389. weld13.C1 = euler(0,0.3-0.5*i,0)
  390. weld15.C1 = euler(0,0.5-0.7*i,0)
  391. end
  392. for i=0,1,0.2*speed do
  393. wait()
  394. bodpos.position=BP+vt(0,-4-2*i,0)
  395. weld10.C1 = euler(0,-0.3+0.5+0.4*i,0)
  396. weld12.C1 = euler(0,-0.5+0.7+0.6*i,0)
  397. weld13.C1 = euler(0,0.3-0.5-0.4*i,0)
  398. weld15.C1 = euler(0,0.5-0.7-0.6*i,0)
  399. end
  400. for i=0,1,0.2*speed do
  401. wait()
  402. bodpos.position=BP+vt(0,-4-2+7*i,0)
  403. weld10.C1 = euler(0,-0.3+0.5+0.4-1.6*i,0)
  404. weld12.C1 = euler(0,-0.5+0.7+0.6-1.4*i,0)
  405. weld13.C1 = euler(0,0.3-0.5-0.4+1.6*i,0)
  406. weld15.C1 = euler(0,0.5-0.7-0.6+1.4*i,0)
  407. end
  408. for i=0,1,0.1*speed do
  409. wait()
  410. bodpos.position=BP+vt(0,-4-2+7-1*i,0)
  411. weld10.C1 = euler(0,-0.3+0.5+0.4-1.6+0.6*i,0)
  412. weld12.C1 = euler(0,-0.5+0.7+0.6-1.8,0)
  413. weld13.C1 = euler(0,0.3-0.5-0.4+1.6-0.6*i,0)
  414. weld15.C1 = euler(0,0.5-0.7-0.6+1.8,0)
  415. end
  416. doinganimation=false
  417. end
  418. end))
  419. elseif doflying==true then
  420. doflying=false
  421. bg.Parent=nil
  422. bv.Parent = nil
  423. bf.Parent = nil
  424. bodpos.Parent=nil
  425. wait()
  426. while doinganimation==true do
  427. wait()
  428. end
  429. for i=0,1,0.1 do
  430. weld10.C1 = euler(0,-0.3,0)
  431. weld12.C1 = euler(0,-0.5,0)
  432. weld13.C1 = euler(0,0.3,0)
  433. weld15.C1 = euler(0,0.5,0)
  434. wait()
  435. end
  436. end
  437. end
  438. end
  439. end)
  440. m.KeyUp:connect(function(k)
  441. if k=="w" then
  442. for i=0,1,0.1 do
  443. wait()
  444. speed=1
  445. bodpos.position=Torso.Position
  446. BP=bodpos.position
  447. refpart.Parent=nil
  448. bv.Parent=nil
  449. bv.velocity = Torso.CFrame.lookVector*0
  450. moveforward=false
  451. end
  452. end
  453. if k=="s" then
  454. for i=0,1,0.1 do
  455. wait()
  456. speed=1
  457. bodpos.position=Torso.Position
  458. BP=bodpos.position
  459. refpart.Parent=nil
  460. bv.Parent=nil
  461. bv.velocity = Torso.CFrame.lookVector*0
  462. movebackward=false
  463. end
  464. end
  465. if k=="a" then
  466. for i=0,1,0.1 do
  467. wait()
  468. speed=1
  469. bodpos.position=Torso.Position
  470. BP=bodpos.position
  471. refpart.Parent=nil
  472. bv.Parent=nil
  473. bv.velocity = Torso.CFrame.lookVector*0
  474. moveleft=false
  475. end
  476. end
  477. if k=="d" then
  478. for i=0,1,0.1 do
  479. wait()
  480. speed=1
  481. bodpos.position=Torso.Position
  482. BP=bodpos.position
  483. refpart.Parent=nil
  484. bv.Parent=nil
  485. bv.velocity = Torso.CFrame.lookVector*0
  486. moveright=false
  487. end
  488. end
  489. end)
  490.  
  491. coroutine.resume(coroutine.create(function()
  492. while true do
  493. wait()
  494. if moveforward==true then
  495. bg.cframe = workspace.CurrentCamera.CoordinateFrame*euler(-0.5,0,0)
  496. elseif movebackward==true then
  497. bg.cframe = workspace.CurrentCamera.CoordinateFrame*euler(0.5,0,0)
  498. elseif moveleft==true then
  499. bg.cframe = workspace.CurrentCamera.CoordinateFrame*euler(0,0,0.5)
  500. elseif moveright==true then
  501. bg.cframe = workspace.CurrentCamera.CoordinateFrame*euler(0,0,-0.5)
  502. else
  503. bg.cframe = workspace.CurrentCamera.CoordinateFrame
  504. end
  505. end
  506. end))
  507. --(string.byte(k)==32)
  508. -- lego mediafire
Add Comment
Please, Sign In to add comment