Advertisement
antoniorigo4

Draw Visualizer

Aug 13th, 2020 (edited)
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. local version = 2
  2. print("We only got 1 remoteevent now instead of 3 remoteevents")
  3. local player = owner--hey guys please dont use this script for inappropriate purposes.
  4.  
  5. local Remote = Instance.new("RemoteEvent",player.Character)
  6. Remote.Name = "MainRemote"
  7. local garbage = Instance.new("Model",script)
  8. owner.CharacterAdded:Connect(function(k)
  9. script:Destroy()
  10. end)
  11. local sound = Instance.new("Sound",player.Character.Head)
  12. sound.Volume = 10
  13. player.Chatted:Connect(function(msg)
  14. if msg:sub(1,5) == "/play" then
  15. local victim = msg:sub(1,5)
  16. local soundid = string.gsub(msg,victim,"")
  17. sound.SoundId = "rbxassetid://"..soundid
  18. sound:Play()
  19. end
  20. end)
  21. Remote.OnServerEvent:Connect(function(player,purpose,other)
  22. if purpose:lower() == "keydown" then
  23. if other == "e" then
  24. sound:Play()
  25. elseif other =="r" then
  26. sound:Stop()
  27. elseif other =="f" then
  28. garbage:ClearAllChildren()
  29. end
  30. elseif purpose:lower() == "draw" then
  31. local visual = Instance.new("Part",garbage)
  32. visual.CFrame = other
  33. visual.Size = Vector3.new(1,0.1,1)
  34. visual.Anchored = true
  35. visual.Orientation = Vector3.new(0,0,0)
  36. visual.Material = Enum.Material.Neon
  37. elseif purpose:lower() == "loudness" then
  38. for i,v in pairs(garbage:GetDescendants()) do
  39. v.Size = Vector3.new(1,other*0.1/math.random(2,5),1)
  40. v.Color = Color3.fromRGB(other/math.random(2,5),other/math.random(2,5),other/math.random(2,5))
  41. end
  42. end
  43. end)
  44. NLS([[
  45. local player = game.Players.LocalPlayer
  46. local Rem = owner.Character:WaitForChild("MainRemote")
  47. local mouse = owner:GetMouse()
  48. local clicked = false
  49. mouse.Button1Down:connect(function()
  50. clicked = true
  51. end)
  52. mouse.Button1Up:connect(function()
  53. clicked = false
  54. end)
  55. coroutine.resume(coroutine.create(function()
  56. while true do
  57. wait()
  58. if clicked == true then
  59. Rem:FireServer("draw",mouse.Hit)
  60. end
  61. end
  62.  
  63. end))
  64. mouse.KeyDown:connect(function(key)
  65. if key:lower() == "e" or key:upper() == "E" then
  66. Rem:FireServer("keydown","e")
  67. elseif key:lower() == "r" or key:upper() == "R" then
  68. Rem:FireServer("keydown","r")
  69. elseif key:lower() == "f" or key:upper() == "F" then
  70. Rem:FireServer("keydown","f")
  71. end
  72. end)
  73. local run = game:GetService("RunService")
  74. run.Heartbeat:Connect(function()
  75. wait()
  76. workspace.CurrentCamera.FieldOfView = 60 + (player.Character.Head.Sound.PlaybackLoudness*0.01)
  77. Rem:FireServer("loudness",player.Character.Head.Sound.PlaybackLoudness)
  78. end)
  79.  
  80. ]],player.Character)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement