View difference between Paste ID: Cw6Q2nm5 and hJAEJPc3
SHOW: | | - or go back to the newest paste.
1
local Plr = owner
2
local char = owner.Character
3
local plr = owner
4
5
-- [[ Color Functions ]] --
6
7
h = math.random(0, 100)
8
color = Color3.fromHSV(h / 100, 1, 0.9)
9
lastbeat = 0
10
lastloud = 0
11
12
-- [[ Cone ]] --
13
14
local cone = Instance.new("Part")
15
cone.Anchored = true
16
cone.CanCollide = false
17
cone.Locked = true
18
cone.Size = Vector3.new(0.5, 0.5, 0.5)
19
cone.Parent = char
20
cone.Transparency = 1
21-
local conem = Instance.new("SpecialMesh")
21+
22-
conem.MeshType = Enum.MeshType.FileMesh
22+
23-
conem.MeshId = "rbxassetid://120647846"
23+
24-
conem.Scale = Vector3.new(1, 1, 1)
24+
25-
conem.Parent = cone
25+
26
local partic = Instance.new("ParticleEmitter")
27
partic.Rate = 50
28
partic.EmissionDirection = Enum.NormalId.Right
29
partic.Texture = "rbxassetid://443789987"
30
partic.LightEmission = 5
31
partic.LightInfluence = 1
32
partic.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1)})
33
partic.Parent = cone
34
35
--[[ Light ]]--
36
37
local lite = Instance.new("PointLight")
38
lite.Range = 0
39
lite.Brightness = 0
40
lite.Parent = char.HumanoidRootPart
41
42
--[[ Sound ]]--
43
44
local sound = Instance.new("Sound")
45
sound.Parent = char.HumanoidRootPart
46
sound.Volume = 10
47
sound.Name = "Music"
48
sound.Looped = true
49
50
plr.Chatted:connect(function(msg)
51
        if msg:sub(1, 6):lower()=='visual' then
52
                local val = Instance.new("NumberValue", char)
53
                val.Value = tonumber(msg:sub(7))
54
                local id = val.Value
55
                sound:Stop()
56
                sound.SoundId = 'rbxassetid://'..id
57
                sound:Play()
58
                sound.Looped = true
59
                wait()
60
        elseif msg:sub(1,5):lower()=='pitch' then
61
                local val2 = Instance.new("NumberValue", char)
62
                val2.Value = tonumber(msg:sub(6))
63
                local Pitch = val2.Value
64
                sound.Pitch = Pitch
65
        elseif msg:sub(1,3):lower()=='vol' then
66
                local val3 = Instance.new("NumberValue", char)
67
                val3.Value = tonumber(msg:sub(5))
68
                local Volume = val3.Value
69
                sound.Volume = Volume
70
end
71
end)
72
73
--[[ Remote ]]--
74
75
local Remote = Instance.new("RemoteEvent", char) 
76
Remote.Name = "Event"
77
local PlaybackSound = 0
78
79
--[[ Visual ]]--
80
81
local spin = 0
82
83
Remote.OnServerEvent:connect(function(plr, Playback)
84
	
85
spin = spin + 0.08 + Playback/10000
86
87
	local beat = math.abs(PlaybackSound - lastloud)
88
		if beat > lastbeat then
89
			lastbeat = beat
90
		else
91
			lastbeat = lastbeat - 10
92
			if lastbeat < 0 then
93
				lastbeat = 0
94
			end
95
		end
96
97
		h = (h + beat / 250) % 100
98
		lastloud = PlaybackSound
99
		color = Color3.fromHSV(h / 100, 5, 0.5 + lastbeat / 50)
100
		
101
lite.Range = 10 + Playback/25
102
lite.Brightness = 5 + Playback/5
103
lite.Color = lite.Color:lerp(Color3.fromHSV(h / 100, 1, 1), 0.25)
104
105
cone.CFrame = cone.CFrame:lerp(char.Head.CFrame * CFrame.new(0, 5, 0) * CFrame.Angles(0, spin, 0), 0.25)
106
cone.Color = cone.Color:lerp(Color3.fromHSV(h / 100, 1, 1), 0.25)
107
108
conem.Scale = conem.Scale:lerp(Vector3.new(1 + Playback/250, 1 + Playback/250, 1 + Playback/250), 0.25)
109
110
partic.Speed = NumberRange.new(5 + Playback/1000)
111
partic.Lifetime = NumberRange.new(5 + Playback/1000)
112
partic.Drag = 5 - Playback/50
113
partic.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0 + Playback/1000), NumberSequenceKeypoint.new(1, 0.25 + Playback/1000)})
114
partic.Color = ColorSequence.new(Color3.fromHSV(h / 100, 1, 1), Color3.fromHSV(h / 100, 1, 1))
115
partic.RotSpeed = NumberRange.new(0 - sound.PlaybackLoudness/-250, 0 + sound.PlaybackLoudness/250)
116
partic.SpreadAngle = Vector2.new(0 - sound.PlaybackLoudness/-25, 0 + sound.PlaybackLoudness/25)
117
118
PlaybackSound = Playback
119
120
end)
121
122
--[[ Fire Remote ]]--
123
124
NLS([==[
125
    while wait() do
126
        game:service'Players'.LocalPlayer.Character.Event:FireServer(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Music.PlaybackLoudness)
127
    end
128
]==], char)
129
130
--[[ Debounce ]]--
131
132
function debounce(func)
133
    local isRunning = false
134
    return function(...)
135
        if not isRunning then
136
            isRunning = true
137
 
138
            func(...)
139
 
140
            isRunning = false
141
        end
142
    end
143
end
144
145
local BillboardGui = Instance.new("BillboardGui")
146
local TextLabel = Instance.new("TextLabel")
147
148
local vol = 1
149
local song = 0
150
local pitch = 1
151
local timepos = nil
152
local mus = Instance.new("Sound",char)
153
mus:Destroy()
154
155
BillboardGui.Name = "tag"
156
BillboardGui.Parent = char.Head
157
BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
158
BillboardGui.AlwaysOnTop = false
159
BillboardGui.ExtentsOffset = Vector3.new(0, 3, 0)
160
BillboardGui.LightInfluence = 1
161
BillboardGui.Size = UDim2.new(0, 200, 0, 50)
162
 
163
TextLabel.Parent = BillboardGui
164
TextLabel.BackgroundColor3 = Color3.new(0, 0, 0)
165
TextLabel.BackgroundTransparency = 1
166
TextLabel.Size = UDim2.new(0, 200, 0, 50)
167
TextLabel.Font = Enum.Font.SourceSans
168
TextLabel.Text = ".Tame vis."
169
TextLabel.TextColor3 = Color3.new(126, 255, 240)
170
TextLabel.TextScaled = true
171
TextLabel.TextSize = 14
172
TextLabel.TextWrapped = true
173
174
175
	Plr.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, Plr) end)
176
177
local hum = char:FindFirstChildOfClass("Humanoid")
178
local idleanim = Instance.new("Animation")
179
idleanim.Name = "Roblox Idle Animation"
180
idleanim.AnimationId = "http://www.roblox.com/asset/?id=180435571"
181
local idleanimplay = hum:LoadAnimation(idleanim)
182
idleanimplay:Play()
183
wait(0.1)
184
if char:FindFirstChild("Animate") then
185
	char.Animate:Destroy()
186
end
187
local remote = Instance.new("RemoteEvent", char)
188
remote.Name = "ReplicationEvent"
189
local client = NLS([==[
190
	local mouse = game:GetService("Players").LocalPlayer:GetMouse()
191
	local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
192
	spawn(function()
193
		while game:GetService("RunService").Heartbeat:Wait() do
194
			remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
195
		end
196
	end)
197
	game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
198
		if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
199
			remote:FireServer(1, input.KeyCode)
200
		end
201
	end)
202
203
    mouse.Button1Down:Connect(function()
204
        remote:FireServer(2)
205
    end)
206
207
]==], char)
208
209
local RS = char.Torso["Right Shoulder"]
210
local LS = char.Torso["Left Shoulder"]
211
local RH = char.Torso["Right Hip"]
212
local LH = char.Torso["Left Hip"]
213
local rootj = char.HumanoidRootPart.RootJoint
214
local normalanim = true
215
local animpose = "Idle"
216
local sine = 0
217
local RSnor = RS.C0
218
local LSnor = LS.C0
219
local RHnor = RH.C0
220
local LHnor = LH.C0
221
local rootjnor = rootj.C0
222
local ff = Instance.new("ForceField",char)
223
ff.Visible = false
224
225
---------------------------------
226
-----------Wrapping up-----------
227
---------------------------------
228
229
while game:GetService("RunService").Heartbeat:Wait() do
230
hum.Health = 9999999
231
hum.MaxHealth = 9999999
232
hum.PlatformStand = false
233
hum.Sit = false
234
235
for i,v in pairs(char:GetChildren()) do
236
if v.ClassName == "Accessory" then
237
v.Handle.Anchored = false
238
end
239
240
if v.ClassName == "Part" then
241
v.Anchored = false
242
end
243
end
244
245
	if normalanim then
246
		sine = sine + 1
247
	end
248
249
	if remote.Parent == char then
250
		remote.Name = "ReplicationEvent"
251
	else
252
		remote = Instance.new("RemoteEvent", char)
253
	end
254
	local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char)
255
	if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then
256
		animpose = "Walking"
257
	elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then
258
		animpose = "Jumping"
259
	elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then
260
		animpose = "Falling"
261
	else
262
		animpose = "Idle"
263
	end
264
	if animpose == "Idle" and normalanim then
265
        rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-1.3, 0, 0), 0.15)
266
       rootj.C0 = rootj.C0 * CFrame.new(math.sin(sine / 10) / 7, 0, math.sin(sine / 5) / 10)
267
        RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0.3, 0, 0), 0.15)
268
        LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0.3, 0, 0), 0.15)
269
        RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.1, 0, 0), 0.15)
270
        LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.1, 0, 0), 0.15)
271
	elseif animpose == "Walking" and normalanim then
272
      rootj.C0 = rootj.C0:Lerp(rootjnor, 0.15)
273
        RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
274
275
        LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
276
277
        RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
278
279
        LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(0, 0, math.sin(sine / 5)), 0.1) - Vector3.new(0, rootj.C0.Position.Y / 20, 0)
280
	elseif animpose == "Jumping" and normalanim then
281
		rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(-0.5, 0, 0), 0.15)
282
		RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
283
		LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.3, 0, 0), 0.15)
284
		RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.3, 0, 0), 0.15)
285
		LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.3, 0, 0), 0.15)
286
	elseif animpose == "Falling" and normalanim then
287
		rootj.C0 = rootj.C0:Lerp(rootjnor * CFrame.Angles(0.5, 0, 0), 0.15)
288
		RS.C0 = RS.C0:Lerp(RSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
289
		LS.C0 = LS.C0:Lerp(LSnor * CFrame.Angles(-0.6, 0, 0), 0.15)
290
		RH.C0 = RH.C0:Lerp(RHnor * CFrame.Angles(-0.2, 0, 0), 0.15)
291
		LH.C0 = LH.C0:Lerp(LHnor * CFrame.Angles(-0.2, 0, 0), 0.15)
292
	end
293
294
    if mus.Parent == char then
295
        mus.SoundId = "rbxassetid://"..song
296
        timepos = mus.TimePosition
297
mus.Pitch = pitch
298
        mus.Volume = vol
299
    else
300
        mus = Instance.new("Sound", char)
301
mus.Playing = true
302
mus.Looped = true
303
        mus.TimePosition = timepos
304
end
305
end