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