Quick actions

cmd+k|ctrl+k

Navigation

Languages

Test?

Snippet info

Language

Lua

Visibility

public

Author

xil

Created

2018-12-23T17:17:38Z

Updated

2018-12-23T17:17:38Z

plr = game:GetService("Players").LocalPlayer
char = plr.Character
hum = char.HumanoidRootPart

local part = Instance.new("Part")
part.Color = Color3.new(1, 1, 1)
part.Size = Vector3.new(3, 3, 3)
part.CanCollide = false
part.Anchored = true
part.Locked = true
part.CFrame = hum.CFrame

local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://2572058771"
sound.Looped = true
sound.Volume = 3

local X = 0
local Y = 0
local Z = 0

local X2 = 0
local Y2 = 0
local Z2 = 0

game:GetService("RunService").RenderStepped:Connect(function()
    
    X = X + sound.PlaybackLoudness/10000
    Y = Y + sound.PlaybackLoudness/1000
    Z = Z + sound.PlaybackLoudness/100
    
    X2 = X2 + 1
    Y2 = Y2 + 2
    Z2 = Z2 + 3


  if sound.IsPlaying then
      part.CFrame = part.CFrame:lerp(hum.CFrame * CFrame.new(0, 5 + sound.PlaybackLoudness/250, 0) * CFrame.Angles(math.rad(X), math.rad(Y), math.rad(Z)), 0.08)
      part.Size = part.Size:lerp(Vector3.new(sound.PlaybackLoudness/250, sound.PlaybackLoudness/250, sound.PlaybackLoudness/250), 0.08)
      part.Color = part.Color:lerp(Color3.new(0 + sound.PlaybackLoudness/250, 0 + sound.PlaybackLoudness/250, 0 + sound.PlaybackLoudness/250), 0.08)
    else
      part.CFrame = part.CFrame:lerp(hum.CFrame * CFrame.new(0, 5, 0) * CFrame.Angles(math.rad(0 + X2), math.rad(0 + Y2), math.rad(0 + Z2)), 0.08)
      part.Size = part.Size:lerp(Vector3.new(3, 3, 3), 0.08)
      part.Color = part.Color:lerp(Color3.new(1, 1, 1), 0.08)
        end
end)
INFO