creativenico

Visualizer

May 25th, 2021
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.53 KB | None | 0 0
  1. local Players, RService = game:GetService"Players", game:GetService"RunService";
  2. local Client, CF = Players.LocalPlayer, CFrame.new;
  3. local XSet, YSet, ZSet, OSet, Sine,Rot,Mov = 88,77,66,-10, 0,0,0;
  4. local Visualizing, VisTool = false, "Spray";
  5. local Commands, Prefix, LoadingTime = {}, "-", tick();
  6. local VisToolTable = {
  7. ["glock"] = "Glock";["shotty"] = "Shotty";
  8. ["uzi"] = "Uzi";["sawoff"] = "Sawed Off";
  9. ["pipe"] = "Pipe";["katana"] = "Katana";
  10. ["spray"] = "Spray";["knife"] = "Knife";
  11. ["golf"] = "Golf Club";["machete"] = "Machete";
  12. ["greenbull"] = "Greenbull";["brick"] = "Brick";
  13. ["stopsign"] = "Stop Sign";
  14. }
  15.  
  16. getgenv().GetInit = function(CName)
  17. for _, v in next, Commands do
  18. if table.find(v.Aliases, CName) then
  19. return v.Function
  20. end
  21. end
  22. end
  23.  
  24. getgenv().RunCommand = function(Cmd)
  25. Cmd = string.lower(Cmd)
  26. pcall(function()
  27. if Cmd:sub(1, #Prefix) == Prefix then
  28. local args = string.split(Cmd:sub(#Prefix + 1), " ")
  29. local CmdName = GetInit(table.remove(args, 1))
  30. if CmdName and args then
  31. return CmdName(args)
  32. end
  33. end
  34. end)
  35. end
  36.  
  37. getgenv().Notify = function(title, text, icon, time)
  38. game:GetService("StarterGui"):SetCore("SendNotification",{
  39. Title = title;
  40. Text = text;
  41. Icon = "rbxassetid://5793181157";
  42. Duration = time;
  43. })
  44. end
  45.  
  46. getgenv().UnVis = function()
  47. if Client and Client.Character and Client.Character:FindFirstChild("Humanoid") then
  48. Client.Character.Humanoid:UnequipTools()
  49. end
  50. end
  51.  
  52. Commands["VisTool"] = {
  53. ["Aliases"] = {"vistool"};
  54. ["Function"] = function(args)
  55. if VisToolTable[args[1]] then
  56. VisTool = VisToolTable[args[1]]
  57. end
  58. Notify("zxciaz", "Vistool: "..tostring(VisTool), "", 3)
  59. end
  60. }
  61. Commands["X-Offset"] = {
  62. ["Aliases"] = {"xset"};
  63. ["Function"] = function(args)
  64. if tonumber(args[1]) then
  65. XSet = tonumber(args[1])
  66. end
  67. Notify("zxciaz", "X-Offset: "..tonumber(args[1]), "", 3)
  68. end
  69. }
  70. Commands["Y-Offset"] = {
  71. ["Aliases"] = {"yset"};
  72. ["Function"] = function(args)
  73. if tonumber(args[1]) then
  74. YSet = tonumber(args[1])
  75. end
  76. Notify("zxciaz", "Y-Offset: "..tonumber(args[1]), "", 3)
  77. end
  78. }
  79. Commands["Z-Offset"] = {
  80. ["Aliases"] = {"zset"};
  81. ["Function"] = function(args)
  82. if tonumber(args[1]) then
  83. ZSet = tonumber(args[1])
  84. end
  85. Notify("zxciaz", "Z-Offset: "..tonumber(args[1]), "", 3)
  86. end
  87. }
  88. Commands["O-Offset"] = {
  89. ["Aliases"] = {"oset"};
  90. ["Function"] = function(args)
  91. if tonumber(args[1]) then
  92. OSet = tonumber(args[1])
  93. end
  94. Notify("zxciaz", "O-Offset: "..tonumber(args[1]), "", 3)
  95. end
  96. }
  97. Commands["Visualize"] = {
  98. ["Aliases"] = {"visualize", "vis"};
  99. ["Function"] = function()
  100. Visualizing = not Visualizing
  101. Notify("zxciaz", "Visualizer: "..tostring(Visualizing), "", 3)
  102. end
  103. }
  104. Client.Chatted:Connect(RunCommand)
  105.  
  106. RService.Stepped:Connect(function()
  107. if Visualizing == true then
  108. local R1, R2 = Client.Backpack:FindFirstChild("BoomBox"), Client.Character:FindFirstChild("BoxModel")
  109. getgenv().Song = R2.Handle["SoundX"] or R2.Handle["Sound"];UnVis()
  110. for i = 1, #Client.Backpack:GetChildren() do
  111. local BP = Client.Backpack:GetChildren()[i]
  112. if tostring(BP) == VisTool then
  113. Sine = Sine + XSet;Rot = Rot + YSet;Mov = Mov + ZSet -- You can play around with the PBL ill probably add a command for it
  114. BP.Grip = CF(Song.PlaybackLoudness/-150, Song.PlaybackLoudness/-500, Song.PlaybackLoudness/-250) * CFrame.Angles(Sine, OSet, Rot) -- i love doing math in lua but not for this hell no
  115. BP.Parent = Client.Character
  116. end
  117. end
  118. end
  119. end)
  120.  
  121. print([[
  122.  
  123. zxciaz/xaxa/fiviefourteen's The Streets Visualizer V1
  124. -----------------------------------------------------
  125. Commands:
  126.  
  127. -vistool <namehere>, Sets your Visualizer Tool
  128. -visualize [vis], Toggles the Visualizer on and Off
  129.  
  130. -xset <numberhere>, Sets the X-Angle Offset
  131. -yset <numberhere>, Sets the Y-Angle Offset
  132. -zset <numberhere>, Sets the Z-Angle Offset
  133. -oset <numberhere>, Sets the Angle in Which Your Tools Tilt
  134.  
  135. ]])
  136. Notify("zxciaz", "Welcome to my Tool/Audio Visualizer for The Streets/Prison!", "", 3)
  137. Notify("zxciaz", "Took "..tostring(tick() - LoadingTime):sub(1,5).." seconds to load", "", 3)
  138. wait(3)
  139. Notify("zxciaz", "Press F9 For Commands!", "", 3)
Add Comment
Please, Sign In to add comment