Dark_EccentricYT

Untitled

Oct 9th, 2017
1,937
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.34 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Character = Player.Character
  3. local Humanoid = Character.Humanoid
  4. Humanoid.MaxHealth = math.huge
  5. local Mouse = Player:GetMouse()
  6. local music = Instance.new("Sound", Player.Character.HumanoidRootPart)
  7. music.Looped = false
  8. music.Volume = 2
  9. music.Name = "music"
  10. music.MaxDistance = 50
  11. local music2 = Instance.new("Sound", Player.Character.HumanoidRootPart)
  12. music2.Volume = 0
  13. music2.Name = "analyzer"
  14. local miss = Instance.new("Sound", Player.Character.HumanoidRootPart)
  15. miss.Looped = false
  16. miss.Volume = 2.5
  17. miss.Name = "miss"
  18. miss.MaxDistance = 50
  19. miss.SoundId = "rbxassetid://367926738"
  20. local previd = "ID Here"
  21. local cannote = true
  22. local canv = true
  23. local createnotes = true
  24. local notes = {}
  25. local z = {}
  26. local x = {}
  27. local c = {}
  28. local vv = {}
  29. local b = {}
  30. local lastplayback = 0
  31. local difficulty = 1
  32.  
  33. o1 = Instance.new("Part")
  34. o2 = Instance.new("SurfaceGui")
  35. o3 = Instance.new("ImageLabel")
  36. o4 = Instance.new("TextLabel")
  37. o5 = Instance.new("TextLabel")
  38. o6 = Instance.new("TextLabel")
  39. o7 = Instance.new("Frame")
  40. o8 = Instance.new("TextBox")
  41. o9 = Instance.new("TextButton")
  42. o10 = Instance.new("TextLabel")
  43. o11 = Instance.new("TextLabel")
  44. o12 = Instance.new("TextLabel")
  45. o1.Name = "BasePart"
  46. o1.Material = Enum.Material.SmoothPlastic
  47. o1.BrickColor = BrickColor.new("Dark grey metallic")
  48. o1.Position = Vector3.new(72.2750092, 5.66000509, 11.1000004)
  49. o1.Anchored = true
  50. o1.CanCollide = false
  51. o1.Locked = true
  52. o1.Size = Vector3.new(10,10,0.05)
  53. o1.CFrame = CFrame.new(72.2750092, 5.66000509, 11.1000004, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  54. o1.Color = Color3.new(0.329412, 0.329412, 0.329412)
  55. o1.Position = Vector3.new(72.2750092, 5.66000509, 11.1000004)
  56. o1.Color = Color3.new(0.329412, 0.329412, 0.329412)
  57. o2.Name = "BeatMaster"
  58. o2.Parent = o1
  59. o2.CanvasSize = Vector2.new(1000,1000)
  60. o2.Adornee = o1
  61. o3.Name = "Back"
  62. o3.Parent = o2
  63. o3.Position = UDim2.new(0.34999999403954,0,0.30000001192093,0)
  64. o3.Size = UDim2.new(0.30000001192093,0,0.30000001192093,0)
  65. o3.Position = UDim2.new(0.34999999403954,0,0.30000001192093,0)
  66. o3.BackgroundColor3 = Color3.new(1, 1, 1)
  67. o3.BorderColor3 = Color3.new(0, 0, 0)
  68. o3.BorderSizePixel = 2
  69. o3.Image = "rbxassetid://473274964"
  70. o4.Name = "Z"
  71. o4.Parent = o3
  72. o4.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  73. o4.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
  74. o4.Text = "Z"
  75. o4.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  76. o4.Visible = false
  77. o4.BackgroundColor3 = Color3.new(1, 1, 1)
  78. o4.BackgroundTransparency = 1
  79. o4.BorderSizePixel = 0
  80. o4.ZIndex = 2
  81. o4.Font = Enum.Font.SourceSans
  82. o4.FontSize = Enum.FontSize.Size14
  83. o4.TextColor3 = Color3.new(1, 1, 1)
  84. o4.TextScaled = true
  85. o4.TextWrapped = true
  86. o5.Name = "X"
  87. o5.Parent = o3
  88. o5.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  89. o5.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
  90. o5.Text = "X"
  91. o5.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  92. o5.Visible = false
  93. o5.BackgroundColor3 = Color3.new(1, 1, 1)
  94. o5.BackgroundTransparency = 1
  95. o5.BorderSizePixel = 0
  96. o5.ZIndex = 2
  97. o5.Font = Enum.Font.SourceSans
  98. o5.FontSize = Enum.FontSize.Size14
  99. o5.TextColor3 = Color3.new(1, 1, 1)
  100. o5.TextScaled = true
  101. o5.TextWrapped = true
  102. o6.Name = "C"
  103. o6.Parent = o3
  104. o6.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  105. o6.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
  106. o6.Text = "C"
  107. o6.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  108. o6.Visible = false
  109. o6.BackgroundColor3 = Color3.new(1, 1, 1)
  110. o6.BackgroundTransparency = 1
  111. o6.BorderSizePixel = 0
  112. o6.ZIndex = 2
  113. o6.Font = Enum.Font.SourceSans
  114. o6.FontSize = Enum.FontSize.Size14
  115. o6.TextColor3 = Color3.new(1, 1, 1)
  116. o6.TextScaled = true
  117. o6.TextWrapped = true
  118. o7.Name = "Middle"
  119. o7.Parent = o3
  120. o7.Position = UDim2.new(0.425,0,0.425,0)
  121. o7.Size = UDim2.new(0.15,0,0.18,0)
  122. o7.BackgroundColor3 = Color3.new(0, 0, 0)
  123. o7.BorderColor3 = Color3.new(0.152941, 0.152941, 0.152941)
  124. o7.BorderSizePixel = 10
  125. o8.Name = "Song"
  126. o8.Parent = o3
  127. o8.Position = UDim2.new(0,0,1.0499999523163,0)
  128. o8.Size = UDim2.new(1,0,0.10000000149012,0)
  129. o8.Text = "ID"
  130. o8.Position = UDim2.new(0,0,1.0499999523163,0)
  131. o8.BackgroundColor3 = Color3.new(0, 0, 0)
  132. o8.BorderColor3 = Color3.new(0.0823529, 0.0823529, 0.0823529)
  133. o8.BorderSizePixel = 2
  134. o8.Font = Enum.Font.SourceSans
  135. o8.FontSize = Enum.FontSize.Size14
  136. o8.TextColor3 = Color3.new(1, 1, 1)
  137. o8.TextScaled = true
  138. o8.TextStrokeColor3 = Color3.new(0, 0, 0.470588)
  139. o8.TextStrokeTransparency = 0
  140. o8.TextWrapped = true
  141. o9.Name = "Difficulty"
  142. o9.Parent = o3
  143. o9.Position = UDim2.new(0,0,1.1749999523163,0)
  144. o9.Size = UDim2.new(1,0,0.10000000149012,0)
  145. o9.Text = "Easy"
  146. o9.Position = UDim2.new(0,0,1.1749999523163,0)
  147. o9.BackgroundColor3 = Color3.new(0, 0, 0)
  148. o9.BorderColor3 = Color3.new(0.0823529, 0.0823529, 0.0823529)
  149. o9.BorderSizePixel = 2
  150. o9.Font = Enum.Font.SourceSans
  151. o9.FontSize = Enum.FontSize.Size14
  152. o9.TextColor3 = Color3.new(0.333333, 1, 1)
  153. o9.TextScaled = true
  154. o9.TextWrapped = true
  155. o10.Name = "Combo"
  156. o10.Parent = o3
  157. o10.Position = UDim2.new(0.30000001192093,0,0.55000001192093,0)
  158. o10.Size = UDim2.new(0.40000000596046,0,0.5,0)
  159. o10.Text = "0x"
  160. o10.Position = UDim2.new(0.30000001192093,0,0.55000001192093,0)
  161. o10.BackgroundColor3 = Color3.new(1, 1, 1)
  162. o10.BackgroundTransparency = 1
  163. o10.BorderSizePixel = 0
  164. o10.Font = Enum.Font.SourceSans
  165. o10.FontSize = Enum.FontSize.Size96
  166. o10.TextColor3 = Color3.new(0.611765, 0.996078, 1)
  167. o10.TextScaled = true
  168. o10.TextWrapped = true
  169. o11.Name = "Title"
  170. o11.Parent = o2
  171. o11.Position = UDim2.new(0,0,0.75,0)
  172. o11.Size = UDim2.new(1,0,0.10000000149012,0)
  173. o11.Text = "Beat Master"
  174. o11.Position = UDim2.new(0,0,0.75,0)
  175. o11.BackgroundColor3 = Color3.new(1, 1, 1)
  176. o11.BackgroundTransparency = 1
  177. o11.BorderSizePixel = 0
  178. o11.Font = Enum.Font.Fantasy
  179. o11.FontSize = Enum.FontSize.Size14
  180. o11.TextColor3 = Color3.new(1, 1, 1)
  181. o11.TextScaled = true
  182. o11.TextWrapped = true
  183. o12.Name = "Author"
  184. o12.Parent = o2
  185. o12.Position = UDim2.new(0.25,0,0.85000002384186,0)
  186. o12.Size = UDim2.new(0.5,0,0.050000000745058,0)
  187. o12.Text = "MlgArcOfOz"
  188. o12.Position = UDim2.new(0.25,0,0.85000002384186,0)
  189. o12.BackgroundColor3 = Color3.new(1, 1, 1)
  190. o12.BackgroundTransparency = 1
  191. o12.BorderSizePixel = 0
  192. o12.Font = Enum.Font.Code
  193. o12.FontSize = Enum.FontSize.Size14
  194. o12.TextColor3 = Color3.new(1, 1, 1)
  195. o12.TextScaled = true
  196. o12.TextWrapped = true
  197. o13 = Instance.new("TextLabel")
  198. o13.Name = "Score"
  199. o13.Parent = o2
  200. o13.Position = UDim2.new(0.025,0,0.925,0)
  201. o13.Size = UDim2.new(0.3,0,0.05,0)
  202. o13.Text = "Score: 0"
  203. o13.BackgroundColor3 = Color3.new(1,1,1)
  204. o13.BackgroundTransparency = 1
  205. o13.BorderSizePixel = 0
  206. o13.Font = Enum.Font.Code
  207. o13.FontSize = Enum.FontSize.Size14
  208. o13.TextColor3 = Color3.new(1,1,1)
  209. o13.TextScaled = true
  210. o13.TextWrapped = true
  211. o14 = Instance.new("TextLabel")
  212. o14.Name = "NotesHit"
  213. o14.Parent = o2
  214. o14.Position = UDim2.new(0.65,0,0.925,0)
  215. o14.Size = UDim2.new(0.32,0,0.05,0)
  216. o14.Text = "Notes Hit: 0%"
  217. o14.BackgroundColor3 = Color3.new(1, 1, 1)
  218. o14.BackgroundTransparency = 1
  219. o14.BorderSizePixel = 0
  220. o14.Font = Enum.Font.Code
  221. o14.FontSize = Enum.FontSize.Size14
  222. o14.TextColor3 = Color3.new(1, 1, 1)
  223. o14.TextScaled = true
  224. o14.TextWrapped = true
  225. o15 = Instance.new("TextLabel")
  226. o15.Name = "V"
  227. o15.Parent = o3
  228. o15.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  229. o15.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
  230. o15.Text = "V"
  231. o15.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  232. o15.Visible = false
  233. o15.BackgroundColor3 = Color3.new(1, 1, 1)
  234. o15.BackgroundTransparency = 1
  235. o15.BorderSizePixel = 0
  236. o15.ZIndex = 2
  237. o15.Font = Enum.Font.SourceSans
  238. o15.FontSize = Enum.FontSize.Size14
  239. o15.TextColor3 = Color3.new(1, 1, 1)
  240. o15.TextScaled = true
  241. o15.TextWrapped = true
  242. o16 = Instance.new("TextLabel")
  243. o16.Name = "B"
  244. o16.Parent = o2
  245. o16.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  246. o16.Size = UDim2.new(0.20000000298023,0,0.20000000298023,0)
  247. o16.Text = "B"
  248. o16.Position = UDim2.new(0.40000000596046,0,0.40000000596046,0)
  249. o16.Visible = false
  250. o16.BackgroundColor3 = Color3.new(1, 1, 1)
  251. o16.BackgroundTransparency = 1
  252. o16.BorderSizePixel = 0
  253. o16.ZIndex = 2
  254. o16.Font = Enum.Font.SourceSans
  255. o16.FontSize = Enum.FontSize.Size14
  256. o16.TextColor3 = Color3.new(1, 1, 1)
  257. o16.TextScaled = true
  258. o16.TextWrapped = true
  259.  
  260. local inputbase = Instance.new("ScreenGui",Player.PlayerGui)
  261. inputbase.Name = "inputbase"
  262. local inputbox = Instance.new("TextBox",inputbase)
  263. inputbox.Name = "inputbox"
  264. inputbox.Size = UDim2.new(0.025,0,0.05,0)
  265. inputbox.Position = UDim2.new(0.493,0,0.8,0)
  266. inputbox.BackgroundColor3 = Color3.new(0,0,0)
  267. inputbox.BorderSizePixel = 0
  268. inputbox.Text = "ID"
  269. inputbox.TextScaled = true
  270. inputbox.TextWrapped = true
  271. inputbox.TextColor3 = Color3.new(0,0,0)
  272. inputbox.TextTransparency = 1
  273.  
  274. local partbase = o1
  275. partbase.Parent = Character
  276. local idbox = o8
  277. local zkey = o4
  278. local xkey = o5
  279. local ckey = o6
  280. local vkey = o15
  281. local bkey = o16
  282. local middle = o7
  283. local back = o3
  284. local difficulty = o9
  285. local difficultynum = 1
  286. local combo = o10
  287. local combonum = 0
  288. local rotdirec = 0
  289. local scorebox = o13
  290. local score = 0
  291. local totalnotes = 0
  292. local noteshit = 0
  293. local percentagebox = o14
  294.  
  295. game:GetService("RunService").Stepped:connect(function()
  296. if not music.IsPlaying and not music2.IsPlaying then
  297. idbox.Text = inputbox.Text
  298. music.SoundId = "rbxassetid://"..idbox.Text
  299. music2.SoundId = "rbxassetid://"..idbox.Text
  300. end
  301. combo.Text = combonum.."x"
  302. scorebox.Text = "Score: "..score
  303. if totalnotes > 0 then
  304. percentagebox.Text = "Notes Hit: "..math.floor((noteshit/totalnotes)*100).."%"
  305. end
  306.  
  307. partbase.CFrame = partbase.CFrame:lerp(Character.HumanoidRootPart.CFrame*CFrame.new(0,2,-3),math.sin(math.rad(90)))
  308.  
  309. if music.IsPlaying then
  310.  
  311. if combonum <= 30 then
  312.  
  313. combo.TextColor3 = Color3.new(0.6,1,1)
  314. if rotdirec == 0 then
  315. if combo.Rotation <= 25 then
  316. combo.Rotation = combo.Rotation + 0.7
  317. else
  318. rotdirec = 1
  319. end
  320. else
  321. if combo.Rotation >= -25 then
  322. combo.Rotation = combo.Rotation - 0.7
  323. else
  324. rotdirec = 0
  325. end
  326. end
  327.  
  328. elseif combonum > 30 and combonum <= 70 then
  329.  
  330. combo.TextColor3 = Color3.new(0.2,1,0.8)
  331. if rotdirec == 0 then
  332. if combo.Rotation <= 28 then
  333. combo.Rotation = combo.Rotation + 0.85
  334. else
  335. rotdirec = 1
  336. end
  337. else
  338. if combo.Rotation >= -28 then
  339. combo.Rotation = combo.Rotation - 0.85
  340. else
  341. rotdirec = 0
  342. end
  343. end
  344.  
  345. elseif combonum > 70 and combonum <= 100 then
  346.  
  347. combo.TextColor3 = Color3.new(0.9,1,0.4)
  348. if rotdirec == 0 then
  349. if combo.Rotation <= 32 then
  350. combo.Rotation = combo.Rotation + 0.95
  351. else
  352. rotdirec = 1
  353. end
  354. else
  355. if combo.Rotation >= -32 then
  356. combo.Rotation = combo.Rotation - 0.95
  357. else
  358. rotdirec = 0
  359. end
  360. end
  361.  
  362. elseif combonum > 100 and combonum <= 150 then
  363.  
  364. combo.TextColor3 = Color3.new(1,1,0)
  365. if rotdirec == 0 then
  366. if combo.Rotation <= 35 then
  367. combo.Rotation = combo.Rotation + 1.15
  368. else
  369. rotdirec = 1
  370. end
  371. else
  372. if combo.Rotation >= -35 then
  373. combo.Rotation = combo.Rotation - 1.15
  374. else
  375. rotdirec = 0
  376. end
  377. end
  378.  
  379. elseif combonum > 150 and combonum <= 200 then
  380.  
  381. combo.TextColor3 = Color3.new(1,0.5,0)
  382. if rotdirec == 0 then
  383. if combo.Rotation <= 35 then
  384. combo.Rotation = combo.Rotation + 1.45
  385. else
  386. rotdirec = 1
  387. end
  388. else
  389. if combo.Rotation >= -35 then
  390. combo.Rotation = combo.Rotation - 1.45
  391. else
  392. rotdirec = 0
  393. end
  394. end
  395.  
  396. elseif combonum > 200 and combonum <= 250 then
  397.  
  398. combo.TextColor3 = Color3.new(1,0,0)
  399. if rotdirec == 0 then
  400. if combo.Rotation <= 35 then
  401. combo.Rotation = combo.Rotation + 1.45
  402. else
  403. rotdirec = 1
  404. end
  405. else
  406. if combo.Rotation >= -35 then
  407. combo.Rotation = combo.Rotation - 1.45
  408. else
  409. rotdirec = 0
  410. end
  411. end
  412.  
  413. elseif combonum > 250 and combonum <= 300 then
  414.  
  415. combo.TextColor3 = Color3.new(0.5,0,1)
  416. if rotdirec == 0 then
  417. if combo.Rotation <= 25 then
  418. combo.Rotation = combo.Rotation + 1.85
  419. else
  420. rotdirec = 1
  421. end
  422. else
  423. if combo.Rotation >= -25 then
  424. combo.Rotation = combo.Rotation - 1.85
  425. else
  426. rotdirec = 0
  427. end
  428. end
  429.  
  430. elseif combonum > 300 then
  431.  
  432. combo.TextColor3 = Color3.new(1,0,1)
  433. if rotdirec == 0 then
  434. if combo.Rotation <= 15 then
  435. combo.Rotation = combo.Rotation + 2
  436. else
  437. rotdirec = 1
  438. end
  439. else
  440. if combo.Rotation >= -15 then
  441. combo.Rotation = combo.Rotation - 2
  442. else
  443. rotdirec = 0
  444. end
  445. end
  446.  
  447. end
  448.  
  449. else
  450. combo.Rotation = 0
  451. end
  452.  
  453. if music2.IsPlaying and createnotes then
  454.  
  455. if lastplayback == 0 and music2.PlaybackLoudness > 0 then
  456. lastplayback = music2.PlaybackLoudness
  457. end
  458.  
  459. local base = 80
  460.  
  461. if difficulty.Text == "Hard" or difficulty.Text == "Expert" then
  462. base = 40
  463. end
  464.  
  465. if music2.PlaybackLoudness > 0 and math.abs((lastplayback - music2.PlaybackLoudness)) >= base/difficultynum then
  466.  
  467. local prevplayback = lastplayback
  468. lastplayback = music2.PlaybackLoudness
  469. local louddiff = math.abs((prevplayback - lastplayback))
  470.  
  471. local decider;
  472. if difficulty.Text == "Expert" and louddiff >= 200/difficultynum then
  473. decider = 5
  474. elseif (difficulty.Text == "Hard" or difficulty.Text == "Expert") and louddiff >= 40/difficultynum and louddiff < 80/difficultynum then
  475. decider = 4
  476. elseif louddiff >= 80/difficultynum and louddiff < 100/difficultynum then
  477. decider = 1
  478. elseif louddiff >= 100/difficultynum and louddiff < 150/difficultynum then
  479. decider = 2
  480. elseif louddiff >= 150/difficultynum then
  481. if difficulty.Text ~= "Expert" then
  482. decider = 3
  483. elseif louddiff < 200 then
  484. decider = 3
  485. end
  486. end
  487.  
  488. if decider ~= 4 then
  489. if cannote then
  490. cannote = false
  491. local waiter = coroutine.wrap(function()
  492. wait(0.3)
  493. cannote = true
  494. end)
  495. waiter()
  496. if decider == 1 then
  497. local clone = zkey:Clone()
  498. clone.Parent = back
  499. clone.Visible = true
  500. clone.Name = "z"..#notes
  501. clone.Position = UDim2.new((0.4-music2.TimePosition*difficultynum),0,0.4,0)
  502. local correct = Instance.new("BoolValue", clone)
  503. correct.Name = "correct"
  504. correct.Value = false
  505. local timepos = Instance.new("NumberValue", clone)
  506. timepos.Name = "timepos"
  507. timepos.Value = music2.TimePosition
  508. local move = Instance.new("BoolValue", clone)
  509. move.Name = "move"
  510. move.Value = true
  511. table.insert(notes,clone)
  512. elseif decider == 2 then
  513. local clone = xkey:Clone()
  514. clone.Parent = back
  515. clone.Visible = true
  516. clone.Name = "x"..#notes
  517. clone.Position = UDim2.new(0.4,0,(0.4-music2.TimePosition),0)
  518. local correct = Instance.new("BoolValue", clone)
  519. correct.Name = "correct"
  520. correct.Value = false
  521. local timepos = Instance.new("NumberValue", clone)
  522. timepos.Name = "timepos"
  523. timepos.Value = music2.TimePosition
  524. local move = Instance.new("BoolValue", clone)
  525. move.Name = "move"
  526. move.Value = true
  527. table.insert(notes,clone)
  528. elseif decider == 5 then
  529. local clone = bkey:Clone()
  530. clone.Parent = back
  531. clone.Visible = true
  532. clone.Name = "b"..#notes
  533. clone.Position = UDim2.new(0.4,0,(0.4-music2.TimePosition),0)
  534. local correct = Instance.new("BoolValue", clone)
  535. correct.Name = "correct"
  536. correct.Value = false
  537. local timepos = Instance.new("NumberValue", clone)
  538. timepos.Name = "timepos"
  539. timepos.Value = music2.TimePosition
  540. local move = Instance.new("BoolValue", clone)
  541. move.Name = "move"
  542. move.Value = true
  543. table.insert(notes,clone)
  544. elseif decider == 3 then
  545. local clone = ckey:Clone()
  546. clone.Parent = back
  547. clone.Visible = true
  548. clone.Name = "c"..#notes
  549. clone.Position = UDim2.new((0.4+music2.TimePosition),0,0.4,0)
  550. local correct = Instance.new("BoolValue", clone)
  551. correct.Name = "correct"
  552. correct.Value = false
  553. local move = Instance.new("BoolValue", clone)
  554. move.Name = "move"
  555. move.Value = true
  556. local timepos = Instance.new("NumberValue", clone)
  557. timepos.Name = "timepos"
  558. timepos.Value = music2.TimePosition
  559. table.insert(notes,clone)
  560. end
  561. end
  562. elseif cannote and canv then
  563. canv = false
  564. cannote = false
  565. local waiter = coroutine.wrap(function()
  566. wait(0.3)
  567. cannote = true
  568. wait(1.5)
  569. canv = true
  570. end)
  571. waiter()
  572. local clone = vkey:Clone()
  573. clone.Parent = back
  574. clone.Visible = true
  575. clone.Name = "v"..#notes
  576. clone.Position = UDim2.new((0.4-music2.TimePosition*difficultynum),0,(0.4-music2.TimePosition),0)
  577. local correct = Instance.new("BoolValue", clone)
  578. correct.Name = "correct"
  579. correct.Value = false
  580. local timepos = Instance.new("NumberValue", clone)
  581. timepos.Name = "timepos"
  582. timepos.Value = music2.TimePosition
  583. local move = Instance.new("BoolValue", clone)
  584. move.Name = "move"
  585. move.Value = true
  586. table.insert(notes,clone)
  587. end
  588.  
  589. end
  590.  
  591. end
  592.  
  593. if music.IsPlaying then
  594.  
  595. for l,v in pairs (notes) do
  596. if v:FindFirstChild("move") then
  597. local letter = string.sub(v.Name,1,1)
  598. local num = string.sub(v.Name,2,string.len(v.Name))
  599. if v:FindFirstChild("move").Value == true then
  600. if letter == "z" then
  601. v.Position = UDim2.new(0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4,0)
  602. elseif letter == "x" then
  603. v.Position = UDim2.new(0.4,0,0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0)
  604. elseif letter == "c" then
  605. v.Position = UDim2.new(0.4+(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4,0)
  606. elseif letter == "v" then
  607. v.Position = UDim2.new(0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0)
  608. elseif letter == "b" then
  609. v.Position = UDim2.new(0.4+(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0,0.4-(v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum),0)
  610. end
  611. end
  612. if v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum <= 0.1 and v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum >= -0.1 then
  613. if letter == "z" then
  614. table.insert(z,v)
  615. elseif letter == "x" then
  616. table.insert(x,v)
  617. elseif letter == "c" then
  618. table.insert(c,v)
  619. elseif letter == "v" then
  620. table.insert(vv,v)
  621. elseif letter == "b" then
  622. table.insert(b,v)
  623. end
  624. elseif v:FindFirstChild("timepos").Value*difficultynum-music.TimePosition*difficultynum < -0.1 and v:FindFirstChild("correct").Value == false and v:FindFirstChild("move").Value == true then
  625. v:FindFirstChild("move").Value = false
  626. music.Volume = 0
  627. miss:Play()
  628. totalnotes = totalnotes + 1
  629. combonum = 0
  630. if letter == "z" then
  631. for i,p in pairs (z) do
  632. local pnum = string.sub(p.Name,2,string.len(p.Name))
  633. if pnum == num then
  634. p.TextColor3 = Color3.new(1,0,0)
  635. table.remove(z,i)
  636. local flasher = coroutine.wrap(function()
  637. for i=1, 10 do
  638. p.TextTransparency = i/10
  639. wait(0.01)
  640. end
  641. p:Remove()
  642. end)
  643. flasher()
  644. end
  645. end
  646. elseif letter == "x" then
  647. for i,p in pairs (x) do
  648. local pnum = string.sub(p.Name,2,string.len(p.Name))
  649. if pnum == num then
  650. p.TextColor3 = Color3.new(1,0,0)
  651. table.remove(x,i)
  652. local flasher = coroutine.wrap(function()
  653. for i=1, 10 do
  654. p.TextTransparency = i/10
  655. wait(0.01)
  656. end
  657. p:Remove()
  658. end)
  659. flasher()
  660. end
  661. end
  662. elseif letter == "b" then
  663. for i,p in pairs (b) do
  664. local pnum = string.sub(p.Name,2,string.len(p.Name))
  665. if pnum == num then
  666. p.TextColor3 = Color3.new(1,0,0)
  667. table.remove(b,i)
  668. local flasher = coroutine.wrap(function()
  669. for i=1, 10 do
  670. p.TextTransparency = i/10
  671. wait(0.01)
  672. end
  673. p:Remove()
  674. end)
  675. flasher()
  676. end
  677. end
  678. elseif letter == "v" then
  679. for i,p in pairs (vv) do
  680. local pnum = string.sub(p.Name,2,string.len(p.Name))
  681. if pnum == num then
  682. p.TextColor3 = Color3.new(1,0,0)
  683. table.remove(vv,i)
  684. local flasher = coroutine.wrap(function()
  685. for i=1, 10 do
  686. p.TextTransparency = i/10
  687. wait(0.01)
  688. end
  689. p:Remove()
  690. end)
  691. flasher()
  692. end
  693. end
  694. elseif letter == "c" then
  695. for i,p in pairs (c) do
  696. local pnum = string.sub(p.Name,2,string.len(p.Name))
  697. if pnum == num then
  698. p.TextColor3 = Color3.new(1,0,0)
  699. table.remove(c,i)
  700. local flasher = coroutine.wrap(function()
  701. for i=1, 10 do
  702. p.TextTransparency = i/10
  703. wait(0.01)
  704. end
  705. p:Remove()
  706. end)
  707. flasher()
  708. end
  709. end
  710. end
  711. end
  712. else
  713. table.remove(notes,l)
  714. end
  715. end
  716.  
  717. end
  718.  
  719. end)
  720.  
  721. music.Ended:connect(function()
  722. idbox.Text = "ID"
  723. lastplayback = 0
  724. for i=1, #notes do
  725. if notes[1]:FindFirstChild("move") then
  726. notes[1]:Remove()
  727. table.remove(notes,1)
  728. end
  729. end
  730. notes = {}
  731. idbox.TextColor3 = Color3.new(1,1,1)
  732. end)
  733.  
  734. Mouse.KeyDown:connect(function(key)
  735. if key == "z" and music.IsPlaying then
  736. local success = false
  737. if #z > 0 then
  738. for i,v in pairs (z) do
  739. if v:FindFirstChild("move") then
  740. if v:FindFirstChild("move").Value == true then
  741. v:FindFirstChild("correct").Value = true
  742. v:FindFirstChild("move").Value = false
  743. success = true
  744. v.TextColor3 = Color3.new(0,1,0)
  745. v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
  746. table.remove(z,i)
  747. local randirec = math.random(1,2)
  748. local flasher = coroutine.wrap(function()
  749. for i=1, 10 do
  750. v.TextTransparency = i/10
  751. if randirec == 1 then
  752. v.Rotation = v.Rotation + 2
  753. else
  754. v.Rotation = v.Rotation - 2
  755. end
  756. wait(0.01)
  757. end
  758. v:Remove()
  759. end)
  760. flasher()
  761. end
  762. end
  763. end
  764. end
  765. if success then
  766. music.Volume = 2
  767. combonum = combonum + 1
  768. totalnotes = totalnotes + 1
  769. noteshit = noteshit + 1
  770. score = math.floor(score + (100*difficultynum) + (combonum/2))
  771. combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
  772. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  773. local tweenback = coroutine.wrap(function()
  774. wait(0.1)
  775. combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
  776. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  777. end)
  778. tweenback()
  779. else
  780. music.Volume = 0
  781. combonum = 0
  782. totalnotes = totalnotes + 1
  783. miss:Play()
  784. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  785. local tweenback2 = coroutine.wrap(function()
  786. wait(0.1)
  787. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  788. end)
  789. tweenback2()
  790. local misser = coroutine.wrap(function()
  791. middle.BackgroundColor3 = Color3.new(1,0,0)
  792. for i=1, 5 do
  793. middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
  794. wait()
  795. end
  796. end)
  797. misser()
  798. end
  799. elseif key == "x" and music.IsPlaying then
  800. local success = false
  801. if #x > 0 then
  802. for i,v in pairs (x) do
  803. if v:FindFirstChild("move") then
  804. if v:FindFirstChild("move").Value == true then
  805. v:FindFirstChild("correct").Value = true
  806. v:FindFirstChild("move").Value = false
  807. success = true
  808. v.TextColor3 = Color3.new(0,1,0)
  809. v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
  810. table.remove(x,i)
  811. local randirec = math.random(1,2)
  812. local flasher = coroutine.wrap(function()
  813. for i=1, 10 do
  814. v.TextTransparency = i/10
  815. if randirec == 1 then
  816. v.Rotation = v.Rotation + 2
  817. else
  818. v.Rotation = v.Rotation - 2
  819. end
  820. wait(0.01)
  821. end
  822. v:Remove()
  823. end)
  824. flasher()
  825. end
  826. end
  827. end
  828. end
  829. if success then
  830. music.Volume = 2
  831. combonum = combonum + 1
  832. totalnotes = totalnotes + 1
  833. noteshit = noteshit + 1
  834. score = math.floor(score + (100*difficultynum) + (combonum/2))
  835. combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
  836. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  837. local tweenback = coroutine.wrap(function()
  838. wait(0.1)
  839. combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
  840. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  841. end)
  842. tweenback()
  843. else
  844. music.Volume = 0
  845. combonum = 0
  846. miss:Play()
  847. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  848. local tweenback2 = coroutine.wrap(function()
  849. wait(0.1)
  850. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  851. end)
  852. tweenback2()
  853. totalnotes = totalnotes + 1
  854. local misser = coroutine.wrap(function()
  855. middle.BackgroundColor3 = Color3.new(1,0,0)
  856. for i=1, 5 do
  857. middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
  858. wait()
  859. end
  860. end)
  861. misser()
  862. end
  863. elseif key == "b" and music.IsPlaying then
  864. local success = false
  865. if #b > 0 then
  866. for i,v in pairs (b) do
  867. if v:FindFirstChild("move") then
  868. if v:FindFirstChild("move").Value == true then
  869. v:FindFirstChild("correct").Value = true
  870. v:FindFirstChild("move").Value = false
  871. success = true
  872. v.TextColor3 = Color3.new(0,1,0)
  873. v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
  874. table.remove(b,i)
  875. local randirec = math.random(1,2)
  876. local flasher = coroutine.wrap(function()
  877. for i=1, 10 do
  878. v.TextTransparency = i/10
  879. if randirec == 1 then
  880. v.Rotation = v.Rotation + 2
  881. else
  882. v.Rotation = v.Rotation - 2
  883. end
  884. wait(0.01)
  885. end
  886. v:Remove()
  887. end)
  888. flasher()
  889. end
  890. end
  891. end
  892. end
  893. if success then
  894. music.Volume = 2
  895. combonum = combonum + 1
  896. totalnotes = totalnotes + 1
  897. noteshit = noteshit + 1
  898. score = math.floor(score + (100*difficultynum) + (combonum/2))
  899. combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
  900. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  901. local tweenback = coroutine.wrap(function()
  902. wait(0.1)
  903. combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
  904. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  905. end)
  906. tweenback()
  907. else
  908. music.Volume = 0
  909. combonum = 0
  910. miss:Play()
  911. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  912. local tweenback2 = coroutine.wrap(function()
  913. wait(0.1)
  914. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  915. end)
  916. tweenback2()
  917. totalnotes = totalnotes + 1
  918. local misser = coroutine.wrap(function()
  919. middle.BackgroundColor3 = Color3.new(1,0,0)
  920. for i=1, 5 do
  921. middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
  922. wait()
  923. end
  924. end)
  925. misser()
  926. end
  927. elseif key == "v" and music.IsPlaying then
  928. local success = false
  929. if #vv > 0 then
  930. for i,p in pairs (vv) do
  931. if p:FindFirstChild("move") then
  932. if p:FindFirstChild("move").Value == true then
  933. p:FindFirstChild("correct").Value = true
  934. p:FindFirstChild("move").Value = false
  935. success = true
  936. p.TextColor3 = Color3.new(0,1,0)
  937. p:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
  938. table.remove(vv,i)
  939. local randirec = math.random(1,2)
  940. local flasher = coroutine.wrap(function()
  941. for i=1, 10 do
  942. p.TextTransparency = i/10
  943. if randirec == 1 then
  944. p.Rotation = p.Rotation + 2
  945. else
  946. p.Rotation = p.Rotation - 2
  947. end
  948. wait(0.01)
  949. end
  950. p:Remove()
  951. end)
  952. flasher()
  953. end
  954. end
  955. end
  956. end
  957. if success then
  958. music.Volume = 2
  959. combonum = combonum + 1
  960. totalnotes = totalnotes + 1
  961. noteshit = noteshit + 1
  962. score = math.floor(score + (100*difficultynum) + (combonum/2))
  963. combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
  964. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  965. local tweenback = coroutine.wrap(function()
  966. wait(0.1)
  967. combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
  968. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  969. end)
  970. tweenback()
  971. else
  972. music.Volume = 0
  973. combonum = 0
  974. miss:Play()
  975. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  976. local tweenback2 = coroutine.wrap(function()
  977. wait(0.1)
  978. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  979. end)
  980. tweenback2()
  981. totalnotes = totalnotes + 1
  982. local misser = coroutine.wrap(function()
  983. middle.BackgroundColor3 = Color3.new(1,0,0)
  984. for i=1, 5 do
  985. middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
  986. wait()
  987. end
  988. end)
  989. misser()
  990. end
  991. elseif key == "c" and music.IsPlaying then
  992. local success = false
  993. if #c > 0 then
  994. for i,v in pairs (c) do
  995. if v:FindFirstChild("move") then
  996. if v:FindFirstChild("move").Value == true then
  997. v:FindFirstChild("correct").Value = true
  998. v:FindFirstChild("move").Value = false
  999. success = true
  1000. v.TextColor3 = Color3.new(0,1,0)
  1001. v:TweenSizeAndPosition(UDim2.new(0.01,0,0.01,0),UDim2.new(0.5,0,0.5,0),1,1,0.5)
  1002. table.remove(c,i)
  1003. local randirec = math.random(1,2)
  1004. local flasher = coroutine.wrap(function()
  1005. for i=1, 10 do
  1006. v.TextTransparency = i/10
  1007. if randirec == 1 then
  1008. v.Rotation = v.Rotation + 2
  1009. else
  1010. v.Rotation = v.Rotation - 2
  1011. end
  1012. wait(0.01)
  1013. end
  1014. v:Remove()
  1015. end)
  1016. flasher()
  1017. end
  1018. end
  1019. end
  1020. end
  1021. if success then
  1022. music.Volume = 2
  1023. combonum = combonum + 1
  1024. totalnotes = totalnotes + 1
  1025. noteshit = noteshit + 1
  1026. score = math.floor(score + (100*difficultynum) + (combonum/2))
  1027. combo:TweenSizeAndPosition(UDim2.new(0.2,0,0.25,0),UDim2.new(0.4,0,0.65,0),1,1,0.1,true)
  1028. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  1029. local tweenback = coroutine.wrap(function()
  1030. wait(0.1)
  1031. combo:TweenSizeAndPosition(UDim2.new(0.4,0,0.5,0),UDim2.new(0.3,0,0.55,0),1,1,0.1,false)
  1032. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  1033. end)
  1034. tweenback()
  1035. else
  1036. music.Volume = 0
  1037. combonum = 0
  1038. miss:Play()
  1039. middle:TweenSizeAndPosition(UDim2.new(0.25,0,0.28,0),UDim2.new(0.375,0,0.35,0),1,1,0.1,true)
  1040. local tweenback2 = coroutine.wrap(function()
  1041. wait(0.1)
  1042. middle:TweenSizeAndPosition(UDim2.new(0.15,0,0.18,0),UDim2.new(0.425,0,0.425,0),1,1,0.1,false)
  1043. end)
  1044. tweenback2()
  1045. totalnotes = totalnotes + 1
  1046. local misser = coroutine.wrap(function()
  1047. middle.BackgroundColor3 = Color3.new(1,0,0)
  1048. for i=1, 5 do
  1049. middle.BackgroundColor3 = Color3.new(1-i/5,0,0)
  1050. wait()
  1051. end
  1052. end)
  1053. misser()
  1054. end
  1055. elseif key == "e" then
  1056. if music.IsPlaying then
  1057. music:Stop()
  1058. music2:Stop()
  1059. idbox.Text = "ID"
  1060. lastplayback = 0
  1061. for i=1, #notes do
  1062. if notes[1]:FindFirstChild("move") then
  1063. notes[1]:Remove()
  1064. table.remove(notes,1)
  1065. end
  1066. end
  1067. notes = {}
  1068. idbox.TextColor3 = Color3.new(1,1,1)
  1069. elseif idbox.Text ~= "ID" and not music.IsPlaying and not music2.IsPlaying then
  1070. music2:Play()
  1071. score = 0
  1072. percentagebox.Text = "Notes Hit: 0%"
  1073. noteshit = 0
  1074. totalnotes = 0
  1075. combonum = 0
  1076. combo.TextColor3 = Color3.new(0.6,1,1)
  1077. idbox.TextColor3 = Color3.new(1,0.5,0)
  1078. createnotes = false
  1079. wait(3)
  1080. createnotes = true
  1081. wait(2)
  1082. idbox.TextColor3 = Color3.new(0,1,0)
  1083. idbox.Text = game:GetService("MarketplaceService"):GetProductInfo(tonumber(idbox.Text),0).Name
  1084. music:Play()
  1085. end
  1086. elseif key == "q" then
  1087. if not music2.IsPlaying and not music.IsPlaying then
  1088. if difficulty.Text == "Super Easy" then
  1089. difficulty.Text = "Easy"
  1090. difficulty.TextColor3 = Color3.new(0,1,1)
  1091. difficultynum = 1
  1092. elseif difficulty.Text == "Easy" then
  1093. difficulty.Text = "Medium"
  1094. difficulty.TextColor3 = Color3.new(1,1,0)
  1095. difficultynum = 1.35
  1096. elseif difficulty.Text == "Medium" then
  1097. difficulty.Text = "Hard"
  1098. difficulty.TextColor3 = Color3.new(1,0.5,0)
  1099. difficultynum = 1.75
  1100. elseif difficulty.Text == "Hard" then
  1101. difficulty.Text = "Expert"
  1102. difficulty.TextColor3 = Color3.new(1,0,0)
  1103. difficultynum = 2
  1104. elseif difficulty.Text == "Expert" then
  1105. difficulty.Text = "Super Easy"
  1106. difficulty.TextColor3 = Color3.new(0.9,1,1)
  1107. difficultynum = 0.7
  1108. end
  1109. end
  1110. end
  1111. end)
Add Comment
Please, Sign In to add comment