Advertisement
Dark_EccentricYT

Untitled

Apr 22nd, 2017
1,794
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.49 KB | None | 0 0
  1. PI,TAU=math.pi,math.pi*2
  2. md,mr,cfn,v3n,bcol=math.rad,math.random,CFrame.new,Vector3.new,BrickColor.new
  3. ang=function(x,y,z)return CFrame.Angles(x or 0,y or 0,z or 0)end
  4. player=game:service'Players'.LocalPlayer
  5. mouse=player:GetMouse()
  6. char=player.Character
  7. torso=(char:FindFirstChild'Torso' or char:FindFirstChild'HumanoidRootPart')
  8. numkp=NumberSequenceKeypoint.new
  9. colkp=ColorSequenceKeypoint.new
  10.  
  11. DEBRIS=game:service'Debris'
  12.  
  13. udim=function(a,b,c,d)
  14. if type(a)=='string'then
  15. x,y=tostring(a):match('([%+%d%.%-%/%*]+),([%+%d%.%-%/%*]+)')
  16. return UDim2.new(x or 0,x2 or 0,y or 0,y2 or 0)
  17. else
  18. return UDim2.new(a or 0,c or 0,b or 0,d or 0)
  19. end end
  20.  
  21. pcall(function()char.Pat:Destroy()end)
  22. m=Instance.new("Model",char)m.Name='Pat'
  23.  
  24. for i=0,10 do --quickuses
  25. getfenv(0)['_'..i] = nil
  26. end
  27.  
  28. colors={base=bcol'White'.Color;
  29. second=bcol'Black'.Color;
  30. ear=bcol'Pink'.Color;
  31. tentacle=bcol'New Yeller'.Color}
  32.  
  33. Part = setmetatable({
  34. material = 'Plastic';
  35. cancollide = false;
  36. anchored = false;
  37. parent = m;
  38. color = "White"
  39. },{
  40. __call = function(prefs,x,y,z,col,tr,an,cc,par)
  41. local part = Instance.new("Part")
  42. part.CanCollide = cc or prefs.cancollide
  43. part.Transparency = tr or 0
  44. part.Size = Vector3.new(x or 0, y or 0, z or 0)
  45. part.Anchored = an or prefs.anchored
  46. if col and typeof(col) == 'Color3' then
  47. part.Color = col
  48. else
  49. part.BrickColor = BrickColor.new(col or prefs.color)
  50. end
  51. for i,v in pairs(Enum.NormalId:GetEnumItems())do
  52. part[v.Name..'Surface'] = 10
  53. end
  54. part.Parent = par or prefs.parent
  55. _1 = part
  56. return part
  57. end;
  58. })
  59.  
  60. Mesh = function(parent,mesh_id,scale_x,scale_y,scale_z)
  61. local instance_name = (mesh_id == 'cyl' and 'CylinderMesh') or (mesh_id == 'bl' and 'BlockMesh') or 'SpecialMesh'
  62. local mesh = Instance.new(instance_name)
  63. if instance_name == 'SpecialMesh' then
  64. if mesh_id:match('//') then
  65. mesh.MeshId = mesh_id
  66. else
  67. if mesh_id == 'sph' then
  68. mesh.MeshType = 3
  69. end
  70. end
  71. end
  72. mesh.Scale = Vector3.new(scale_x or 1,scale_y or 1, scale_z or 1)
  73. mesh.Parent = parent or nil
  74. _2 = mesh
  75. return mesh
  76. end
  77.  
  78.  
  79. C = function(a1,a2,...)
  80. local aa={...}
  81. local cf1=CFrame.new(a2 or 0,aa[1] or 0, aa[2] or 0) * CFrame.Angles(aa[3] or 0, aa[4] or 0, aa[5] or 0)
  82. if typeof(a1) == "Instance" then
  83. return a1.CFrame * cf1
  84. elseif typeof(a1) == "CFrame" then
  85. return a1 * cf1
  86. elseif typeof(a1) == "number" then
  87. return CFrame.new(a1 or 0,a2 or 0,aa[1] or 0) * CFrame.Angles(aa[2] or 0,aa[3] or 0,aa[4] or 0)
  88. else
  89. return CFrame.new(a1,a2,unpack(aa))
  90. end
  91. end
  92.  
  93.  
  94. Weld = function(p0,p1,c1,c0)
  95. if p0.Name~='Torso' then p0.Position=p1.Position end
  96. local weld=Instance.new("Motor")
  97. weld.Part0,weld.Part1,weld.C0,weld.C1 = p0,p1,c0 or CFrame.new(),c1 or CFrame.new()
  98. weld.Parent=p0
  99. weld.MaxVelocity=.1
  100. return weld
  101. end
  102. New = function(what)
  103. local obj,par
  104. if typeof(what) == 'Instance' then
  105. obj=what:Clone()
  106. par = what.Parent
  107. else
  108. obj=Instance.new(what)
  109. end
  110. if what=='Weld' then obj.Name='mujoint'end
  111. return function(bar)
  112. if bar and type(bar)=='table' then
  113. for arg,val in pairs(bar) do
  114. if arg=="_PP" then
  115. obj.Part0=val[1]
  116. obj.Part1=val[2]
  117. elseif arg=='_F'then
  118. val(obj)
  119. else
  120. if pcall(function()return obj[arg] end) then
  121. obj[arg]=val
  122. end
  123. end
  124. end
  125.  
  126. obj.Parent = par or (bar._P or nil)
  127. end
  128. _4=obj
  129. return obj
  130. end
  131. end
  132. Edit = function(what)
  133. return function(args)
  134. for ind,obj in next,what do
  135. for arg,val in next,args do
  136. local child,argu = arg:match"(.+)%.(.+)"
  137. if child and argu then
  138. if pcall(function()return obj[child][argu] end) then
  139. obj[child][argu]=val
  140. end
  141. else
  142. if arg=='_F'then
  143. val(ind,obj)
  144. elseif pcall(function()return obj[arg]end) then
  145. obj[arg]=val
  146. end
  147. end
  148. end
  149. end
  150. end
  151. end
  152.  
  153. meshes={
  154. spike = {id="rbxassetid://1033714";scale=v3n(0.5, 1.5, 0.5)};
  155. diamond = {id='rbxassetid://9756362';scale=v3n(0.75, 0.75, 0.75)};
  156. squid = {id='rbxassetid://118262597'};
  157. ring = {id='rbxassetid://3270017'};
  158. }
  159.  
  160. groups={}
  161.  
  162. --BUILD SQUID--
  163. mp=Part(3.5,3,3.5)Mesh(_1,'cyl')_1.Anchored=true
  164. New'Decal'{_P=mp;Texture='rbxassetid://119577774'}
  165. _1.CFrame=C(20,10,0)
  166. head=Part(3.5,2,3.5)Mesh(_1,'sph')
  167. Weld(_1,mp,C(0,1.5))
  168.  
  169. horn=Part(1,1.5,1,'Pink')
  170. Mesh(_1,meshes.spike.id)_2.Scale=_1.Size*meshes.spike.scale
  171. Weld(_1,head,ang(0,0,md'60'),C(0,-1-horn.Size.y/2))
  172. horn2=New(horn){}
  173. -- Mesh(_1,meshes.spike.id)_2.Scale=_1.Size*meshes.spike.scale
  174. Weld(horn2,head,ang(0,0,md'-60'),C(0,-1-horn.Size.y/2))
  175.  
  176. eye=Part(.1,.3,.1,'Cyan')Mesh(_1,'sph',1.5,1.7)_1.Material='Neon'
  177. Weld(_1,mp,C(0,.65,0,0,md'10'),C(0,0,3.5/2))
  178. eye2=New(eye){}
  179. Weld(eye2,mp,C(0,.65,0,0,md'-10'),C(0,0,3.5/2))
  180.  
  181. bottom=Part(3.5,1,3.5,'Black')Mesh(_1,'cyl')
  182. local a=ang(PI/2)
  183. local b_m=Weld(bottom,mp,C(0,-1.5-.5)*a,a)
  184. -- b_m.DesiredAngle=9e+009
  185. b_cent=Part(1,1,1,'',1)Weld(b_cent,bottom)
  186.  
  187. for o=0,TAU,TAU/6 do
  188. local di=Part(.5,.5,.5)
  189. Mesh(_1,meshes.diamond.id) _2.Scale=meshes.diamond.scale*_1.Size
  190. Weld(_1,bottom,ang(0,o),C(0,0,3.5/2))
  191. end
  192.  
  193. start_cf=mp.CFrame
  194.  
  195. rings={}
  196. columns={}
  197. groups.tentacle = {}
  198.  
  199. for i=1,20 do
  200. rings[i]={}
  201. end
  202. ps={}
  203. for o=1,TAU,TAU/5 do
  204. local column={}
  205. local prev=Part(.25,.25,.25,'New Yeller')
  206. Weld(_1,bottom,C(0,-.5)*ang(0,o),C(1.25))
  207. for i=1,20 do
  208. local pp=Part(.25,.25,.25,'New Yeller')
  209.  
  210. local m=Weld(_1,prev,C(0,-.125),C(0,.125))
  211. m.MaxVelocity=.025
  212. table.insert(rings[i],m)
  213. table.insert(column,m)
  214. prev=pp
  215. -- if i%20==0 then wait()end
  216. end
  217. columns[#columns+1] = column
  218.  
  219. end
  220.  
  221.  
  222. --------------------
  223. ------FUNCTIONS----
  224.  
  225. function changecolors(what,new)
  226. local function iter(a)
  227. if a:IsA'Part' and a.Color==what then
  228. a.Color=new
  229. end
  230. for i,v in pairs(a:children())do
  231. iter(v)
  232. end
  233. end
  234. iter(m)
  235. end
  236.  
  237. function movering2(r2,r,a,int)
  238. if typeof(r) == 'table'then
  239. for i=r[1],r[2] do
  240. columns[r2][i].DesiredAngle=int and (a/(r[2]-r[1])) or a
  241. end
  242. else
  243. columns[r2][r].DesiredAngle=a
  244. end
  245. end
  246.  
  247. function movering(r,a,int)
  248. if typeof(r) == 'table'then
  249. for i=r[1],r[2] do
  250. for _,v in pairs(rings[i])do
  251. v.DesiredAngle=int and (a/(r[2]-r[1])) or a
  252. end
  253. end
  254. else
  255. for _,v in pairs(rings[r])do
  256. v.DesiredAngle=a
  257. end
  258. end
  259. end
  260.  
  261. local keypoints={}
  262. for i=0,1,.1 do
  263. local color=Color3.fromHSV(i,1,1)
  264. local kp=colkp(i,color)
  265. table.insert(keypoints,kp)
  266. end
  267.  
  268. bubble_tex='http://www.roblox.com/asset/?id=171794095'
  269.  
  270. emitter=New"ParticleEmitter"{_P=b_cent;
  271. EmissionDirection='Bottom';
  272. Lifetime=NumberRange.new(.5,.6);
  273. -- Texture=bubble_tex;
  274. Speed=NumberRange.new(15);
  275. Color=ColorSequence.new(keypoints);
  276. VelocitySpread=15;
  277. Rate=100;
  278. Enabled=false;
  279. Size=NumberSequence.new{numkp(0,.5);numkp(1,0)};
  280. }
  281. play_bubble=false
  282.  
  283. function up()
  284. emitter.Enabled=false
  285. sound:Stop()
  286. movering({1,20},md'-180',1)
  287. end
  288. function down()
  289. emitter.Enabled=true
  290. if play_bubble then sound:Play() end
  291. movering({1,5},md'45',1)
  292. movering({5,20},-md'75',1)
  293. movering({17,20},md'25',1)
  294. end
  295. prev=0
  296. state='up'
  297.  
  298. -- local curcam=Workspace.CurrentCamera
  299.  
  300. b_m.DesiredAngle=9e+009
  301. b_m.MaxVelocity=0
  302. --Faces--
  303. faces={}
  304. faces.happy="[[2, 1], [7, 1], [2, 2], [7, 2], [2, 3], [7, 3], [1, 6], [8, 6], [1, 7], [2, 7], [7, 7], [8, 7], [2, 8], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8]]"
  305. faces.sad="[[2, 1], [7, 1], [2, 2], [7, 2], [2, 3], [7, 3], [2, 6], [3, 6], [4, 6], [5, 6], [6, 6], [7, 6], [1, 7], [2, 7], [7, 7], [8, 7], [1, 8], [8, 8]]"
  306. faces.xD="[[1, 1], [2, 1], [7, 1], [8, 1], [2, 2], [3, 2], [4, 2], [6, 2], [7, 2], [4, 3], [5, 3], [6, 3], [3, 4], [4, 4], [6, 4], [7, 4], [2, 5], [3, 5], [7, 5], [8, 5], [1, 7], [2, 7], [3, 7], [4, 7], [5, 7], [6, 7], [7, 7], [8, 7], [1, 8], [8, 8], [2, 9], [3, 9], [4, 9], [5, 9], [6, 9], [7, 9]]"
  307. faces.angry="[[2, 1], [7, 1], [2, 2], [3, 2], [6, 2], [7, 2], [3, 3], [7, 3], [2, 4], [3, 4], [6, 4], [7, 4], [2, 8], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8]]"
  308. faces.bored="[[1, 1], [2, 1], [3, 1], [6, 1], [7, 1], [8, 1], [2, 2], [7, 2], [2, 3], [7, 3], [2, 4], [7, 4], [2, 7], [3, 7], [4, 7], [5, 7], [6, 7], [7, 7], [1, 8], [2, 8], [7, 8], [8, 8]]"
  309. faces.normal="[[2, 1], [7, 1], [2, 2], [7, 2], [2, 3], [7, 3], [2, 8], [3, 8], [4, 8], [5, 8], [6, 8], [7, 8]]"
  310. faces.heart="[[2, 1], [7, 1], [1, 2], [2, 2], [3, 2], [6, 2], [7, 2], [8, 2], [0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [6, 3], [7, 3], [8, 3], [9, 3], [0, 4], [1, 4], [2, 4], [3, 4], [4, 4], [5, 4], [6, 4], [7, 4], [8, 4], [9, 4], [1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [2, 6], [3, 6], [4, 6], [5, 6], [6, 6], [7, 6], [3, 7], [4, 7], [5, 7], [6, 7], [4, 8], [5, 8]]"
  311.  
  312. Debounces={
  313. Float = true;
  314. Updown=true;
  315. Motor=true;
  316. }
  317.  
  318. bbg=New"BillboardGui"{_P=head;Adornee=head;Size=udim'5,5';StudsOffset=v3n(0,5,0)}
  319. fr=New"Frame"{_P=bbg;Size=udim'1,1';BackgroundTransparency=1}
  320.  
  321. function changeFace(face)
  322. local bitmap=game:service'HttpService':JSONDecode(faces[face])
  323. fr:ClearAllChildren()
  324. for y=1,10 do
  325. for x=1,10 do
  326. -- print(x,y)
  327. local f=New"Frame"{_P=fr;Size=udim(1/10,1/10);Position=udim( (-1+x)*1/10,(-1+y)*1/10 );
  328. BackgroundColor=bcol'Pink';BackgroundTransparency=1;
  329. }
  330. for _,v in pairs(bitmap) do
  331. if v[1] and v[2] then
  332. if x-1==v[1] and y-1==v[2] then
  333. f.BackgroundTransparency=0
  334. end
  335. end
  336. end
  337. end
  338. end
  339. prevface=faces[face]
  340. end
  341.  
  342. changeFace('normal')
  343. -- m:Destroy()
  344.  
  345. --Music
  346. local music=New"Sound"{_P=head;SoundId='rbxassetid://171794095';Volume=0.7;Looped=true}
  347.  
  348. sound=New"Sound"{_P=b_cent;SoundId='rbxassetid://399946420';Looped=true;Volume=.2;MaxDistance=30}
  349. -- music:Play()
  350.  
  351. prevt=tick()
  352. elaps=0
  353.  
  354. bpm=148
  355.  
  356. bps=bpm/60
  357.  
  358. -- movering({1,20},md'-90',1)
  359.  
  360. pcall(function()player.Backpack.control:Destroy()end)
  361. pcall(function()char.control:Destroy()end)
  362. local tool=New"Tool"{_P=player.Backpack;Name='control';RequiresHandle=false}
  363.  
  364. local laser_snd=New"Sound"{_P=mp;SoundId='rbxassetid://396350585';Looped=true;Volume=.4;Pitch=3}
  365.  
  366. -- Part(1,1,1)_1.Anchored=true _1.CFrame=C(torso,0,5,0)Mesh(_1,'rbxassetid://118262597')
  367. function lazer()
  368. changeFace'happy'
  369. holding=true
  370. local laz=Part(.1,.1,.1,'Cyan',.5)_1.Anchored=true _1.Material='Neon'Mesh(_1,'cyl')
  371. local laz2=New(laz){}
  372. local sparkpart=Part(.1,.1,.1,'',1)_1.Anchored=true
  373. New"ParticleEmitter"{_P=sparkpart;
  374. Color=ColorSequence.new(bcol'Cyan'.Color);
  375. Lifetime=NumberRange.new(.05,.1);
  376. Rate=100;
  377. Speed=NumberRange.new(70);
  378. LightEmission=1;
  379. VelocitySpread=180;
  380. Size=NumberSequence.new{numkp(0,4);numkp(1,0)};
  381. Transparency=NumberSequence.new{numkp(0,1);numkp(1,0)};
  382. }
  383. laser_snd:Play()
  384. mode='aim'
  385. while holding do
  386.  
  387. --eye effect
  388. Spawn(function()
  389. local ef=Part(1,1,1,'Cyan')
  390. local ef2=Part(1,1,1,'Cyan')
  391. local msh=Mesh(ef,'sph',.5,0,.5)ef.Material='Neon'
  392. local msh2=Mesh(ef2,'sph',.5,0,.5)ef2.Material='Neon'
  393. Weld(ef,eye,C(0,0,-.1)*ang(-PI/2),ang(mr(-1,1),mr(-1,1),mr(-1,1)))
  394. Weld(ef2,eye2,C(0,0,-.1)*ang(-PI/2),ang(mr(-1,1),mr(-1,1),mr(-1,1)))
  395.  
  396. local leng=mr(.25,1)
  397. for i=0,1,.25 do
  398. msh.Scale=v3n(.5*(1-i),leng*i,.5*(1-i))
  399. msh.Offset=v3n(0,i*leng/2,0)
  400. msh2.Scale=msh.Scale
  401. msh2.Offset=msh.Offset
  402. wait()
  403. end
  404. ef:Destroy()ef2:Destroy()
  405. end)
  406. local pos1,pos2=C(eye).p,C(eye2).p
  407. local pos3=pos1:lerp(pos2,.5)
  408. local epos=mouse.hit.p
  409. local mag,mag2=(pos1-epos).magnitude,(pos2-epos).magnitude
  410. sparkpart.CFrame=cfn(epos)
  411. laz.Size=v3n(.1,mag,.1)
  412. laz.CFrame=C(C(pos1,epos),0,0,-mag/2)*ang(PI/2)
  413. laz2.Size=v3n(.1,mag2,.1)
  414. laz2.CFrame=C(C(pos2,epos),0,0,-mag/2)*ang(PI/2)
  415. if laser_snd.TimePosition>1 then
  416. laser_snd.TimePosition=0
  417. end
  418.  
  419. local prev=nil
  420. --Sparks
  421. for i=0,1,.25 do
  422. local pos=pos3:lerp(epos,i)+v3n(mr(-2,2),mr(-2,2),mr(-2,2))
  423. if i==1 then
  424. pos=epos
  425. end
  426. local mag=(pos-(prev or pos1)).magnitude
  427. local l=Part(.1,.1,mag,'New Yeller',.75)_1.Anchored=true
  428. DEBRIS:AddItem(l,.01)
  429. l.CFrame=C(C(prev or pos3,pos),0,0,-mag/2)
  430. prev=pos
  431. end
  432. --do magic---
  433. if mouse.Target and (not mouse.Target:IsDescendantOf(char)) then
  434. local hum=mouse.Target.Parent:FindFirstChild"Humanoid"
  435. -- print(hum)
  436. if hum then
  437. if not hum:FindFirstChild'taggo'then
  438. local tag=New"Folder"{_P=hum;Name='taggo'}
  439. local invp=Part(1,1,1)
  440. local sm=Mesh(_1,'rbxassetid://118262597',13,10,13)
  441. _2.TextureId='rbxassetid://118262690'
  442. _1.Parent=tag
  443. local w=Weld(invp,hum.Parent.Head)
  444. Spawn(function()
  445. local ws=hum.WalkSpeed
  446. hum.WalkSpeed=0
  447. local b=false
  448. repeat
  449. b=not b
  450. if hum then hum:TakeDamage(.2) end
  451. sm.Scale=v3n(13,10,13)*(b and 1 or .9)
  452. wait()
  453. until tag.Parent==nil
  454. hum.WalkSpeed=ws
  455. end)
  456. DEBRIS:AddItem(tag,3)
  457. end
  458. end
  459. end
  460. wait()
  461. end
  462. laser_snd:Stop()
  463. mode='normal'
  464. laz:Destroy()laz2:Destroy()sparkpart:Destroy()
  465. changeFace'normal'
  466. end
  467. --
  468. local list={'happy','angry','xD','sad','bored','normal','heart'}
  469. local beatc=0
  470. mode='normal'
  471. -- music:Play()
  472.  
  473.  
  474. function isIn(what,tab) --returns true if what is in tab. isIn("Troll", {"Tomato", "Troll", "Strawberry") --> true
  475. local res=false
  476. for i,v in next,tab do
  477. if v==what then
  478. res = true
  479. break
  480. end
  481. end
  482. return res
  483. end
  484.  
  485. function findhums(pos2,r)
  486. pos = (typeof(pos2)=='CFrame'and pos2 or cfn(pos2))
  487. local c1,c2=pos*cfn(-r*5,0,-r*5),pos*cfn(r*5,0,r*5)
  488. local region=Region3.new(
  489. v3n(math.min(c1.X,c2.X),math.min(c1.Y,c2.Y),math.min(c1.Z,c2.Z)),
  490. v3n(math.max(c1.X,c2.X),math.max(c1.Y,c2.Y),math.max(c1.Z,c2.Z))
  491. )
  492. local parts = Workspace:FindPartsInRegion3(region,char)
  493. local pls={}
  494. for _,v in pairs(parts)do
  495. local hum=v.Parent:FindFirstChildOfClass"Humanoid"
  496. if hum and not isIn(hum,pls) then
  497. -- print(hum)
  498. local torso=hum.Torso
  499. if torso and (torso.Position-pos.p).magnitude<=r then
  500. pls[#pls+1]=hum
  501. end
  502. end
  503. end
  504. return pls
  505. end
  506.  
  507. function rest()
  508. Debounces.Updown=false
  509. Debounces.Motor=false
  510. b_m.MaxVelocity=0
  511. movering({1,20},-PI-PI/4,1)
  512. floatp=function()return C(torso,0,5):lerp(mp.CFrame,.4)end
  513. end
  514.  
  515.  
  516. tool.Deactivated:connect(function()holding=false end)
  517. tool.Activated:connect(lazer)
  518. tool.Unequipped:connect(function()holding=false end)
  519.  
  520. floatp=nil
  521.  
  522. while true do --Main Loop
  523. local _,t=wait()
  524. local mult=bps
  525. local delta=tick()-prevt
  526. elaps = elaps+delta
  527. beatc=beatc+1
  528. if elaps > 1/bps then
  529. -- changeFace(list[mr(#list)])
  530. elaps=elaps-1/bps
  531. end
  532.  
  533. --music
  534. local scale=4+((music.PlaybackLoudness/512)*5)
  535. bbg.Size=udim(scale,scale)
  536.  
  537. -- bp.position=C(start_cf,0,sine).p
  538. --Calcucate waves
  539. local sine=math.sin(t*mult)*2.5
  540. local n=sine-prev
  541.  
  542. local mousecf=C(C(mp).p,mouse.hit.p)
  543. local lookatcf = mode=='normal' and (C(torso)-C(torso).p) or (mousecf-mousecf.p)
  544.  
  545. start_cf=(C(cfn(C(torso).p+C(torso).lookVector*-6),0,15)*lookatcf):lerp(mp.CFrame,.5)
  546.  
  547. local si,co=math.sin(t*5),math.cos(t*5)
  548.  
  549. if Debounces.Float then --do the action
  550. if Debounces.Motor then
  551. b_m.MaxVelocity=(-1+math.sin(t*mult))*.1
  552. end
  553. local fl=nil
  554. if floatp then
  555. if typeof(floatp)=='function' then
  556. fl = floatp()
  557. else
  558. fl = floatp()
  559. end
  560. end
  561. mp.CFrame=(fl or C(start_cf,0,sine))
  562.  
  563. --Up and down movement
  564. if Debounces.Updown then
  565. if n>0 then
  566. if state=='up'then
  567. -- b_m.DesiredAngle=9e+009*-1
  568. down()
  569. state='down'
  570. end
  571. else
  572. if state=='down'then
  573. state='up'
  574. -- b_m.DesiredAngle=9e+009*1
  575. -- sound2:Play()
  576. up()
  577. end
  578. end
  579. end
  580. end
  581. sound.Pitch=.75+(mr(-1,1)*(mr()*.5))
  582. prev=sine
  583. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement