View difference between Paste ID: gx77LMBz and 0ge1TE6q
SHOW: | | - or go back to the newest paste.
1
print("by not 228228228229UE, by my friend")
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
4
do
5
    print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
6
    script.Parent = Player.Character
7
 
8
    --RemoteEvent for communicating
9
    local Event = Instance.new("RemoteEvent")
10
    Event.Name = "UserInput_Event"
11
 
12
    --Fake event to make stuff like Mouse.KeyDown work
13
    local function fakeEvent()
14
        local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
15
        t.connect = t.Connect
16
        return t
17
    end
18
 
19
    --Creating fake input objects with fake variables
20
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
21
    local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
22
    local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
23
        CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
24
    end}
25
    --Merged 2 functions into one by checking amount of arguments
26
    CAS.UnbindAction = CAS.BindAction
27
 
28
    --This function will trigger the events that have been :Connect()'ed
29
    local function te(self,ev,...)
30
        local t = m[ev]
31
        if t and t._fakeEvent and t.Function then
32
            t.Function(...)
33
        end
34
    end
35
    m.TrigEvent = te
36
    UIS.TrigEvent = te
37
 
38
    Event.OnServerEvent:Connect(function(plr,io)
39
        if plr~=Player then return end
40
        if io.isMouse then
41
            m.Target = io.Target
42
            m.Hit = io.Hit
43
        else
44
            local b = io.UserInputState == Enum.UserInputState.Begin
45
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
46
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
47
            end
48
            for _,t in pairs(CAS.Actions) do
49
                for _,k in pairs(t.Keys) do
50
                    if k==io.KeyCode then
51
                        t.Function(t.Name,io.UserInputState,io)
52
                    end
53
                end
54
            end
55
            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
56
            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
57
        end
58
    end)
59
    Event.Parent = NLS([==[
60
    local Player = game:GetService("Players").LocalPlayer
61
    local Event = script:WaitForChild("UserInput_Event")
62
 
63
    local UIS = game:GetService("UserInputService")
64
    local input = function(io,a)
65
        if a then return end
66
        --Since InputObject is a client-side instance, we create and pass table instead
67
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
68
    end
69
    UIS.InputBegan:Connect(input)
70
    UIS.InputEnded:Connect(input)
71
 
72
    local Mouse = Player:GetMouse()
73
    local h,t
74
    --Give the server mouse data 30 times every second, but only if the values changed
75
    --If player is not moving their mouse, client won't fire events
76
    while wait(1/30) do
77
        if h~=Mouse.Hit or t~=Mouse.Target then
78
            h,t=Mouse.Hit,Mouse.Target
79
            Event:FireServer({isMouse=true,Target=t,Hit=h})
80
        end
81
    end]==],Player.Character)
82
    Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
83
end
84
local Plr=owner
85
local Chr=Plr.Character
86-
if Chr.Name ~= "dragen1576" and Chr.Name ~= "Rufus14" and Chr.Name ~= "228228228229UE" then
86+
if Chr.Name ~= "dragen1576" and Chr.Name ~= "lafur2" and Chr.Name ~= "228228228229UE" then
87
	print('ask dragen1576 to be added in whitelist')
88
    Chr:BreakJoints()
89
end
90
local Hum=Chr.Humanoid
91
local Hed=Chr.Head
92
local Trs=Chr.Torso
93
local RA=Chr['Right Arm']
94
local LA=Chr['Left Arm']
95
local RL=Chr['Right Leg']
96
local LL=Chr['Left Leg']
97
local Nck = Trs["Neck"]
98
local root=Chr.HumanoidRootPart
99
local rootj=root.RootJoint
100
local RootCF=CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
101
local RHCF=CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
102
local LHCF=CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
103
Ncko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
104
RW=Instance.new("Weld") 
105
LW=Instance.new("Weld")
106
RH=Trs["Right Hip"]
107
LH=Trs["Left Hip"]
108
PS=1
109
sine=1
110
change=1
111
Nck.Parent=Trs
112
Hed.Mesh.MeshId="rbxassetid://625943420"
113
Hed.Mesh.TextureId="rbxassetid://625943441"
114
Hed.Mesh.Scale=Vector3.new(2, 2, 2)
115
--Pineapple.TextureId="rbxassetid://625943441"
116
----Script Audio----
117
CurTheme=Instance.new("Sound",Trs)
118
CurTheme.Name="Pinnaple"
119
CurTheme.Looped=true
120
CurTheme.SoundId="rbxassetid://2857752354"
121
CurTheme.Volume=1
122
CurTheme:play()
123
sickee=Instance.new("FlangeSoundEffect", CurTheme)
124
for i,v in pairs(Chr:children()) do
125
    if v:IsA("Hat") then
126
        v:Destroy()
127
    end
128
end
129
for i,v in pairs(Chr:children()) do
130
    if v:IsA("Accessory") then
131
        v:Destroy()
132
    end
133
end
134
for i,v in pairs(Chr:children()) do
135
    if v:IsA("Hair") then
136
        v:Destroy()
137
    end
138
end
139
----Basic Values----
140
cam = game.Workspace.CurrentCamera
141
CF = CFrame.new
142
angles = CFrame.Angles
143
attack = false
144
Euler = CFrame.fromEulerAnglesXYZ
145
Rad = math.rad
146
IT = Instance.new
147
BrickC = BrickColor.new
148
Cos = math.cos
149
Acos = math.acos
150
Sin = math.sin
151
Asin = math.asin
152
Abs = math.abs
153
Mrandom = math.random
154
Floor = math.floor
155
local idle = 0
156
Nck.C0 = Ncko * CFrame.new(0 * PS, 0 * PS, 0 + ((1 * PS) - 1)) * angles(Rad(0), Rad(0), Rad(0))
157
----Baisc Functions----
158
159
--lmao still remember!
160
function swait(num)
161
	if num == 0 or num == nil then
162
		game:service("RunService").Stepped:wait(0)
163
	else
164
		for i = 0, num do
165
			game:service("RunService").Stepped:wait(0)
166
		end
167
	end
168
end
169
function thread(f)
170
	coroutine.resume(coroutine.create(f))
171
end
172
function clerp(a, b, t)
173
	local qa = {
174
		QuaternionFromCFrame(a)
175
	}
176
	local qb = {
177
		QuaternionFromCFrame(b)
178
	}
179
	local ax, ay, az = a.x, a.y, a.z
180
	local bx, by, bz = b.x, b.y, b.z
181
	local _t = 1 - t
182
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
183
end
184
function QuaternionFromCFrame(cf)
185
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
186
	local trace = m00 + m11 + m22
187
	if trace > 0 then
188
		local s = math.sqrt(1 + trace)
189
		local recip = 0.5 / s
190
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
191
	else
192
		local i = 0
193
		if m00 < m11 then
194
			i = 1
195
		end
196
		if m22 > (i == 0 and m00 or m11) then
197
			i = 2
198
		end
199
		if i == 0 then
200
			local s = math.sqrt(m00 - m11 - m22 + 1)
201
			local recip = 0.5 / s
202
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
203
		elseif i == 1 then
204
			local s = math.sqrt(m11 - m22 - m00 + 1)
205
			local recip = 0.5 / s
206
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
207
		elseif i == 2 then
208
			local s = math.sqrt(m22 - m00 - m11 + 1)
209
			local recip = 0.5 / s
210
			return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
211
		end
212
	end
213
end
214
function QuaternionToCFrame(px, py, pz, x, y, z, w)
215
	local xs, ys, zs = x + x, y + y, z + z
216
	local wx, wy, wz = w * xs, w * ys, w * zs
217
	local xx = x * xs
218
	local xy = x * ys
219
	local xz = x * zs
220
	local yy = y * ys
221
	local yz = y * zs
222
	local zz = z * zs
223
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
224
end
225
function QuaternionSlerp(a, b, t)
226
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
227
	local startInterp, finishInterp
228
	if cosTheta >= 1.0E-4 then
229
		if 1 - cosTheta > 1.0E-4 then
230
			local theta = math.acos(cosTheta)
231
			local invSinTheta = 1 / Sin(theta)
232
			startInterp = Sin((1 - t) * theta) * invSinTheta
233
			finishInterp = Sin(t * theta) * invSinTheta
234
		else
235
			startInterp = 1 - t
236
			finishInterp = t
237
		end
238
	elseif 1 + cosTheta > 1.0E-4 then
239
		local theta = math.acos(-cosTheta)
240
		local invSinTheta = 1 / Sin(theta)
241
		startInterp = Sin((t - 1) * theta) * invSinTheta
242
		finishInterp = Sin(t * theta) * invSinTheta
243
	else
244
		startInterp = t - 1
245
		finishInterp = t
246
	end
247
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
248
end
249
function rayCast(Position, Direction, Range, Ignore)
250
	return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
251
end
252
local RbxUtility = LoadLibrary("RbxUtility")
253
local Create = RbxUtility.Create
254
local ANIMATOR = Hum.Animator
255
local ANIMATE = Chr.Animate
256
ANIMATE.Parent = nil
257
ANIMATOR.Parent = nil
258
----Main Part Of Script----
259
function step(num)
260
if num == 0 or num == nil then
261
game:GetService("RunService").Stepped:Wait()
262
elseif num ~= 0 or num ~= nil then
263
game:GetService("RunService").Stepped:Wait(num)
264
end
265
end
266
mouse.Button1Down:Connect(function()
267
local p = Instance.new("Part", Chr)--the bullet u can customize it
268
        p.Anchored = true
269
        p.Transparency = 0
270
        p.Material = "Neon"
271
        p.Color=Color3.new(0,0,0)
272
        p.CanCollide = false
273
    local start = Trs.Position +Vector3.new(0,0,0) --start point u set
274
    local endp = mouse.Hit.p
275
    local ray = Ray.new(start, (endp-start).unit * 999)--the ray we are using
276
        local hit,position = workspace:FindPartOnRayWithIgnoreList(ray, {Chr, Trs})--this finds the parts that the ray is touching with a list of things the ray has to ignore
277
        local mag = (start-position).magnitude + 2--magnitude of the position
278
        p.Size = Vector3.new(0.1,0.1,mag)
279
        p.CFrame = CFrame.new(start, position) *CFrame.new(0,0,-mag/2)
280
spawn(function()
281
            for i = 1, 10 do
282
            swait()
283
                p.Transparency = i/10
284
                p.Size = Vector3.new(1,1,mag)
285
              step()
286
            end
287
            p:Destroy()
288
        end)
289
p.Touched:Connect(function(hit)
290
if hit ~= owner and hit.name ~= "pineapple" and hit.Parent.name ~= owner.name then
291
--pineapplekill=Instance.new("Part", workspace)
292
--pineapplekill.name = "pineapple"
293
--pineapplekill.Position=hit.Position
294
--hit:Destroy()
295
Pineapplemanmesh=Instance.new("SpecialMesh", hit)
296
Pineapplemanmesh.MeshId="rbxassetid://625943420"
297
Pineapplemanmesh.TextureId="rbxassetid://625943441"
298
Pineapplemanmesh.Scale=Vector3.new(2, 2, 2)
299
end
300
end)
301
end)
302
303
----Stuff that will make animation go normally----
304
necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
305
RSH, LSH = nil, nil 
306
RW = Instance.new("Weld") 
307
LW = Instance.new("Weld")
308
RH = Trs["Right Hip"]
309
LH = Trs["Left Hip"]
310
RSH = Trs["Right Shoulder"] 
311
LSH = Trs["Left Shoulder"] 
312
RSH.Parent = nil 
313
LSH.Parent = nil 
314
RW.Name = "RW"
315
RW.Part0 = Trs 
316
RW.C0 = CF(1.5, 0.5, 0)
317
RW.C1 = CF(0, 0.5, 0) 
318
RW.Part1 = RA
319
RW.Parent = Trs 
320
LW.Name = "LW"
321
LW.Part0 = Trs 
322
LW.C0 = CF(-1.5, 0.5, 0)
323
LW.C1 = CF(0, 0.5, 0) 
324
LW.Part1 = LA
325
LW.Parent = Trs
326
vt = Vector3.new
327
Effects = {}
328
----------------------------------------------------------------------------------
329
rootj.Parent = root
330
Nck.Parent = Trs
331
RW.Parent = Trs
332
LW.Parent = Trs
333
RH.Parent = Trs
334
LH.Parent = Trs
335
----------------------------------------------------------------------------------
336
rootj.C0 = RootCF * CF(0 * PS, 0 * PS, 0 * PS) * angles(Rad(0), Rad(0), Rad(0))
337
rootj.C1 = RootCF * CF(0 * PS, 0 * PS, 0 * PS) * angles(Rad(0), Rad(0), Rad(0))
338
Nck.C0 = necko * CF(-0.1 * PS, 0.1 * PS, 0.5 + ((1 * PS) - 1)) * angles(Rad(0), Rad(0), Rad(0))
339
Nck.C1 = CF(0 * PS, -0.80 * PS, 0 * PS) * angles(Rad(-90), Rad(0), Rad(180))
340
RW.C0 = CF(1.5 * PS, 0.5 * PS, 0 * PS) * angles(Rad(0), Rad(0), Rad(0))
341
LW.C0 = CF(-1.5 * PS, 0.5 * PS, 0 * PS) * angles(Rad(0), Rad(0), Rad(0))
342
----------------------------------------------------------------------------------
343
RH.C0 = CF(1 * PS, -1 * PS, 0 * PS) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
344
LH.C0 = CF(-1 * PS, -1 * PS, 0 * PS) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
345
RH.C1 = CF(0.5 * PS, 1 * PS, 0 * PS) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
346
LH.C1 = CF(-0.5 * PS, 1 * PS, 0 * PS) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
347
----Animation and stuff----
348
while true do
349
	swait()
350
----Player Look Change----
351
----Animations----
352
	sine = sine + change
353
	local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
354
	local velderp = root.Velocity.y
355
	hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4* PS, char)	
356
	if hitfloor == nil then
357
	    cankick = true
358
    else
359
        cankick = false
360
        end
361
	
362
	
363
		if attack == false then
364
			idle = idle + 1
365
		else
366
			idle = 0
367
		end
368
		if 1 < root.Velocity.y and hitfloor == nil then
369
			Anim = "Jump"
370
			if attack == false then
371
			    Hum.CameraOffset = Hum.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
372
				rootj.C0 = clerp(rootj.C0, RootCF * CF(0* PS, 0* PS, -0.1 + 0.1 * Cos(sine / 20)* PS) * angles(Rad(-16), Rad(0), Rad(0)), 0.15)
373
374
				RH.C0 = clerp(RH.C0, CF(1* PS, -.2 - 0.1 * Cos(sine / 20)* PS, -.3* PS) * RHCF * angles(Rad(-1.5), Rad(0), Rad(0)), 0.15)
375
				LH.C0 = clerp(LH.C0, CF(-1* PS, -.9 - 0.1 * Cos(sine / 20), -0.5* PS) * LHCF * angles(Rad(-1.5), Rad(0), Rad(0)), 0.15)
376
				RW.C0 = clerp(RW.C0, CF(1.5* PS, 0.5 + 0.02 * Sin(sine / 20)* PS, 0* PS) * angles(Rad(25), Rad(-0.6), Rad(13 + 4.5 * Sin(sine / 20))), 0.1)
377
				LW.C0 = clerp(LW.C0, CF(-1.5* PS, 0.5 + 0.02 * Sin(sine / 20)* PS, 0* PS) * angles(Rad(25), Rad(-0.6), Rad(-13 - 4.5 * Sin(sine / 20))), 0.1)
378
			end
379
		elseif -1 > root.Velocity.y and hitfloor == nil then
380
			Anim = "Fall"
381
			if attack == false then
382
			    Hum.CameraOffset = Hum.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
383
				rootj.C0 = clerp(rootj.C0, RootCF * CF(0* PS, 0* PS, -0.1 + 0.1 * Cos(sine / 20)* PS) * angles(Rad(24), Rad(0), Rad(0)), 0.15)
384
385
				RH.C0 = clerp(RH.C0, CF(1* PS, -1 - 0.1 * Cos(sine / 20)* PS, -0.2* PS) * RHCF * angles(Rad(-6), Rad(0), Rad(0)), 0.3)
386
				LH.C0 = clerp(LH.C0, CF(-1* PS, -1 - 0.1 * Cos(sine / 20)* PS, -0.4* PS) * LHCF * angles(Rad(-5), Rad(0), Rad(0)), 0.11)
387
				RW.C0 = clerp(RW.C0, CF(1.5* PS, 0.5 + 0.02 * Sin(sine / 20)* PS, 0* PS) * angles(Rad(64), Rad(-.3), Rad(41 + 4* Sin(sine / 2))), 0.1)
388
				LW.C0 = clerp(LW.C0, CF(-1.5* PS, 0.5 + 0.02 * Sin(sine / 20)* PS, 0* PS) * angles(Rad(53), Rad(-.5), Rad(-43 - 4 * Sin(sine / 32))), 0.1)
389
			end
390
		elseif torvel < 1 and hitfloor ~= nil  then
391
			Anim = "Idle"
392
			change = 1
393
			if attack == false then
394
			    Hum.CameraOffset = Hum.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
395
				rootj.C0 = clerp(rootj.C0, RootCF * CF(0* PS, 0* PS, 0* PS * Cos(sine / 15)) * angles(Rad(0), Rad(0), Rad(0)), 0.1)
396
				RH.C0 = clerp(RH.C0, CF(1* PS, -1 - 0 * Cos(sine / 15)* PS, 0* PS) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(-1), Rad(0), Rad(0)), 0.1)
397
				LH.C0 = clerp(LH.C0, CF(-1* PS, -1 - 0 * Cos(sine / 15)* PS, 0* PS) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(-1), Rad(0), Rad(0)), 0.1)
398
				RW.C0 = clerp(RW.C0, CF(1.5* PS, 0.5 + 0 * Sin(sine / 14)* PS, 0* PS) * angles(Rad(0), Rad(1 + 1 * Sin(sine / 12)), Rad(1 + 2 * Sin(sine / 12))), 0.1)
399
				LW.C0 = clerp(LW.C0, CF(-1.5* PS, 0.5 + 0 * Sin(sine / 14)* PS, 0* PS) * angles(Rad(0), Rad(1 - 1 * Sin(sine / 12)), Rad(-1 - 2 * Sin(sine / 12))), 0.1)
400
			end
401
		elseif torvel > 2 and torvel < 22 and hitfloor ~= nil then
402
			Anim = "Walk"
403
			change = 1
404
			if attack == false then
405
			    Hum.CameraOffset = Hum.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
406
				rootj.C0 = clerp(rootj.C0, RootCF * CF(0* PS, 0* PS, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7* PS) * angles(Rad(3 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15)
407
408
				RH.C0 = clerp(RH.C0, CF(1* PS, -0.8 - 0.5 * Cos(sine / 7) / 2* PS, 0.6 * Cos(sine / 7) / 2* PS)  * angles(Rad(-15 - 15 * Cos(sine / 7)) - RL.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
409
         		LH.C0 = clerp(LH.C0, CF(-1* PS, -0.8 + 0.5 * Cos(sine / 7) / 2* PS, -0.6 * Cos(sine / 7) / 2* PS) * angles(Rad(-15 + 15 * Cos(sine / 7)) + LL.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
410
				RW.C0 = clerp(RW.C0, CF(1.5* PS, 0.5 + 0.05 * Sin(sine / 7)* PS, 0* PS) * angles(Rad(56)  * Cos(sine / 7) , Rad(20 * Cos(sine / 7)), Rad(6) - RA.RotVelocity.Y / 75), 0.1)
411
				LW.C0 = clerp(LW.C0, CF(-1.5* PS, 0.5 + 0.05 * Sin(sine / 7)* PS, 0* PS) * angles(Rad(-56)  * Cos(sine / 7) , Rad(20 * Cos(sine / 7)) ,	Rad(-6) + LA.RotVelocity.Y / 75), 0.1)
412
			end
413
			
414
		end
415
	end