Advertisement
aksels101

Untitled

Jul 28th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.72 KB | None | 0 0
  1. name = 'princesswolf222'
  2. PLAYERS = game:GetService('0ni0n')
  3. ply = PLAYERS.LocalPlayer
  4. char = ply.Character
  5. pcall(function() char:FindFirstChild("legetdg"):Remove() end)
  6. m = Instance.new("Model",char) m.Name = "legetdg"
  7. hop = Instance.new("HopperBin",ply.Backpack)
  8. hop.Name = name
  9. debris = game:GetService("Debris")
  10. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  11. floatforce = 196.25
  12. torso,head = char.Torso,char.Head
  13. attacking = false
  14. rs = torso["Right Shoulder"]
  15. ls = torso["Left Shoulder"]
  16. rh = torso["Right Hip"]
  17. lh = torso["Right Hip"]
  18. neck = torso["Neck"]
  19. rw,lw = nil,nil
  20. rhw,lhw = nil,nil
  21. local orgc1 = rs.C1
  22. rarm = char["Right Arm"]
  23. larm = char["Left Arm"]
  24. rleg = char["Right Leg"]
  25. lleg = char["Left Leg"]
  26. normposr = cfn(1.5,.5,0)
  27. normposl = cfn(-1.5,.5,0)
  28. normposl2 = cfn(.5,-1.5,0)
  29. normposr2 = cfn(-.5,-1.5,0)
  30. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  31. holdpos = normposr*ang(math.pi/2,0,0)
  32. holdpos2 = normposl*ang(math.pi/2,0,0)
  33. function genNew(ClassName, Parent, Properties)
  34. local nObj = Instance.new(ClassName, Parent)
  35. if Properties["FormFactor"] then
  36. nObj["FormFactor"] = Properties["FormFactor"]
  37. end
  38. for Prop, Value in pairs(Properties) do
  39. nObj[Prop] = Value
  40. end
  41. return nObj
  42. end
  43. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  44. if typee == 'wedge' then
  45. c = Instance.new("WedgePart",m)
  46. elseif typee == 'seat' then
  47. c = Instance.new("Seat",m)
  48. elseif typee == 'vseat' then
  49. c = Instance.new("VehicleSeat",m)
  50. else
  51. c = Instance.new("Part",m)
  52. end
  53. c.TopSurface,c.BottomSurface = 0,0
  54. c.Locked = true
  55. c.formFactor = "Custom"
  56. c.Size = Vector3.new(x,y,z)
  57. if color ~= "random" then
  58. c.BrickColor = BrickColor.new(color)
  59. else c.BrickColor = BrickColor:random()
  60. end
  61. c.Transparency = transparency
  62. c.CanCollide = cancollide
  63. if anchored ~= nil then c.Anchored = anchored end
  64. if parent ~= nil then c.Parent = parent end
  65. return c
  66. end
  67. ,
  68. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  69. ,
  70. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  71. w = Instance.new("Motor",m)
  72. if parent ~= nil then w.Parent = parent end
  73. w.Part0,w.Part1 = part0,part1
  74. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  75. return w
  76. end
  77. ,
  78. ["BG"] = function(parent)
  79. local c = Instance.new("BodyGyro",parent)
  80. c.P = 20e+003
  81. c.cframe = parent.CFrame
  82. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  83. return c
  84. end
  85. ,
  86. ["BP"] = function(parent,position)
  87. local bp = Instance.new("BodyPosition",parent)
  88. bp.maxForce = Vector3.new()*math.huge
  89. bp.position = position
  90. return bp
  91. end
  92. ,
  93. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  94. f = Instance.new("Fire",parent)
  95. f.Size = size
  96. f.Heat = heat
  97. if enabled ~= nil then f.Enabled = enabled end
  98. if color ~= nil then f.Color = BrickColor.new(color).Color end
  99. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  100. return f
  101. end
  102. ,
  103. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  104. if meshid == "cylinder" then
  105. mesh = Instance.new("CylinderMesh",parent)
  106. mesh.Scale = Vector3.new(x,y,z)
  107. return mesh
  108. elseif meshid == 'block' then
  109. mesh = Instance.new("BlockMesh",parent)
  110. mesh.Scale = Vector3.new(x,y,z)
  111. return mesh
  112. end
  113. mesh = Instance.new("SpecialMesh",parent)
  114. if meshid == 'wedge' then
  115. mesh.MeshType = 'Wedge'
  116. elseif meshid == 'sphere' then
  117. mesh.MeshType = 3
  118. elseif type(meshid) == "number" then
  119. mesh.MeshId = "rbxassetid://"..meshid
  120. else
  121. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  122. end
  123. mesh.Scale = Vector3.new(x,y,z)
  124. if meshtexture then
  125. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  126. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  127. end
  128. return mesh
  129. end,
  130. ["Dec"] = function(parent,face,id,transparency)
  131. c = Instance.new("Decal",parent)
  132. c.Face = face
  133. c.Texture = id
  134. if transparency then c.Transparency = transparency end
  135. return c
  136. end,
  137. ["S"] = function(id,pitch,volume,parent)
  138. cur = nil
  139. found = false
  140. if type(id) == 'string' then
  141. for i,v in pairs(char.Head:children()) do
  142. if v:IsA("Sound") and v.Name == id and not found then
  143. cur = v
  144. if parent then cur = v:Clone() cur.Parent = parent end
  145. cur.Pitch = pitch
  146. if volume then cur.Volume = volume end
  147. cur:Play()
  148. found = true
  149. return cur
  150. end
  151. end
  152. elseif type(id) == 'number' then
  153. local a = char.Head:FindFirstChild('exteo')
  154. a.SoundId = 'rbxassetid://'..id
  155. a.Pitch = pitch
  156. if volume then a.Volume = volume end
  157. a:Play()
  158. return a
  159. end
  160. end
  161. }
  162. function spaas(position,radius,number,number2,color)
  163. mode = Instance.new("Model",m)
  164. for i = 1,number2 do
  165. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  166. mag = (position-pos).magnitude
  167. col = color or 'Toothpaste'
  168. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  169. T.FM(laz,'cylinder',.3,1,.3)
  170. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  171. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  172. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  173. mag2 = (cframe-pos2).magnitude
  174. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  175. T.FM(laz2,'cylinder',.3,1,.3)
  176. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  177. previo = laz2
  178. for i = 1,number do
  179. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  180. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  181. mag2 = (cframe-pos2).magnitude
  182. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  183. T.FM(laz2,'cylinder',.3,1,.3)
  184. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  185. previo = laz2
  186. end
  187. end
  188. debris:AddItem(mode,.1)
  189. end
  190. function lightning(startpos,endpos,times,offse,livetime,col,dmg)
  191. local curpos = startpos
  192. for i = 1,times do
  193. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  194. offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
  195. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  196. if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
  197. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  198. if times == i then
  199. mag2 = (curpos-endpos).magnitude
  200. laz.Size = v3n(.1,.1,mag2)
  201. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  202. else
  203. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  204. end
  205. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  206. end
  207. end
  208. ------MESHIDS---
  209. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  210. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  211. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  212. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  213. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  214. ["duck"] = 9419831}---some meshids
  215. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  216. ["cheese"] = 1090703}
  217. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  218. ['midas'] = 17385513;
  219. ['spark'] = 10756118;
  220. ['boom'] = 10730819;
  221. ['plank'] = 10548112;
  222. ['harmonica1'] = 33069371;
  223. ['harmonica2'] = 33069412;
  224. ['thump'] = 10730819;
  225. }
  226. for i,v in pairs(soundids) do
  227. for _,q in pairs(char.Head:children()) do
  228. if q.Name == i then q:Remove() end
  229. end
  230. end
  231. for i,v in pairs(soundids) do
  232. sound = Instance.new("Sound")
  233. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  234. sound.Name = i
  235. sound.Parent = char.Head
  236. end
  237. M = {["R"] = function(a,b) return math.random(a,b) end,
  238. ["Cos"] = function(a) return math.cos(a) end,
  239. ["Sin"] = function(a) return math.sin(a) end,
  240. ["D"] = function(a) return math.rad(a) end
  241. }
  242. for i,v in pairs(char:children()) do
  243. if v:IsA("Hat") then v:Remove() end
  244. end
  245. hat = T.P(1,1,1,'White',0,false,false)
  246. T.FM(hat,57475891,1,1,1,'cheese')
  247. T.W(hat,char.Head,0,1,0,0,0,0)
  248. hat = T.P(1,1,1,'White',0,false,false)
  249. T.FM(hat,28165956,1.05,1,1.1,'cheese')
  250. T.W(hat,char.Head,0,0,0,0,0,0)
  251. torso.Transparency = 1
  252. p = T.P(1,2,2,'Black',0,false,false,m,'wedge') p.formFactor = 'Symmetric'
  253. T.W(p,torso,0,0,0,-math.pi/2,0,-math.pi/2)
  254. p2 = T.P(1,2,2,'New Yeller',0,false,false,m,'wedge') p2.formFactor = 'Symmetric'
  255. T.W(p2,torso,0,0,0,math.pi/2,0,math.pi/2)
  256. r = .6
  257. o = 55
  258. for e = -.5,.5,1 do
  259. for i = o,180+o,40 do
  260. q = T.P(.1,.3,.1,'New Yeller',0,false,false)
  261. T.FM(q,'block',.99,1,.99)
  262. T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i))
  263. end
  264. for i = o+180,360+o,40 do
  265. q = T.P(.1,.3,.1,'Black',0,false,false)
  266. T.FM(q,'block',1,1,1)
  267. T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i))
  268. end
  269. end
  270. q = T.P(1,1,1,'White',0,false,false)
  271. T.W(q,lleg,0,-.8,-.3,-math.pi/2,0,0)
  272. T.FM(q,48880435,1,1,1,'cheese')
  273. q = T.P(1,1,1,'White',0,false,false)
  274. T.W(q,rleg,0,-.8,-.3,-math.pi/2,0,0)
  275. T.FM(q,48880435,1,1,1,'cheese')
  276. staff = T.P(.3,4,.3,'Brown',0,false,false)
  277. hw = T.W(staff,torso,0,0,.5,0,0,M.D(-45)) normh = hw.C1
  278. ball = T.P(1,1,1,'Black',0,false,false) ball.Shape = 0
  279. mot = T.W(ball,staff,0,2.45,0,0,math.pi/2,0)
  280. mot.C0 = cfn()*ang(0,math.pi/2,0)
  281. eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1)
  282. T.W(eye,ball,.25,.2,-.35,0,0,0)
  283. eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1)
  284. T.W(eye,ball,-.25,.2,-.35,0,0,0)
  285. hat = T.P(1,1,1,'New Yeller',0,false,false)
  286. T.FM(hat,16627529,1,1,1)
  287. T.W(hat,ball,0,.4,0,M.D(5),0,0)
  288. mot.MaxVelocity = .1
  289. function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308
  290. if a == nil then mot.DesiredAngle = 0
  291. else mot.DesiredAngle = a
  292. end
  293. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  294. mot.MaxVelocity = oldvelocity
  295. end
  296. function ventta(mot)
  297. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  298. end
  299. function findplayers(a,b)
  300. list = {}
  301. for _,v in pairs(Workspace:children()) do
  302. if v:IsA("Model") then
  303. for _,child in pairs(v:children()) do
  304. if child:IsA("Humanoid") then
  305. if (a-child.Torso.Position).magnitude < b then
  306. table.insert(list,child.Parent)
  307. end
  308. end
  309. end
  310. end
  311. end
  312. return list
  313. end
  314. function l(a,x,y,z,b)
  315. if b == nil then
  316. return a.CFrame*cfn(x,y,z)
  317. else
  318. return a*cfn(x,y,z)
  319. end
  320. end
  321. function damage(hit,amount,delay)
  322. for i,v in pairs(hit:children()) do
  323. if v:IsA("Humanoid") and v.Parent ~= char then
  324. if delay then
  325. local found = v:FindFirstChild('tag')
  326. if not found then
  327. local a = Instance.new("StringValue",v)
  328. a.Name = 'tag'
  329. debris:AddItem(a,delay)
  330. v.Health = v.Health - amount
  331. end
  332. else v.Health = v.Health - amount
  333. end
  334. end
  335. end
  336. end
  337. lock = {["R"] =
  338. function(a)
  339. if a == 1 then
  340. rabrick = T.P(1,1,1,"White",1,false,false)
  341. rw = T.W(rabrick,torso,1.5,.5,0,0,0,0)
  342. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  343. elseif a == 2 then
  344. rlbrick = T.P(1,1,1,"White",1,false,false)
  345. rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0)
  346. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  347. elseif a == 0 then
  348. rs.Parent = torso
  349. rw.Parent = nil
  350. rabrick:Destroy() rabrick = nil
  351. elseif a == -1 then
  352. rhw.Parent = nil
  353. rh.Parent = torso
  354. rlbrick:Destroy() rlbrick = nil
  355. end
  356. end
  357. , ["L"] = function(a)
  358. if a == 1 then
  359. labrick = T.P(1,1,1,"White",1,false,false)
  360. lw = T.W(labrick,torso,-1.5,.5,0,0,0,0)
  361. T.W(larm,labrick,0,-.5,0,0,0,0)
  362. elseif a == 2 then
  363. llbrick = T.P(1,1,1,"White",1,false,false)
  364. lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0)
  365. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  366. elseif a == 0 then
  367. ls.Parent = torso
  368. lw.Parent = nil
  369. labrick:Destroy() labrick = nil
  370. elseif a == -1 then
  371. lhw.Parent = nil
  372. lh.Parent = torso
  373. llbrick:Destroy() llbrick = nil
  374. end
  375. end
  376. }
  377. function equip()
  378. if not equipped then
  379. equipped = true
  380. hw.Part1 = rarm
  381. hw.C1 = cfn(0,-1,0)*ang(-math.pi/2,0,0)
  382. elseif equipped then
  383. equipped = false
  384. hw.Part1 = torso
  385. hw.C1 = cfn(0,0,.5)*ang(0,0,M.D(-45))
  386. end
  387. normh = hw.C1
  388. end
  389. mag = _
  390. function findground(position)
  391. local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*200)
  392. local obj,pos2 = Workspace:FindPartOnRay(ray,m)
  393. if obj and pos2 then return obj,pos2 else return nil end
  394. end
  395. function attack()
  396. lock.R(1)
  397. for i = 0,1,.1 do
  398. rw.C1 = normposr*ang(M.D(90*i),0,0)
  399. hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0)
  400. wait()
  401. end
  402. mot.DesiredAngle = math.pi/2
  403. ventta(mot)
  404. cannon = T.P(.3,.1,.3,'White',0,false,false)
  405. T.FM(cannon,'cylinder',1,1,1)
  406. wld = T.W(cannon,ball,0,-.2,-.5,math.pi/2,0,0)
  407. for i = 0,1,.1 do
  408. cannon.Size = v3n(.3,2*i,.3)
  409. wld.Parent,wld.Part1 = m,ball
  410. wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0)
  411. wait()
  412. end
  413. local bullet = T.P(1,1,1,'New Yeller',0,true,true) T.FM(bullet,'sphere',1,1,1)
  414. bullet.CFrame = cannon.CFrame*cfn(0,-2,0)
  415. local ray = Ray.new(cannon.Position,cannon.Position+torso.CFrame.lookVector*50)
  416. local obj,pos = Workspace:FindPartOnRay(ray,m)
  417. if obj and pos then mag = (cannon.Position-pos).magnitude else mag = 50 end
  418. cf = cannon.CFrame*cfn(0,-2,0)
  419. T.C(function()
  420. while bullet.Parent ~= nil do
  421. local obj,pos2 = findground(bullet.CFrame)
  422. if pos2 then
  423. T.C(function()
  424. local ef = T.P(1,1,1,'Magenta',0,false,true)
  425. ef.CFrame = cfn(pos2)
  426. local msh = T.FM(ef,'crown',1,1,1)
  427. for i = 1,10 do
  428. msh.Scale = v3n(i,1,i)
  429. ef.Transparency = i/10
  430. wait()
  431. end
  432. ef:Remove()
  433. end)
  434. end
  435. wait(.1)
  436. end
  437. end)
  438. T.C(function()
  439. for i = 0,mag,1 do
  440. bullet.CFrame = cf*cfn(0,-i,0)
  441. wait()
  442. end
  443. local p = T.P(1,1,1,'Black',0,false,true)
  444. p.CFrame = bullet.CFrame
  445. bullet:Remove()
  446. local msh = T.FM(p,'sphere',1,1,1)
  447. ring = T.P(1,1,1,'Black',0,false,true)
  448. ring.CFrame = p.CFrame
  449. ringm = T.FM(ring,'ring',1,1,1)
  450. local sw = T.P(1,1,1,'New Yeller',1,false,true)
  451. sw.CFrame = p.CFrame
  452. ground,groundp = findground(p.CFrame)
  453. if ground then
  454. for i = 1,5 do
  455. p2 = T.P(20,1,20,ground.BrickColor.Name,ground.Transparency,true,true)
  456. p2.TopSurface,p2.BottomSurface = ground.TopSurface,ground.BottomSurface
  457. p2.CFrame = cfn(groundp)*cfn(0,-1,0)*ang(M.D(M.R(-20,20)),M.D(M.R(-20,20)),M.D(M.R(-20,20)))
  458. end
  459. end
  460. for i = 0,1,.05 do
  461. msh.Scale = v3n(60*i,60*i,60*i)
  462. ringm.Scale = v3n(60*i,60*i,0)
  463. ring.CFrame = p.CFrame*ang(M.D(360*i),0,0)
  464. ring.Transparency = i
  465. p.Transparency = i
  466. wait()
  467. end
  468. ring:Remove()
  469. p:Remove()
  470. end)
  471. for i = 1,0,-.1 do
  472. rw.C1 = normposr*ang(M.D(90*i),0,0)
  473. hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0)
  474. cannon.Size = v3n(.3,2*i,.3)
  475. wld.Parent,wld.Part1 = m,ball
  476. wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0)
  477. wait()
  478. end
  479. cannon:Remove()
  480. lock.R(0)
  481. end
  482. function lasso(mouse)
  483. bg = T.BG(head) cf = bg.cframe
  484. lock.L(1) lock.R(1)
  485. rw.C1 = normposr*ang(0,0,M.D(10))
  486. lw.C1 = normposl*ang(0,0,-math.pi/2)
  487. cheese = T.P(1,1,1,'White',0,true,false)
  488. wld = T.W(cheese,larm,0,-1,0,0,0,0)
  489. T.FM(cheese,'cheese',1,1,1,'cheese').VertexColor = v3n(.1,.5,0)
  490. holding = true
  491. while holding do wait() bg.cframe = cfn(head.Position,v3n(mouse.hit.p.x,char.Head.Position.y,mouse.hit.p.z))*ang(0,-math.pi/2,0) end
  492. wld:Remove()
  493. cf = (larm.CFrame*cfn(0,-4,0))
  494. cheese.CFrame = cf
  495. genNew('Smoke',cheese,{
  496. Color = Color3.new(0,.5,0);
  497. Size = 1;
  498. RiseVelocity = 10;
  499. })
  500. debris:AddItem(cheese,3)
  501. Instance.new("BodyForce",cheese).force = cfn(cf.p,(cf*cfn(0,-4,0)).p).lookVector*100 + v3n(0,cheese:GetMass()+floatforce,0)
  502. lw.C1 = normposl*ang(0,0,M.D(-120))
  503. wait(.1)
  504. lw.C1 = normposl*ang(0,0,-math.pi/2)
  505. bg:Remove()
  506. lock.L(0) lock.R(0)
  507. end
  508. hum = char.Humanoid
  509. restbp = nil
  510. restbg = nil
  511. function rest()
  512. if not restbp then
  513. lock.R(1) lock.L(1) lock.R(2) lock.L(2)
  514. tyu = cfn(.2,.2,-.2)
  515. tyu1 = cfn(-.2,.2,-.2)
  516. tyu2 = cfn(-.1,.2,-.2)
  517. rw.C1 = (holdpos*tyu1)*ang(M.D(100),0,M.D(-30))
  518. lw.C1 = (holdpos2*tyu)*ang(M.D(100),0,M.D(30))
  519. neck.C0 = normposn*ang(M.D(20),0,0)
  520. lhw.C1 = (normposl2*tyu2)*ang(M.D(20),0,M.D(-20))
  521. rhw.C1 = (normposr2)*ang(M.D(5),0,M.D(10))
  522. pos = torso.CFrame
  523. restbp = T.BP(torso,pos.p)
  524. cloud = T.P(5,2,5,'White',0,false,false) T.FM(cloud,'cheese',6,2,6,'cheese').VertexColor = v3n(1,1,0)
  525. cloud.Position = pos.p
  526. T.W(cloud,torso,0,1,.8,-math.pi/2,M.D(-22.5),0)
  527. T.C(function()
  528. while wait() do
  529. for i = 0,.5,.05 do
  530. restbp.position = pos.p+v3n(0,i,0)
  531. wait(.2)
  532. end
  533. for i = .5,0,-.05 do
  534. restbp.position = pos.p+v3n(0,i,0)
  535. wait(.2)
  536. end
  537. end
  538. end)
  539. restbg = T.BG(torso)
  540. restbg.cframe = pos*ang(math.pi/2,0,0)
  541. hum.PlatformStand = true
  542. else
  543. hum.PlatformStand = false
  544. for i = -1,0 do lock.R(i) lock.L(i) end
  545. cloud:Remove()
  546. restbp:Remove()
  547. restbg:Remove()
  548. neck.C0 = normposn
  549. torso.CFrame = pos
  550. restbp,restbg = nil,nil
  551. end
  552. end
  553. function dance()
  554. lock.R(1) lock.L(1) lock.R(2) lock.L(2)
  555. for _ = 0,3 do
  556. for i = 0,1,.2 do
  557. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  558. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  559. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  560. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  561. neck.C0 = normposn*ang(M.D(30*i),0,0)
  562. wait()
  563. end
  564. for i = 1,-1,-.2 do
  565. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  566. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  567. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  568. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  569. neck.C0 = normposn*ang(M.D(30*i),0,0)
  570. wait()
  571. end
  572. for i = -1,0,.2 do
  573. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  574. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  575. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  576. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  577. neck.C0 = normposn*ang(M.D(30*i),0,0)
  578. wait()
  579. end
  580. end
  581. lock.R(0) lock.L(0) lock.R(-1) lock.L(-1)
  582. end
  583. levbg = nil
  584. function levitate()
  585. if not levbp then
  586. levbp = T.BP(torso,torso.Position)
  587. else levbp:Remove() levbp = nil
  588. end
  589. end
  590. function test()
  591. lock.R(1)
  592. for i = 0,1,.1 do
  593. wait()
  594. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  595. end
  596. for i = 1,0,-.1 do
  597. wait()
  598. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  599. end
  600. lock.R(0)
  601. end
  602. function fly(mouse)
  603. levbg = T.BG(torso)
  604. holding = true
  605. lock.R(1) lock.L(1)
  606. T.C(function()
  607. while holding do
  608. for i = 0,1,.1 do
  609. wait()
  610. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  611. lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i))
  612. end
  613. for i = 1,0,-.1 do
  614. wait()
  615. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  616. lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i))
  617. end
  618. end
  619. end)
  620. while holding do
  621. ches = T.P(1,1,1,'White',0,true,false)
  622. T.FM(ches,'cheese',1,1,1,'cheese')
  623. debris:AddItem(ches,1)
  624. Instance.new("Sparkles",ches)
  625. ches.CFrame = torso.CFrame*cfn(0,-3,0)
  626. levbg.cframe = cfn(torso.Position,mouse.hit.p)*ang(-math.pi/2,0,0)
  627. levbp.position = torso.Position + (torso.Position-mouse.hit.p).unit*-10
  628. wait()
  629. end
  630. lock.R(0) lock.L(0)
  631. levbg:Remove() levbg = nil
  632. end
  633. function sel(mouse)
  634. if levbp then
  635. fly(mouse)
  636. elseif equipped then attack()
  637. else
  638. lasso(mouse)
  639. end
  640. end
  641. klist = {
  642. {'c',function() rest() end};
  643. {'f',function() dance() end};
  644. {'q',function() levitate() end};
  645. {'r',function() equip() end};
  646. }
  647. hop.Deselected:connect(function() lock.R(0) lock.L(0) end)
  648. hop.Selected:connect(function(mouse)
  649. mouse.Button1Up:connect(function() holding = false end)
  650. mouse.KeyUp:connect(function(a) for i,v in pairs(klist) do if a == v[1] and v[3] ~= nil then holding = false end end end)
  651. mouse.KeyDown:connect(function(key)
  652. if attacking then return end
  653. for i,v in pairs(klist) do
  654. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  655. end
  656. end)
  657. mouse.Button1Down:connect(function() if attacking then return end attacking = true sel(mouse) attacking = false end)
  658. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement