Advertisement
antoniorigo4

Draw visualizer (one remote used here)

Aug 12th, 2020
2,314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.27 KB | None | 0 0
  1. print("The owner is not responsible if you get banned for misusing this script")
  2. local player = owner--hey guys please dont use this script for inappropriate purposes.
  3.  
  4. local pressremote = Instance.new("RemoteEvent",player.Character)
  5. pressremote.Name = "pressremote"
  6.  
  7. local garbage = Instance.new("Model",player.Character)
  8. local sound = Instance.new("Sound",player.Character)
  9.  
  10. pressremote.OnServerEvent:Connect(function(player,press,hit,loud)
  11.     print(player)
  12.     print(press)
  13.     print(hit)
  14.     print(loud)
  15.     if press==nil then local dog = "its dog" else
  16.         if press == "e" then
  17.         sound:Play()
  18.     elseif press=="r" then
  19.         sound:Stop()
  20.     elseif press=="f" then
  21.         garbage:ClearAllChildren()
  22.         end
  23.     end
  24.         if hit ==nil then local dog1 = "its the second dog" else
  25.         local visual = Instance.new("Part",garbage)
  26.         visual.CFrame = hit
  27.         visual.Size = Vector3.new(1,0.1,1)
  28.         visual.Anchored = true
  29.         visual.Orientation = Vector3.new(0,0,0)
  30.                 visual.Material = Enum.Material.Neon    
  31.     if loud == nil then local dog = "its dog" else
  32.          for i,v in pairs(garbage:GetDescendants()) do
  33.         v.Size = Vector3.new(1,sound.PlaybackLoudness*0.1/math.random(2,5),1)
  34.         v.Color = Color3.fromRGB(loud/math.random(2,5),loud/math.random(2,5),loud/math.random(2,5))
  35.     end
  36.         end end
  37. end)
  38. NLS([[
  39.         local player = owner
  40. local mouse = player:GetMouse()
  41.     local press = player.Character:WaitForChild("pressremote")
  42.     local clicked = false
  43. mouse.Button1Down:connect(function()
  44.       clicked = true
  45. end)
  46. mouse.Button1Up:connect(function()
  47.        clicked = false
  48. end)
  49. coroutine.resume(coroutine.create(function()
  50.  while true do wait()
  51.     if clicked == true then
  52.     press:FireServer(nil,mouse.Hit,nil)
  53.         end
  54. end
  55. end))
  56. mouse.KeyDown:connect(function(key)
  57.         if key:lower() == "e" or key:upper() == "E" then
  58.         press:FireServer("e",nil,nil)
  59.     elseif key:lower() == "r" or key:upper() == "R" then
  60.         press:FireServer("r",nil,nil)
  61.     elseif key:lower() == "f" or key:upper() == "F" then
  62.         press:FireServer("f",nil,nil)
  63.         end
  64. end)
  65. local run = game:GetService("RunService")
  66. while true do wait()
  67.     press:FireServer(nil,nil,player.Character.Sound.PlaybackLoudness)
  68. end
  69.     ]],player.Character)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement