Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.88 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. --Draw something, put your sound id in, and watch the light show!--
  88. --Enjoy lads.--
  89. Player=game:GetService("Players").LocalPlayer
  90. Character=Player.Character
  91. Character.Humanoid.Name = "noneofurbusiness"
  92. hum = Character.noneofurbusiness
  93. LeftArm=Character["Left Arm"]
  94. LeftLeg=Character["Left Leg"]
  95. RightArm=Character["Right Arm"]
  96. RightLeg=Character["Right Leg"]
  97. Root=Character["HumanoidRootPart"]
  98. Head=Character["Head"]
  99. Torso=Character["Torso"]
  100. Neck=Torso["Neck"]
  101. mouse = Player:GetMouse()
  102. removeuseless = game:GetService("Debris")
  103. soundIsPlaying = false
  104. number = 0
  105. stop = false
  106. flatt = false
  107. standingg = true
  108. tf = 0
  109. idrewsomething = false
  110. tab2={}
  111. tab={}
  112. blue = false
  113. red = true
  114. green = false
  115. drawingallowed = true
  116. MseGuide = true
  117. RunSrv = game:GetService("RunService")
  118. RenderStepped = game:GetService("RunService").RenderStepped
  119.  
  120. local HEADLERP = Instance.new("ManualWeld")
  121. HEADLERP.Parent = Head
  122. HEADLERP.Part0 = Head
  123. HEADLERP.Part1 = Head
  124. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  125.  
  126. OrgnC0 = Neck.C0
  127. local movelimbs = coroutine.wrap(function()
  128. while RunSrv.RenderStepped:wait() do
  129. TrsoLV = Torso.CFrame.lookVector
  130. Dist = nil
  131. Diff = nil
  132. if not MseGuide then
  133. print("l")
  134. else
  135. local _, Point = Workspace:FindPartOnRay(Ray.new(Head.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  136. Dist = (Head.CFrame.p-Point).magnitude
  137. Diff = Head.CFrame.Y-Point.Y
  138. local _, Point2 = Workspace:FindPartOnRay(Ray.new(LeftArm.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
  139. Dist2 = (LeftArm.CFrame.p-Point).magnitude
  140. Diff2 = LeftArm.CFrame.Y-Point.Y
  141. HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  142. Neck.C0 = Neck.C0:lerp(OrgnC0*CFrame.Angles((math.tan(Diff/Dist)*1), 0, (((Head.CFrame.p-Point).Unit):Cross(Torso.CFrame.lookVector)).Y*1), .1)
  143. end
  144. end
  145. end)
  146. movelimbs()
  147.  
  148. godmode = coroutine.wrap(function()---- so you don't get killed by fucking random things
  149. while true do
  150. hum.MaxHealth = math.huge
  151. wait(0.0000001)
  152. hum.Health = math.huge
  153. wait()
  154. end
  155. end)
  156. godmode()
  157. ff = Instance.new("ForceField", Character)
  158. ff.Visible = false
  159.  
  160. coroutine.wrap(function()
  161. mouse.Button1Down:connect(function()
  162. if drawingallowed then
  163. fo = false
  164. while true do
  165. if fo then break end
  166. idrewsomething = true
  167. brick = Instance.new("Part",Character)
  168. brick.Anchored = true
  169. brick.Material = "Neon"
  170. brick.CanCollide = false
  171. brick.BrickColor = BrickColor.new("Really black")
  172. brick.Size = Vector3.new(1,1,1)
  173. brick.CFrame = CFrame.new(mouse.Hit.p)
  174. table.insert(tab2,brick)
  175. light = Instance.new("PointLight", brick)
  176. light.Color = brick.BrickColor.Color
  177. light.Range = 0
  178. light.Enabled = true
  179. light.Shadows = true
  180. light.Brightness = 0
  181. table.insert(tab,light)
  182. wait()
  183. end
  184. end
  185. end)
  186. end)()
  187.  
  188. coroutine.wrap(function()
  189. mouse.Button1Up:connect(function()
  190. if drawingallowed then
  191. fo = true
  192. end
  193. end)
  194. end)()
  195.  
  196. ---GUI---
  197.  
  198. screenGui = Instance.new("ScreenGui")
  199. screenGui.Parent = script.Parent
  200.  
  201. frame = Instance.new("Frame")
  202. frame.Parent = screenGui
  203. frame.Position = UDim2.new(0, 8, 0, 225)
  204. frame.Size = UDim2.new(0, 250, 0, 200)
  205. frame.BackgroundColor3 = BrickColor.new("White").Color
  206. frame.BackgroundTransparency = .5
  207.  
  208. textButton = Instance.new("TextButton")
  209. textButton.Parent = screenGui
  210. textButton.Position = UDim2.new(0, 12, 0, 400)
  211. textButton.Size = UDim2.new(0, 50, 0, 10)
  212. textButton.BackgroundColor3 = BrickColor.new("Really red").Color
  213. textButton.Text = "Red"
  214.  
  215. textButton.MouseButton1Down:connect(function()
  216. red = true
  217. green = false
  218. blue = false
  219. rainbow = false
  220. smooth = false
  221. end)
  222.  
  223. textButton2 = Instance.new("TextButton")
  224. textButton2.Parent = screenGui
  225. textButton2.Position = UDim2.new(0, 75, 0, 400)
  226. textButton2.Size = UDim2.new(0, 50, 0, 10)
  227. textButton2.BackgroundColor3 = BrickColor.new("Really blue").Color
  228. textButton2.Text = "Blue"
  229.  
  230. textButton2.MouseButton1Down:connect(function()
  231. red = false
  232. green = false
  233. blue = true
  234. rainbow = false
  235. smooth = false
  236. end)
  237.  
  238. textButton3 = Instance.new("TextButton")
  239. textButton3.Parent = screenGui
  240. textButton3.Position = UDim2.new(0, 138, 0, 400)
  241. textButton3.Size = UDim2.new(0, 50, 0, 10)
  242. textButton3.BackgroundColor3 = BrickColor.new("Lime green").Color
  243. textButton3.Text = "Green"
  244.  
  245. textButton3.MouseButton1Down:connect(function()
  246. red = false
  247. green = true
  248. blue = false
  249. rainbow = false
  250. smooth = false
  251. end)
  252.  
  253. textButton4 = Instance.new("TextButton")
  254. textButton4.Parent = screenGui
  255. textButton4.Position = UDim2.new(0, 201, 0, 400)
  256. textButton4.Size = UDim2.new(0, 50, 0, 10)
  257. coroutine.wrap(function()
  258. while true do
  259. textButton4.BackgroundColor3 = BrickColor.Random().Color
  260. wait(.05)
  261. end
  262. end)()
  263. textButton4.Text = "Rainbow"
  264.  
  265. textButton4.MouseButton1Down:connect(function()
  266. red = false
  267. green = false
  268. blue = false
  269. rainbow = true
  270. smooth = false
  271. end)
  272.  
  273. textBox = Instance.new("TextBox")
  274. textBox.Parent = screenGui
  275. textBox.Position = UDim2.new(0, 58, 0, 280)
  276. textBox.Size = UDim2.new(0, 150, 0, 20)
  277. textBox.BackgroundColor3 = BrickColor.new("White").Color
  278. textBox.Text = "Type Sound Id here"
  279.  
  280. form = Instance.new("TextButton")
  281. form.Parent = screenGui
  282. form.TextScaled = true
  283. form.Position = UDim2.new(0, 114, 0, 305)
  284. form.Size = UDim2.new(0, 40, 0, 20)
  285. form.BackgroundColor3 = BrickColor.new("White").Color
  286. form.Text = "Up"
  287.  
  288. form.MouseButton1Down:connect(function()
  289. if standingg then
  290. standingg = false
  291. flatt = true
  292. form.Text = "Flat"
  293. elseif flatt then
  294. flatt = false
  295. standingg = true
  296. form.Text = "Up"
  297. end
  298. end)
  299.  
  300. coroutine.wrap(function()
  301. while wait() do
  302. sid = textBox.Text
  303. end
  304. end)()
  305.  
  306. playbutton = Instance.new("TextButton")
  307. playbutton.Parent = screenGui
  308. playbutton.Position = UDim2.new(0, 58, 0, 305)
  309. playbutton.Size = UDim2.new(0, 50, 0, 20)
  310. playbutton.BackgroundColor3 = BrickColor.new("White").Color
  311. playbutton.Text = "Play"
  312.  
  313. playbutton.MouseButton1Down:connect(function()
  314. if not idrewsomething then return end
  315. if soundIsPlaying then
  316. sound1:Remove()
  317. sound1 = Instance.new("Sound", Character)
  318. sound1.Looped = true
  319. sound1.SoundId = "http://www.roblox.com/asset/?id=" .. sid
  320. sound1:Play()
  321. else
  322. soundIsPlaying = true
  323. vol.Text = 1
  324. pitch.Text = 1
  325. sound1 = Instance.new("Sound", Character)
  326. coroutine.wrap(function()
  327. while soundIsPlaying do
  328. wait()
  329. sound1.Volume = svol
  330. end
  331. end)()
  332. sound1.Looped = true
  333. coroutine.wrap(function()
  334. while soundIsPlaying do
  335. sound1.Pitch = pitchh
  336. wait()
  337. end
  338. end)()
  339. sound1.SoundId = "http://www.roblox.com/asset/?id=" .. sid
  340. sound1:Play()
  341. coroutine.wrap(function()
  342. while sound1.IsPlaying and soundIsPlaying do
  343. for i,v in pairs(tab) do
  344. v.Enabled = true
  345. v.Brightness = sound1.PlaybackLoudness/19
  346. v.Range = sound1.PlaybackLoudness/15
  347. if red then
  348. v.Color = Color3.new(sound1.PlaybackLoudness/200, 0,0)
  349. elseif blue then
  350. v.Color = Color3.new(0, 0,sound1.PlaybackLoudness/200)
  351. elseif green then
  352. v.Color = Color3.new(0, sound1.PlaybackLoudness/200,0)
  353. elseif rainbow then
  354. v.Color = brick.BrickColor.Color
  355. end
  356. end
  357. wait()
  358. end
  359. end)()
  360. while sound1.IsPlaying and soundIsPlaying do
  361. workspace.CurrentCamera.FieldOfView = 70 - sound1.PlaybackLoudness/100
  362. bcol = brick.BrickColor
  363. for _,v in pairs(tab2) do
  364. if standingg then
  365. v.Size = Vector3.new(1, sound1.PlaybackLoudness/math.random(10,25), 1)
  366. elseif flatt then
  367. v.Size = Vector3.new(sound1.PlaybackLoudness/math.random(10,25), 1, 1)
  368. end
  369. if red then
  370. v.BrickColor = BrickColor.new(Color3.new(sound1.PlaybackLoudness/200, 0,0))
  371. elseif blue then
  372. v.BrickColor = BrickColor.new(Color3.new(0,0,sound1.PlaybackLoudness/200))
  373. elseif green then
  374. v.BrickColor = BrickColor.new(Color3.new(0,sound1.PlaybackLoudness/200,0))
  375. elseif rainbow then
  376. v.BrickColor = BrickColor.Random()
  377. end
  378. end
  379. wait()
  380. end
  381. end
  382. end)
  383.  
  384. local stopbutton = Instance.new("TextButton")
  385. stopbutton.Parent = screenGui
  386. stopbutton.Position = UDim2.new(0, 158, 0, 305)
  387. stopbutton.Size = UDim2.new(0, 50, 0, 20)
  388. stopbutton.BackgroundColor3 = BrickColor.new("White").Color
  389. stopbutton.Text = "Stop"
  390.  
  391. vol = Instance.new("TextBox")
  392. vol.Parent = screenGui
  393. vol.Position = UDim2.new(0, 58, 0, 330)
  394. vol.Size = UDim2.new(0, 50, 0, 20)
  395. vol.BackgroundColor3 = BrickColor.new("White").Color
  396. vol.Text = "Volume"
  397.  
  398. coroutine.wrap(function()
  399. while wait() do
  400. svol = vol.Text
  401. end
  402. end)()
  403.  
  404. local remove = Instance.new("TextButton")
  405. remove.Parent = screenGui
  406. remove.Position = UDim2.new(0, 108, 0, 370)
  407. remove.Size = UDim2.new(0, 50, 0, 20)
  408. remove.BackgroundColor3 = BrickColor.new("White").Color
  409. remove.Text = "Clean"
  410.  
  411. pitch = Instance.new("TextBox")
  412. pitch.Parent = screenGui
  413. pitch.Position = UDim2.new(0, 158, 0, 330)
  414. pitch.Size = UDim2.new(0, 50, 0, 20)
  415. pitch.BackgroundColor3 = BrickColor.new("White").Color
  416. pitch.Text = "Pitch"
  417.  
  418. coroutine.wrap(function()
  419. while wait() do
  420. pitchh = pitch.Text
  421. end
  422. end)()
  423.  
  424. pitchup = Instance.new("ImageButton")
  425. pitchup.Parent = screenGui
  426. pitchup.Position = UDim2.new(0, 131, 0, 327)
  427. pitchup.BackgroundTransparency = 1
  428. pitchup.Size = UDim2.new(0, 25, 0, 25)
  429. pitchup.Image = "rbxassetid://29563813"
  430.  
  431. pitchup.MouseButton1Down:connect(function()
  432. if soundIsPlaying then
  433. pitch.Text = pitch.Text + .1
  434. end
  435. end)
  436.  
  437. pitchdown = Instance.new("ImageButton")
  438. pitchdown.Parent = screenGui
  439. pitchdown.Rotation = 180
  440. pitchdown.Position = UDim2.new(0, 211, 0, 327)
  441. pitchdown.BackgroundTransparency = 1
  442. pitchdown.Size = UDim2.new(0, 25, 0, 25)
  443. pitchdown.Image = "rbxassetid://29563813"
  444.  
  445. pitchdown.MouseButton1Down:connect(function()
  446. if soundIsPlaying then
  447. pitch.Text = pitch.Text - .1
  448. end
  449. end)
  450.  
  451. remove.MouseButton1Down:connect(function()
  452. if idrewsomething then
  453. if soundIsPlaying then
  454. soundIsPlaying = false
  455. workspace.CurrentCamera.FieldOfView = 70
  456. woosh = Instance.new("Sound",Character)
  457. woosh.Volume = 2
  458. woosh.SoundId = "rbxasstid://215402014"
  459. woosh:Play()
  460. sound1:Stop()
  461. pitch.Text = "Pitch"
  462. vol.Text = "Volume"
  463. removeuseless:AddItem(woosh,2)
  464. for _,v in pairs(tab2) do
  465. v:Remove()
  466. end
  467. idrewsomething = false
  468. elseif not soundIsPlaying then
  469. soundIsPlaying = false
  470. woosh = Instance.new("Sound",Character)
  471. woosh.Volume = 2
  472. woosh.SoundId = "rbxasstid://215402014"
  473. woosh:Play()
  474. for _,v in pairs(tab2) do
  475. v:Remove()
  476. end
  477. idrewsomething = false
  478. end
  479. end
  480. end)
  481.  
  482. local day = Instance.new("TextButton")
  483. day.Parent = screenGui
  484. day.Position = UDim2.new(0, 50, 0, 370)
  485. day.Size = UDim2.new(0, 50, 0, 20)
  486. day.BackgroundColor3 = BrickColor.new("Bright yellow").Color
  487. day.Text = "Day"
  488.  
  489. day.MouseButton1Down:connect(function()
  490. daytime = true
  491. nighttime = false
  492. turnon = Instance.new("Sound",Character)
  493. turnon.SoundId = "rbxassetid://858896518"
  494. turnon.Volume = 1
  495. turnon.Pitch = 1.05
  496. turnon:Play()
  497. removeuseless:AddItem(turnon,2)
  498. coroutine.wrap(function()
  499. while daytime do
  500. game.Lighting.TimeOfDay = 12
  501. game.Lighting.GlobalShadows = true
  502. game.Lighting.Ambient = Color3.fromRGB(10,10,10)
  503. game.Lighting.Brightness = 1
  504. wait()
  505. end
  506. end)()
  507. end)
  508.  
  509. local night = Instance.new("TextButton")
  510. night.Parent = screenGui
  511. night.Position = UDim2.new(0, 165, 0, 370)
  512. night.Size = UDim2.new(0, 50, 0, 20)
  513. night.BackgroundColor3 = BrickColor.new("Really black").Color
  514. night.TextColor = BrickColor.new("White")
  515. night.Text = "Night"
  516.  
  517. night.MouseButton1Down:connect(function()
  518. daytime = false
  519. nighttime = true
  520. turnoff = Instance.new("Sound",Character)
  521. turnoff.SoundId = "rbxassetid://858896518"
  522. turnoff.Volume = 1
  523. turnoff.Pitch = .9
  524. turnoff:Play()
  525. removeuseless:AddItem(turnoff,2)
  526. coroutine.wrap(function()
  527. while nighttime do
  528. game.Lighting.TimeOfDay = 0
  529. game.Lighting.GlobalShadows = false
  530. game.Lighting.Ambient = Color3.new(0,0,0)
  531. game.Lighting.Brightness = 0
  532. wait()
  533. end
  534. end)()
  535. end)
  536.  
  537. volumeup = Instance.new("ImageButton")
  538. volumeup.Parent = screenGui
  539. volumeup.Position = UDim2.new(0, 29, 0, 327)
  540. volumeup.BackgroundTransparency = 1
  541. volumeup.Size = UDim2.new(0, 25, 0, 25)
  542. volumeup.Image = "rbxassetid://29563813"
  543.  
  544. volumeup.MouseButton1Down:connect(function()
  545. if soundIsPlaying then
  546. vol.Text = vol.Text + 1
  547. end
  548. end)
  549.  
  550. volumedown = Instance.new("ImageButton")
  551. volumedown.Parent = screenGui
  552. volumedown.Rotation = 180
  553. volumedown.Position = UDim2.new(0, 111, 0, 327)
  554. volumedown.BackgroundTransparency = 1
  555. volumedown.Size = UDim2.new(0, 25, 0, 25)
  556. volumedown.Image = "rbxassetid://29563813"
  557.  
  558. Supr14 = Instance.new("ImageLabel")
  559. Supr14.Parent = screenGui
  560. Supr14.Rotation = 0
  561. Supr14.Position = UDim2.new(0, 13, 0, 222)
  562. Supr14.BackgroundTransparency = 1
  563. Supr14.Size = UDim2.new(0, 240, 0, 60)
  564. Supr14.Image = "rbxassetid://1815697653"
  565.  
  566. volumedown.MouseButton1Down:connect(function()
  567. if soundIsPlaying then
  568. vol.Text = vol.Text - 1
  569. end
  570. end)
  571.  
  572. stopbutton.MouseButton1Down:connect(function()
  573. if idrewsomething then
  574. if soundIsPlaying then
  575. sound1:Remove()
  576. soundIsPlaying = false
  577. workspace.CurrentCamera.FieldOfView = 70
  578. pitch.Text = "Pitch"
  579. vol.Text = "Volume"
  580. for i,v in pairs(tab) do
  581. v.Enabled = false
  582. end
  583. for i = 1, 10 do
  584. for _,v in pairs(tab2) do
  585. v.BrickColor = BrickColor.new("Really black")
  586. v.Size = v.Size - Vector3.new(0,15,0)
  587. end
  588. wait()
  589. end
  590. end
  591. end
  592. end)
  593.  
  594. print("Drawing visualiser!, Made by Supr14")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement