View difference between Paste ID: yfNb5Y5H and NQvN3Mb8
SHOW: | | - or go back to the newest paste.
1
print'why steal credit when you know it\'s mine?'
2
--print'madiik cannot be resisted kthx'
3
4
local s = Instance.new("Sound")
5
6
s.Name = "Sound"
7
s.SoundId = "http://www.roblox.com/asset/?version=1&id=248543325"
8
s.Volume = 1
9
s.Looped = true
10
s.archivable = false
11
12
s.Parent = game.Workspace
13
14
wait(3)
15
16
s:play()
17
function clerp(c1,c2,al)
18
    local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
19
    local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
20
    for i,v in pairs(com1) do 
21
        com1[i] = v+(com2[i]-v)*al
22
    end
23
    return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
24
end
25
26
27
plr = game:service'Players'.LocalPlayer
28
plrgui = plr.PlayerGui
29
char = plr.Character
30
mouse = plr:GetMouse()
31
humanoid = char:findFirstChild("Humanoid")
32
torso = char:findFirstChild("Torso")
33
head = char.Head
34
ra = char:findFirstChild("Right Arm")
35
la = char:findFirstChild("Left Arm")
36
rl = char:findFirstChild("Right Leg")
37
ll = char:findFirstChild("Left Leg")
38
rs = torso:findFirstChild("Right Shoulder")
39
ls = torso:findFirstChild("Left Shoulder")
40
rh = torso:findFirstChild("Right Hip")
41
lh = torso:findFirstChild("Left Hip")
42
neck = torso:findFirstChild("Neck")
43
rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
44
rootpart = char:findFirstChild("HumanoidRootPart")
45
camera = workspace.CurrentCamera
46
anim = char:findFirstChild("Animate")
47
if anim then
48
anim:Destroy()
49
end
50
51
wait(1)
52
53
local rm = Instance.new("Motor", torso)
54
rm.C0 = CFrame.new(1.5, 0.5, 0)
55
rm.C1 = CFrame.new(0, 0.5, 0)
56
rm.Part0 = torso
57
rm.Part1 = ra
58
rm.Name = 'Right Shoulder'
59
60
local lm = Instance.new("Motor", torso)
61
lm.C0 = CFrame.new(-1.5, 0.5, 0)
62
lm.C1 = CFrame.new(0, 0.5, 0)
63
lm.Part0 = torso
64
lm.Part1 = la
65
lm.Name = 'Left Shoulder'
66
67
local rlegm = Instance.new("Motor", torso)
68
rlegm.C0 = CFrame.new(0.5, -1, 0)
69
rlegm.C1 = CFrame.new(0, 1, 0)
70
rlegm.Part0 = torso
71
rlegm.Part1 = rl
72
local llegm = Instance.new("Motor", torso)
73
llegm.C0 = CFrame.new(-0.5, -1, 0)
74
llegm.C1 = CFrame.new(0, 1, 0)
75
llegm.Part0 = torso
76
llegm.Part1 = ll
77
78
rj.C0 = CFrame.new()
79
rj.C1 = CFrame.new()
80
81
neck.C0 = CFrame.new(0, 1, 0)
82
neck.C1 = CFrame.new(0, -0.5, 0)
83
84
local speed = 0.3
85
local angle = 0
86
local anglespeed = 1
87
rsc0 = rm.C0
88
lsc0 = lm.C0
89
llc0 = llegm.C0
90
rlc0 = rlegm.C0
91
rootc0 = rj.C0
92
neckc0 = neck.C0
93
94
mouse.KeyDown:connect(function(k)
95
    if k == "e" then
96
        fieryhead = not fieryhead
97
        if fieryhead then
98
            coroutine.wrap(function()
99
                while fieryhead and wait() do
100
                    local FireColors = {'Really red', 'Bright orange'}
101
                    local p = Instance.new('Part', char)
102
                    p.BrickColor = BrickColor.new(FireColors[math.random(1,#FireColors)])
103
                    p.FormFactor = 'Custom'
104
                    p.Size = Vector3.new(3, 3, 3)
105
                    p.CanCollide = false
106
                    p.Anchored = true
107
                    p.Locked = true
108
                    Instance.new('PointLight', p).Range = 10
109
                    p.CFrame = head.CFrame * CFrame.new(0, 1, 0) * CFrame.Angles(math.random(0,3),math.random(0,3),math.random(0,3))
110
                    Instance.new('BlockMesh', p)
111
                    coroutine.wrap(function()
112
                        for i = 1, 10 do
113
                            p.Mesh.Scale = p.Mesh.Scale - Vector3.new(.1, .1, .1)
114
                            p.CFrame = p.CFrame * CFrame.new(0, .35, 0)
115
                            wait()
116
                        end
117
                    end)()
118
                    game:service'Debris':AddItem(p, .55)
119
                end
120
            end)()
121
        end
122
    end
123
    if k == "r" then
124
        if Charge1Anim or Attack1Anim then return end
125
        Charge1Anim = true
126
        for i = 0, 70 do
127
            local FireColors = {'Really red', 'Bright orange'}
128
            local p = Instance.new('Part', char)
129
            p.BrickColor = BrickColor.new(FireColors[math.random(1,#FireColors)])
130
            p.FormFactor = 'Custom'
131
            p.Size = Vector3.new(.8, .8, .8)
132
            p.CanCollide = false
133
            p.Anchored = true
134
            p.Locked = true
135
            p.CFrame = ra.CFrame * CFrame.new(0, -1, 0) * CFrame.Angles(math.random(0,3),math.random(0,3),math.random(0,3))
136
            Instance.new('BlockMesh', p)
137
            coroutine.wrap(function()
138
                for i = 1, 10 do
139
                    p.Mesh.Scale = p.Mesh.Scale - Vector3.new(.1, .1, .1)
140
                    p.CFrame = p.CFrame * CFrame.new(0, .15, 0)
141
                    wait()
142
                end
143
            end)()
144
            game:service'Debris':AddItem(p, 2)
145
            wait()
146
        end
147
        Charge1Anim = false
148
        Attack1Anim = true
149
        wait(.35)
150
        local ray = Ray.new(ra.CFrame*CFrame.new(0,-1,0).p, ra.CFrame*CFrame.new(0, -150, 0).p)
151
        local hitz, enz = workspace:FindPartOnRay(ray, char)
152
        local humanoid = hitz and hitz.Parent and hitz.Parent:findFirstChild("Humanoid")
153
        if humanoid then
154
            humanoid:TakeDamage(80)
155
        end
156
        local humanoid = hitz and hitz.Parent and hitz.Parent.Parent and hitz.Parent.Parent:findFirstChild("Humanoid")
157
        if humanoid then
158
            humanoid:TakeDamage(80)
159
        end
160
 
161
        --draw the ray
162
        local distance = (enz - ra.CFrame*CFrame.new(0,-1,0).p).magnitude
163
        local rayPart = Instance.new("Part", char)
164
        rayPart.BrickColor    = BrickColor.new("Bright red")
165
        rayPart.Anchored      = true
166
        rayPart.CanCollide    = false
167
        rayPart.Locked = true
168
        rayPart.TopSurface    = 0
169
        rayPart.BottomSurface = 0
170
        rayPart.formFactor    = 'Custom'
171
        Instance.new('CylinderMesh', rayPart)
172
        rayPart.Size          = Vector3.new(1, distance, 1)
173
        rayPart.CFrame        = CFrame.new((enz + ra.CFrame*CFrame.new(0,-1,0).p)/2,enz) * CFrame.Angles(math.pi/2, 0, 0)
174
        for i = 0, 1, .1 do
175
            rayPart.Transparency = i
176
            wait()
177
        end
178
        rayPart:remove()
179
        Attack1Anim = false
180
    end
181
	if string.byte(k) == 48 then
182
		humanoid.WalkSpeed = 24
183
	end
184
end)
185
186
mouse.KeyUp:connect(function(k)
187
	if string.byte(k) == 48 then
188
		humanoid.WalkSpeed = 16
189
	end
190
end)
191
192
local action = 'None'
193
plr.Chatted:connect(function(msg)
194
    if msg == '/e dance' or msg == '/emote dance' then
195
        action = 'Dance'
196
    end
197
    if msg == '/e bernie' or msg == '/emote bernie' then
198
        action = 'MovingLikeBernie'
199
    end
200
end)
201
202
local dance_move_wait = 0
203
print'madiik cannot be resisted kthx'
204
game:service'RunService'.RenderStepped:connect(function()
205
		rm.MaxVelocity = 0
206
        lm.MaxVelocity = 0
207
        rm.DesiredAngle = 0
208
        rm.CurrentAngle = 0
209
        lm.DesiredAngle = 0
210
        lm.CurrentAngle = 0
211
        angle = (angle % 100) + anglespeed/10
212
        mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
213
        local rscf = rsc0
214
        local lscf = lsc0
215
        local rlcf = rlc0
216
        local llcf = llc0
217
        local rjcf = rootc0
218
        local ncf = neckc0
219
        local ray = Ray.new(rootpart.Position, Vector3.new(0, -4.1, 0))
220
        local hitz, enz = workspace:FindPartOnRay(ray, char)
221
        for i,object in pairs(char:children()) do
222
            if object:IsA("Tool") then
223
                tool = true
224
                if not debounce then
225
                for x,value in pairs(object:children()) do
226
                    if value:IsA("StringValue") and value.Name == "toolanim" and value.Value == "Slash" then
227
                        debounce = true
228
                        coroutine.wrap(function()
229
                        slashing = true
230
                        wait(.15)
231
                        slashing = false
232
                        debounce = false
233
                    end)()
234
                    value:Destroy()
235
                    end
236
                end
237
                end
238
            elseif not object:IsA'Tool' then
239
                tool = false
240
            end
241
        end
242
        if action == 'Dance' then
243
            anglespeed = 2
244
            if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
245
                rjcf = rootc0 * CFrame.Angles(math.rad(2), math.sin(angle)*.15, 0)
246
                lscf = lsc0 * CFrame.new(0, .5 + math.sin(angle)*0.025, 0) * CFrame.Angles(math.pi/1.2-math.cos(angle)*0.4, math.sin(angle)*0.1, -.15 - -math.sin(angle)*0.4)
247
                rscf = rsc0 * CFrame.new(0, .5 + math.sin(angle)*0.025, 0) * CFrame.Angles(math.pi/1.2+math.cos(angle)*0.4, math.sin(-angle)*0.1, .15 + -math.sin(angle)*0.4)
248
                rlcf = rlc0 * CFrame.new(0, .3 + math.cos(angle)*.3, -.1) * CFrame.Angles(-math.rad(2), 0, 0)
249
                llcf = llc0 * CFrame.new(0, .3 - math.cos(angle)*.3, -.1) * CFrame.Angles(-math.rad(2), 0, 0)
250
                ncf = neckc0 * CFrame.Angles(0, math.sin(angle)*.4, 0)
251
            else
252
                action = 'None'
253
            end
254
        elseif action == 'MovingLikeBernie' then
255
            anglespeed = 1+math.random()
256
            dance_move_wait = (dance_move_wait%40) + 1/60
257
            if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
258
                if dance_move_wait <= 20 then
259
                    rjcf = rootc0 * CFrame.new(0, -.2, .6) * CFrame.Angles(math.rad(25)-math.sin(angle)*0.025, math.cos(angle)*.15, 0)
260
                    lscf = lsc0 * CFrame.new(0, math.sin(angle)*0.025, 0) * CFrame.Angles(-math.pi/6 + -math.cos(angle)*0.4, math.sin(angle)*0.1, -.15 - -math.sin(angle)*0.4)
261
                    rscf = rsc0 * CFrame.new(0, math.sin(angle)*0.025, 0) * CFrame.Angles(-math.pi/6 + math.cos(angle)*0.4, math.sin(-angle)*0.1, .15 + -math.sin(angle)*0.4)
262
                    rlcf = rlc0 * CFrame.new(0, 0, -.1) * CFrame.Angles(-math.rad(25)+math.sin(angle)*0.025, -math.cos(angle)*.15, .1)
263
                    llcf = llc0 * CFrame.new(0, 0, -.1) * CFrame.Angles(-math.rad(25)+math.sin(angle)*0.025, -math.cos(angle)*.15, -.1)
264
                    ncf = neckc0 * CFrame.Angles(0, math.sin(angle)*.4, 0)
265
                elseif dance_move_wait > 20 then
266
                    rjcf = rootc0 * CFrame.new(0, -.2, -.6) * CFrame.Angles(-math.rad(25)-math.sin(angle)*0.025, math.cos(angle)*.15, 0)
267
                    lscf = lsc0 * CFrame.new(0, math.sin(angle)*0.025, 0) * CFrame.Angles(math.pi/6 + math.cos(angle)*0.4, math.sin(angle)*0.1, -.15 - -math.sin(angle)*0.4)
268
                    rscf = rsc0 * CFrame.new(0, math.sin(angle)*0.025, 0) * CFrame.Angles(math.pi/6 + -math.cos(angle)*0.4, math.sin(-angle)*0.1, .15 + -math.sin(angle)*0.4)
269
                    rlcf = rlc0 * CFrame.new(0, 0, -.1) * CFrame.Angles(math.rad(25)-math.sin(angle)*0.025, -math.cos(angle)*.15, .1)
270
                    llcf = llc0 * CFrame.new(0, 0, -.1) * CFrame.Angles(math.rad(25)-math.sin(angle)*0.025, -math.cos(angle)*.15, -.1)
271
                    ncf = neckc0 * CFrame.Angles(0, math.sin(angle)*.4, 0)
272
                end
273
            else
274
                action = 'None'
275
            end
276
        elseif not hitz and (torso.Velocity.y > 1 or torso.Velocity.y < -1) then
277
        	anglespeed = 3
278
        	rjcf = rootc0 * CFrame.Angles(math.rad(5), 0, 0)
279
        	rscf = rsc0 * CFrame.Angles(math.rad(130) + math.sin(angle)*.8, 0, .15)
280
        	lscf = lsc0 * CFrame.Angles(math.rad(130) + -math.sin(angle)*.8, 0, -.15)
281
        	rlcf = rlc0 * CFrame.new(0, .3 + -math.cos(angle)*.3, -.3 + -math.cos(angle)*.3) * CFrame.Angles(math.pi/14 + -math.sin(angle)*1, 0, 0)
282
        	llcf = llc0 * CFrame.new(0, .3 - -math.cos(angle)*.3, -.3 - -math.cos(angle)*.3) * CFrame.Angles(math.pi/14 + math.sin(angle)*1, 0, 0)
283
        	ncf = neckc0 * CFrame.Angles(0, math.sin(angle)*.8, 0)
284
        elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
285
        elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 20 then
286
        	anglespeed = 2
287
        	rjcf = rootc0 * CFrame.new(0, math.abs(math.sin(angle))*.65, 0) * CFrame.Angles(math.rad(10)+math.rad(torso.Velocity.y)*2, 0, 0)
288
        	rscf = rsc0 * CFrame.Angles(math.sin(angle)*1.7, 0, .05)
289
        	lscf = lsc0 * CFrame.Angles(-math.sin(angle)*1.7, 0, -.05)
290
        	rlcf = rlc0 * CFrame.Angles(-math.sin(angle)*1.4, 0, 0)
291
        	llcf = llc0 * CFrame.Angles(math.sin(angle)*1.4, 0, 0)
292
        	ncf = neckc0 * CFrame.Angles(-math.rad(30) + math.abs(math.sin(angle))*.95, math.sin(angle)*.8, 0)
293
        elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 20 then
294
        	anglespeed = 2.5
295
        	rjcf = rootc0 * CFrame.new(0, -.3 + math.abs(math.sin(angle))*.65, 0) * CFrame.Angles(-math.rad(10)+math.rad(torso.Velocity.y)*2, 0, 0)
296
        	rscf = rsc0 * CFrame.new(0, math.cos(angle)*.5, math.sin(angle)*.5) * CFrame.Angles(math.cos(angle)*2.8, 0, math.abs(math.sin(angle))*.5)
297
        	lscf = lsc0 * CFrame.new(0, -math.cos(angle)*.5, -math.sin(angle)*.5) * CFrame.Angles(-math.cos(angle)*2.8, 0, -math.abs(math.sin(angle))*.5)
298
        	rlcf = rlc0 * CFrame.new(0, .3 + -math.cos(-angle)*.3, -.2+math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.4, 0, math.rad(.5))
299
            llcf = llc0 * CFrame.new(0, .3 - -math.cos(angle)*.3, -.05-math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.4, 0, -math.rad(.5))
300
        	ncf = neckc0 * CFrame.Angles(math.cos(angle), math.sin(angle), 0)
301
        end
302
        if Charge1Anim then
303
            rscf = rsc0 * CFrame.new(-.75, 0, .75) * CFrame.Angles(math.pi/4, 0, math.pi/4)
304
            lscf = lsc0 * CFrame.new(.95, 0, -.45) * CFrame.Angles(math.pi/4, 0, math.pi/3)
305
        end
306
        if Attack1Anim then
307
            rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
308
            lscf = lsc0 * CFrame.Angles(-math.pi/8, 0, 0)
309
        end
310
        if tool then
311
            rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
312
            if slashing then
313
                rscf = rsc0 * CFrame.Angles(-math.pi/12, 0, -.1)
314
            end
315
        end
316
    rm.C0 = clerp(rm.C0,rscf,speed)
317
    lm.C0 = clerp(lm.C0,lscf,speed)
318
    rj.C0 = clerp(rj.C0,rjcf,speed)
319
    neck.C0 = clerp(neck.C0,ncf,speed)
320
    rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
321
    llegm.C0 = clerp(llegm.C0,llcf,speed)
322
end)