Advertisement
InTesting

Server Vis (dont judge)

Jul 8th, 2019
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.17 KB | None | 0 0
  1. print'https://pastebin.com/MtP4Trnj'
  2. local function make_vis(pl_1)
  3.     local pchar = pl_1.Character
  4.     if not pchar then
  5.         pl_1:LoadCharacter()
  6.         wait(.1)
  7.     end
  8.     local phead = pchar:FindFirstChild'Head'
  9.     if not phead then
  10.         pl_1:LoadCharacter()
  11.         wait(.1)
  12.         phead = pchar:FindFirstChild'Head'
  13.     end
  14.    
  15.     local pre_1 = 'rbxassetid://'
  16.  
  17.     local globalsound,globalpart,at_3,at_4
  18.    
  19.     local function Make_VP()
  20.         local sound = Instance.new("Sound",phead)
  21.         sound.Volume = 2.5
  22.         sound.SoundId = pre_1..'3250100544'
  23.         sound.Looped = true
  24.         sound.Name = 'sound_inf'
  25.         sound:Play()
  26.        
  27.         local part = Instance.new("Part",workspace)
  28.         part.Name = '∞vis'
  29.         part.Massless = true
  30.         part.Position = Vector3.new(0,10,0)
  31.         part.CanCollide = true
  32.         part.Shape = Enum.PartType.Ball
  33.         part.BrickColor = BrickColor.new("Really red")
  34.         part.Material = Enum.Material.Glass
  35.  
  36.         local at1 = Instance.new("Attachment",part)
  37.        
  38.         local at2 = Instance.new("Attachment",phead)
  39.         at2.Position = Vector3.new(0,5,0)
  40.         at2.Visible = false
  41.        
  42.         local apos = Instance.new("AlignPosition",at2)
  43.         apos.Attachment0 = at1
  44.         apos.Attachment1 = at2
  45.         apos.Responsiveness = 100
  46.         apos.MaxForce = 30000
  47.         apos.ApplyAtCenterOfMass = true
  48.  
  49.         local at3 = Instance.new('Attachment',part)
  50.         at3.Position = Vector3.new(0,2,0)
  51.        
  52.         local at4 = Instance.new('Attachment',part)
  53.         at4.Position = Vector3.new(0,-2,0)
  54.        
  55.         local t = Instance.new("Trail",at3)
  56.         t.Attachment0 = at3
  57.         t.Attachment1 = at4
  58.         t.Lifetime = 3
  59.  
  60.         return sound,part,at3,at4
  61.     end
  62.    
  63.     globalsound,globalpart,at_3,at_4 = Make_VP()
  64.    
  65.    
  66.    
  67.     local function Get_Components_Of_Mouse(player) 
  68.         local pchar = player.Character
  69.        
  70.         if pchar then
  71.             local Remote = pchar:FindFirstChild('∞RE_Mouse')
  72.             if not Remote then
  73.                 Remote = Instance.new("RemoteEvent",pchar)
  74.                 Remote.Name = 'RE_Mouse'
  75.             end
  76.             Remote.Parent = NLS(
  77.                 [[
  78.                    
  79. local lp = game:GetService'Players'.LocalPlayer
  80. local players = game:GetService'Players'
  81. local mouse = lp:GetMouse()
  82. local runs = game:GetService'RunService'
  83.  
  84. wait(1)
  85.  
  86. local lchar = players[lp.Name].Character
  87.  
  88. local re = script.Parent:FindFirstChild('RE_Mouse',true)
  89.  
  90. local sound = lchar:FindFirstChild('sound_inf',true)
  91. if sound then
  92.     runs.Stepped:Connect(function()
  93.         if re then
  94.             local transmitt = sound.PlaybackLoudness / 100
  95.             if transmitt<.1 then
  96.                 transmitt = .1
  97.             end
  98.             re:FireServer('SoundSize',transmitt)
  99.         else
  100.             print'i1'
  101.         end
  102.     end)
  103. else
  104.     print'cant find sound'
  105. end
  106.  
  107.         ]],pchar )
  108.             return Remote
  109.         else
  110.             error'Best to actually put your character in the game.'
  111.         end
  112.     end
  113.     local RE = Get_Components_Of_Mouse(pl_1)
  114.      -- Function returns Remote event
  115.    
  116.    
  117.    
  118.    
  119.  
  120.     RE.OnServerEvent:Connect(function(pl,arg1,arg2)
  121.         if pl==pl_1 then
  122.             if arg1=='SoundSize'and globalpart and globalsound and at_3 and at_4 then
  123.                 globalpart.Size = Vector3.new(arg2,arg2,arg2)
  124.                 at_3.Position = Vector3.new(0,arg2 / 2 ,0)
  125.                 at_4.Position = Vector3.new(0,arg2 /-2, 0)
  126.             else
  127.                 print(arg1,globalpart,globalsound,at_3,at_4)
  128.             end
  129.         end
  130.     end)
  131.  
  132. end
  133. make_vis(owner)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement