alpayspastbin

Untitled

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