Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Player Functions ]]--
- plr = game.Players:WaitForChild(_G.target)
- char = plr.Character
- --[[ God Mode ]]--
- forcefield = Instance.new("ForceField", char)
- forcefield.Visible = false
- char.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
- --[[ Color Functions ]]--
- h = math.random(0, 100)
- color = Color3.fromHSV(h / 100, 1, 0.9)
- lastbeat = 0
- lastloud = 0
- --[[ Light ]]--
- local lite = Instance.new("PointLight")
- lite.Range = 0
- lite.Brightness = 0
- lite.Parent = char.HumanoidRootPart
- --[[ Sound ]]--
- local sound = Instance.new("Sound")
- sound.Parent = char.HumanoidRootPart
- sound.Volume = 10
- sound.Name = "Music"
- sound.Looped = true
- plr.Chatted:connect(function(msg)
- if msg:sub(1, 6):lower()=='visual' then
- local val = Instance.new("NumberValue", char)
- val.Value = tonumber(msg:sub(7))
- local id = val.Value
- sound:Stop()
- sound.MaxDistance = 500
- sound.SoundId='rbxassetid://'..id
- sound:Play()
- sound.Looped = true
- wait()
- elseif msg:sub(1,5):lower()=='pitch' then
- local val2 = Instance.new("NumberValue", char)
- val2.Value = tonumber(msg:sub(6))
- local Pitch = val2.Value
- sound.Pitch = Pitch
- elseif msg:sub(1,3):lower()=='vol' then
- local val3 = Instance.new("NumberValue", char)
- val3.Value = tonumber(msg:sub(5))
- local Volume = val3.Value
- sound.Volume = Volume
- end
- end)
- --[[ Remote ]]--
- local Remote = Instance.new("RemoteEvent", char)
- Remote.Name = "Event"
- local PlaybackSound = 0
- --[[ Parts ]]--
- Parts = {}
- local Ball = Instance.new("Part", char)
- Ball.Size = Vector3.new(3, 3, 3)
- Ball.Shape = Enum.PartType.Ball
- Ball.Material = "Neon"
- Ball.Anchored = true
- Ball.CanCollide = false
- Ball.Locked = true
- Ball.Transparency = 0
- Ball.CFrame = char.HumanoidRootPart.CFrame
- for i = 1, 10 do
- local part = Instance.new("Part")
- part.Size = Vector3.new(0.2, 0.2, 0.2)
- part.Material = "Neon"
- part.Anchored = true
- part.CanCollide = false
- part.Parent = Ball
- part.CFrame = Ball.CFrame
- local mesh = Instance.new("BlockMesh")
- mesh.Parent = part
- mesh.Name = "Mesh"
- table.insert(Parts, part)
- end
- --[[ Visual ]]--
- local Y = 0
- local X = 0
- local Z = 0
- local SelectedPart = 0
- Remote.OnServerEvent:connect(function(plr, Playback)
- Y = Y + Playback/100000
- X = X + Playback/10000
- Z = Z + Playback/1000
- local beat = math.abs(PlaybackSound - lastloud)
- if beat > lastbeat then
- lastbeat = beat
- else
- lastbeat = lastbeat - 10
- if lastbeat < 0 then
- lastbeat = 0
- end
- end
- h = (h + beat / 250) % 100
- lastloud = PlaybackSound
- color = Color3.fromHSV(h / 100, 5, 0.5 + lastbeat / 50)
- local circumference = Playback/750 * #Parts
- local answer = circumference / (math.pi * 10)
- Ball.CFrame = Ball.CFrame:lerp(char.HumanoidRootPart.CFrame * CFrame.new(0, 5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(X),math.rad(Y),math.rad(Z)), 0.25)
- Ball.Size = Ball.Size:lerp(Vector3.new(Playback/250, Playback/250, Playback/250), 0.25)
- for i,v in pairs(Parts) do
- v.CFrame = v.CFrame:lerp(Ball.CFrame * CFrame.Angles(0 + X, math.rad(i*(360/#Parts)) + Y, 0 + Z) * CFrame.new(0, 0, answer + Playback/250), 0.5)
- v.Mesh.Scale = v.Mesh.Scale:lerp(Vector3.new(1, 1, 1), 0.25)
- end
- Ball.Color = Ball.Color:lerp(Color3.fromHSV(h / 100, 1, 1), 0.25)
- if SelectedPart < #Parts then
- SelectedPart = SelectedPart + 1
- else
- SelectedPart = 1
- end
- local sel = Parts[SelectedPart]
- sel.Color = sel.Color:lerp(Color3.fromHSV(h / 100, 0.25, 0.25), 0.25)
- sel.Mesh.Scale = sel.Mesh.Scale:lerp(Vector3.new(Playback/100, Playback/100, Playback/5), 0.08)
- wait(1)
- sel.Color = sel.Color:lerp(Color3.fromHSV(h / 100, 1, 1), 0.25)
- sel.Mesh.Scale = sel.Mesh.Scale:lerp(Vector3.new(Playback/250, Playback/250, Playback/25), 0.08)
- PlaybackSound = Playback
- end)
- --[[ Debounce ]]--
- function debounce(func)
- local isRunning = false
- return function(...)
- if not isRunning then
- isRunning = true
- func(...)
- isRunning = false
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement