View difference between Paste ID: abFkjuVY and 8q1msquZ
SHOW: | | - or go back to the newest paste.
1
print([[
2
___________________________________
3
  
4
Booty Offender // A Kyutatsuki13's script
5
Build 0001
6
Credit to Ethanhong that gave me this idea ;)
7
https://discord.gg/DueqyJ8
8
  
9
___________________________________
10
]])
11
-- This script has been converted to FE by iPxter
12
13
14
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
15
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
16
do
17
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
18
	script.Parent = Player.Character
19
20
	--RemoteEvent for communicating
21
	local Event = Instance.new("RemoteEvent")
22
	Event.Name = "UserInput_Event"
23
24
	--Fake event to make stuff like Mouse.KeyDown work
25
	local function fakeEvent()
26
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
27
		t.connect = t.Connect
28
		return t
29
	end
30
31
	--Creating fake input objects with fake variables
32
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
33
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
34
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
35
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
36
	end}
37
	--Merged 2 functions into one by checking amount of arguments
38
	CAS.UnbindAction = CAS.BindAction
39
40
	--This function will trigger the events that have been :Connect()'ed
41
	local function te(self,ev,...)
42
		local t = m[ev]
43
		if t and t._fakeEvent and t.Function then
44
			t.Function(...)
45
		end
46
	end
47
	m.TrigEvent = te
48
	UIS.TrigEvent = te
49
50
	Event.OnServerEvent:Connect(function(plr,io)
51
	    if plr~=Player then return end
52
		if io.isMouse then
53
			m.Target = io.Target
54
			m.Hit = io.Hit
55
		else
56
			local b = io.UserInputState == Enum.UserInputState.Begin
57
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
58
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
59
			end
60
			for _,t in pairs(CAS.Actions) do
61
				for _,k in pairs(t.Keys) do
62
					if k==io.KeyCode then
63
						t.Function(t.Name,io.UserInputState,io)
64
					end
65
				end
66
			end
67
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
68
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
69
	    end
70
	end)
71
	Event.Parent = NLS([==[
72
	local Player = game:GetService("Players").LocalPlayer
73
	local Event = script:WaitForChild("UserInput_Event")
74
75
	local UIS = game:GetService("UserInputService")
76
	local input = function(io,a)
77
		if a then return end
78
		--Since InputObject is a client-side instance, we create and pass table instead
79
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
80
	end
81
	UIS.InputBegan:Connect(input)
82
	UIS.InputEnded:Connect(input)
83
84
	local Mouse = Player:GetMouse()
85
	local h,t
86
	--Give the server mouse data 30 times every second, but only if the values changed
87
	--If player is not moving their mouse, client won't fire events
88
	while wait(1/30) do
89
		if h~=Mouse.Hit or t~=Mouse.Target then
90
			h,t=Mouse.Hit,Mouse.Target
91
			Event:FireServer({isMouse=true,Target=t,Hit=h})
92
		end
93
	end]==],Player.Character)
94
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
95
end
96
97
warn("You're whitelisted, "..game:GetService("Players").LocalPlayer.Name.." :)")
98
99
local p = owner
100
local char = p.Character
101
local larm = char:WaitForChild("Left Arm")
102
local rarm = char:WaitForChild("Right Arm")
103
local lleg = char:WaitForChild("Left Leg")
104
local rleg = char:WaitForChild("Right Leg")
105
local hed = char:WaitForChild("Head")
106
local torso = char:WaitForChild("Torso")
107
local root = char:WaitForChild("HumanoidRootPart")
108
local hum = char:FindFirstChildOfClass("Humanoid")
109
local debris = game:GetService("Debris")
110
local input = game:GetService("UserInputService")
111
local run = game:GetService("RunService")
112
local rs = run.RenderStepped
113
local wingpose = "Idle"
114
local DebrisModel = Instance.new("Model",char)
115
DebrisModel.Name = "Debris"
116
repeat rs:wait() until p.CharacterAppearanceLoaded
117
118
noidle = false
119
shift = false
120
control = false
121
122
----------------------------------------------------------------------------
123
124
function rswait(value)
125
  if value ~= nil and value ~= 0 then
126
    for i=1,value do
127
     rs:wait()
128
    end
129
  else
130
    rs:wait()
131
  end
132
end
133
134
----------------------------------------------------------------------------
135
mouse.KeyDown:connect(function(key)
136
	if attack == false then
137
		if key == 'z' then
138
		BURN_IN_HELL()	
139
		elseif key == 'x' then
140
		Destruction()
141
		elseif key == 'c' then
142
		
143
		elseif key == 't' then
144
			chatfunc("o yes", BrickColor.new("Black").Color)
145
			CreateSound("132073625", hed, 500, 1)
146
		end
147
	end
148
end)
149
150
local timeposition = 0
151
152
function music(id)
153
if id == "Stop" then
154
if not torso:FindFirstChild("MusicRuin") then
155
soundz = Instance.new("Sound",torso)
156
end
157
soundz:Stop()
158
else
159
if not torso:FindFirstChild("MusicRuin") then
160
soundz = Instance.new("Sound",torso)
161
for i=1,2 do
162
local equalizer = Instance.new("EqualizerSoundEffect",soundz)
163
equalizer.HighGain = 6
164
equalizer.MidGain = 0
165
equalizer.LowGain = 6
166
end
167
end
168
soundz.Volume = 10
169
soundz.Name = "MusicRuin"
170
soundz.Looped = true
171
soundz.PlaybackSpeed = 1
172
soundz.SoundId = "rbxassetid://"..id
173
soundz:Stop()
174
soundz:Play()
175
end
176
end
177
178
----------------------------------------------------------------------------
179
180
function lerp(a, b, t)
181
  return a + (b - a)*t
182
end
183
184
----------------------------------------------------------------------------
185
186
function Lerp(c1,c2,al)
187
  local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
188
  local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
189
  for i,v in pairs(com1) do
190
    com1[i] = v+(com2[i]-v)*al
191
  end
192
  return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
193
end
194
195
----------------------------------------------------------------------------
196
197
function slerp(a, b, t)
198
  dot = a:Dot(b)
199
  if dot > 0.99999 or dot < -0.99999 then
200
    return t <= 0.5 and a or b
201
  else
202
    r = math.acos(dot)
203
    return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
204
  end
205
end
206
207
----------------------------------------------------------------------------
208
209
function clerp(c1,c2,al)
210
211
  local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
212
213
  local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
214
215
  for i,v in pairs(com1) do
216
217
    com1[i] = lerp(v,com2[i],al)
218
219
  end
220
221
  return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
222
223
end
224
225
----------------------------------------------------------------------------
226
227
function findAllNearestTorso(pos,dist)
228
    local list = workspace:children()
229
    local torso = {}
230
    local temp = nil
231
    local human = nil
232
    local temp2 = nil
233
    for x = 1, #list do
234
        temp2 = list[x]
235
        if (temp2.className == "Model") and (temp2 ~= char) then
236
            temp = temp2:findFirstChild("Torso")
237
            human = temp2:findFirstChildOfClass("Humanoid")
238
            if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
239
                if (temp.Position - pos).magnitude < dist then
240
                    table.insert(torso,temp)
241
                    dist = (temp.Position - pos).magnitude
242
                end
243
            end
244
        end
245
    end
246
    return torso
247
end
248
249
----------------------------------------------------------------------------
250
251
function checkIfNotPlayer(model)
252
if model.CanCollide == true and model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel and model ~= wings and model.Parent ~= wings and model.Parent.Parent ~= wings then
253
return true
254
else
255
return false
256
end
257
end
258
259
----------------------------------------------------------------------------
260
261
function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
262
263
  local wld = Instance.new("Weld", wp1)
264
265
  wld.Part0 = wp0
266
267
  wld.Part1 = wp1
268
269
  wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
270
271
  return wld
272
273
end
274
275
function weld(model)
276
  local parts,last = {}
277
  local function scan(parent)
278
    for _,v in pairs(parent:GetChildren()) do
279
      if (v:IsA("BasePart")) then
280
        if (last) then
281
          local w = Instance.new("Weld")
282
          w.Name = ("%s_Weld"):format(v.Name)
283
          w.Part0,w.Part1 = last,v
284
          w.C0 = last.CFrame:inverse()
285
          w.C1 = v.CFrame:inverse()
286
          w.Parent = last
287
        end
288
        last = v
289
        table.insert(parts,v)
290
      end
291
      scan(v)
292
    end
293
  end
294
  scan(model)
295
  for _,v in pairs(parts) do
296
        v.Anchored = false
297
        v.Locked = true
298
        v.Anchored = false
299
        v.BackSurface = Enum.SurfaceType.SmoothNoOutlines
300
        v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
301
        v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
302
        v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
303
        v.RightSurface = Enum.SurfaceType.SmoothNoOutlines
304
        v.TopSurface = Enum.SurfaceType.SmoothNoOutlines
305
        v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
306
  end
307
end
308
309
----------------------------------------------------------------------------
310
311
function calculate(part,asd)
312
local Head = hed
313
local RightShoulder = asd
314
local RightArm = part
315
local MousePosition = mouse.Hit.p
316
local ToMouse = (MousePosition - Head.Position).unit
317
local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
318
local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0)))
319
local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
320
local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
321
local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
322
if tostring(LateralAngle) == "-1.#IND" then
323
LateralAngle = 0
324
end
325
local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
326
if LateralAngle > (math.pi / 2) then
327
LateralAngle = (math.pi / 2)
328
local Torso = root
329
local Point = Torso.CFrame:vectorToObjectSpace(mouse.Hit.p-Torso.CFrame.p)
330
if Point.Z > 0 then
331
if Point.X > -0 and RightArm == rarm then
332
Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(110),0)
333
elseif Point.X < 0 and RightArm == rarm then
334
Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mouse.Hit.X,Torso.Position.Y,mouse.Hit.Z))*CFrame.Angles(0,math.rad(-110),0)
335
end
336
end
337
end
338
if Cross.Y < 0 then
339
LateralAngle = -LateralAngle
340
end
341
return(CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
342
end
343
344
----------------------------------------------------------------------------
345
346
function sound(id,position,vol,pitch,start,finish)
347
  coroutine.resume(coroutine.create(function()
348
349
  local part = Instance.new("Part",workspace)
350
  part.Position = position
351
  part.Size = Vector3.new(0,0,0)
352
  part.CanCollide = false
353
  part.Transparency = 1
354
355
  local sound = Instance.new("Sound",part)
356
357
  sound.SoundId = "rbxassetid://"..id
358
359
  repeat rs:wait() until sound.IsLoaded
360
  
361
  if vol ~= nil then
362
    sound.Volume = vol
363
  end
364
365
  if pitch ~= nil then
366
    sound.PlaybackSpeed = pitch
367
  end
368
369
  if start ~= nil then
370
    sound.TimePosition = start
371
  end
372
373
  if finish ~= nil then
374
    debris:AddItem(part,finish-start)
375
  else
376
    debris:AddItem(part,sound.TimeLength)
377
  end
378
  
379
  sound:Play()  
380
381
  return sound
382
383
  end))
384
end
385
386
----------------------------------------------------------------------------
387
388
function computeDirection(vec)
389
local lenSquared = vec.magnitude * vec.magnitude
390
local invSqrt = 1 / math.sqrt(lenSquared)
391
return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
392
end
393
394
----------------------------------------------------------------------------
395
396
local shaking = 0
397
function shake(num) if num > shaking then shaking = num end end
398
game:GetService("RunService").RenderStepped:connect(function()
399
hum.CameraOffset = Vector3.new(math.random(-1,1),math.random(-1,1),math.random(-1,1))*(shaking/100)
400
if shaking > 0 then shaking = shaking - 1 else shaking = 0 end
401
end)
402
403
plr = game:GetService("Players").LocalPlayer
404
DebrisModel = Instance.new("Model",plr.Character)
405
DebrisModel.Name = "DebrisModel"
406
407
function Effect(mesh,size,transparency,material,color,position,rotation,positionchange,sizechange,rotationchange,transparencychange,acceleration)
408
 
409
 local part = Instance.new("Part",DebrisModel)
410
  part.Anchored = true
411
  part.CanCollide = false
412
  part.Size = Vector3.new(1,1,1)
413
  part.Transparency = transparency
414
  part.Material = material
415
  part.Color = color
416
  part.CFrame = CFrame.new(position)*CFrame.Angles(math.rad(rotation.X),math.rad(rotation.Y),math.rad(rotation.Z))
417
418
 local partmesh = Instance.new("SpecialMesh",part)
419
  if tonumber(mesh) == nil then partmesh.MeshType = mesh else partmesh.MeshId = "rbxassetid://"..mesh end
420
  partmesh.Scale = size
421
422
 local pvalue = Instance.new("Vector3Value",part)
423
  pvalue.Name = "Position"
424
  pvalue.Value = positionchange
425
426
 local svalue = Instance.new("Vector3Value",part)
427
  svalue.Name = "Size"
428
  svalue.Value = sizechange
429
430
 local rvalue = Instance.new("Vector3Value",part)
431
  rvalue.Name = "Rotation"
432
  rvalue.Value = rotationchange
433
  
434
 local tvalue = Instance.new("NumberValue",part)
435
  tvalue.Name = "Transparency"
436
  tvalue.Value = transparencychange
437
438
 local avalue = Instance.new("NumberValue",part)
439
  avalue.Name = "Acceleration"
440
  avalue.Value = acceleration
441
 
442
 part.Name = "EFFECT"
443
 
444
 return part
445
446
end
447
448
game:GetService("RunService").RenderStepped:connect(function()
449
coroutine.resume(coroutine.create(function()
450
451
 for i, v in pairs(DebrisModel:GetChildren()) do
452
  if v:isA("BasePart") then
453
   v.LocalTransparencyModifier = 0
454
  end
455
 end
456
457
 if not plr.Character:FindFirstChild("DebrisModel") then
458
  DebrisModel = Instance.new("Model",plr.Character)
459
  DebrisModel.Name = "DebrisModel"
460
 end
461
462
 for i,v in pairs(DebrisModel:GetChildren()) do
463
  if v:IsA("BasePart") and v.Name == "EFFECT" then
464
   local pvalue = v:FindFirstChild("Position").Value
465
   local svalue = v:FindFirstChild("Size").Value
466
   local rvalue = v:FindFirstChild("Rotation").Value
467
   local tvalue = v:FindFirstChild("Transparency").Value
468
   local avalue = v:FindFirstChild("Acceleration").Value
469
   local mesh = v:FindFirstChild("Mesh")
470
   mesh.Scale = mesh.Scale + svalue
471
   v:FindFirstChild("Size").Value = v:FindFirstChild("Size").Value + (Vector3.new(1,1,1)*avalue)
472
   v.Transparency = v.Transparency + tvalue
473
   v.CFrame = CFrame.new(pvalue)*v.CFrame*CFrame.Angles(math.rad(rvalue.X),math.rad(rvalue.Y),math.rad(rvalue.Z))
474
   if v.Transparency >= 1 or mesh.Scale.X < 0 or mesh.Scale.Y < 0 or mesh.Scale.Z < 0 then
475
     v:Destroy()
476
   end
477
  end
478
 end
479
480
end))
481
end)
482
483
local wsback = 0
484
local frozen = false
485
function freeze()
486
if frozen == false then
487
frozen = true
488
wsback = hum.WalkSpeed
489
hum.WalkSpeed = 1
490
else
491
frozen = false
492
hum.WalkSpeed = wsback
493
end
494
end
495
hum.WalkSpeed = 25
496
497
function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
498
    local magz = (Part0 - Part1).magnitude
499
    local curpos = Part0
500
    local trz = {-Offset,Offset} 
501
    for i=1,Times do
502
        local li = Instance.new("Part", DebrisModel)
503
        li.TopSurface =0
504
        li.Material = Enum.Material.Neon
505
        li.BottomSurface = 0
506
        li.Anchored = true
507
        li.Locked = true
508
        li.Transparency = Trans or 0.4
509
        li.Color = Color
510
        li.formFactor = "Custom"
511
        li.CanCollide = false
512
        li.Size = Vector3.new(Thickness,Thickness,magz/Times)
513
        local lim = Instance.new("BlockMesh",li)
514
        local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
515
        local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
516
        if Times == i then
517
        local magz2 = (curpos - Part1).magnitude
518
        li.Size = Vector3.new(Thickness,Thickness,magz2)
519
        li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
520
        else
521
        li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
522
        end
523
        curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
524
        li.Name = "LIGHTNING"
525
    end
526
end
527
528
----------------------------------------------------------------------------
529
skin_color = BrickColor.new("Light orange")
530
--p:ClearCharacterAppearance()
531
--hed:WaitForChild("face"):Destroy()
532
hed:WaitForChild("face").Texture = "rbxassetid://407320095"
533
----------------------------------------------------------------------------
534
local size = 1
535
536
newWeld(torso, larm, -1.5, 0.5, 0)
537
larm.Weld.C1 = CFrame.new(0, 0.5, 0)
538
newWeld(torso, rarm, 1.5, 0.5, 0)
539
rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
540
newWeld(torso, hed, 0, 1.5, 0)
541
newWeld(torso, lleg, -0.5, -1, 0)
542
lleg.Weld.C1 = CFrame.new(0, 1, 0)
543
newWeld(torso, rleg, 0.5, -1, 0)
544
rleg.Weld.C1 = CFrame.new(0, 1, 0)
545
newWeld(root, torso, 0, -1, 0)
546
torso.Weld.C1 = CFrame.new(0, -1, 0)
547
548
emitters={}
549
550
----------------------------------------------------------------------------------------
551
music(171625182)
552
velocityYFall=0
553
velocityYFall2=0
554
velocityYFall3=0
555
velocityYFall4=0
556
neckrotY=0
557
neckrotY2=0
558
torsorotY=0
559
torsorotY2=0
560
torsoY=0
561
torsoY2=0
562
colored = 0
563
sine = 0
564
change=0.4
565
movement=10
566
timeranim=0
567
running = false
568
jumped = false
569
icolor=1
570
imode=false
571
572
didjump = false
573
jumppower = 0
574
debounceimpact = false
575
576
function jumpimpact()
577
if debounceimpact == false then
578
debounceimpact = true
579
if jumppower < -150 then jumppower = -150 end
580
shake(-jumppower/5)
581
for i=1,-jumppower/20 do rs:wait()
582
hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.05)
583
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, (jumppower/20)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.05)
584
end
585
debounceimpact = false
586
end
587
end
588
589
max = 0
590
591
rs:connect(function()
592
593
for i,v in pairs(DebrisModel:GetChildren()) do
594
if v.Name == "LIGHTNING" then
595
local vm = v:FindFirstChildOfClass("BlockMesh")
596
vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
597
if vm.Scale.X <= 0 then
598
v:Destroy()
599
end
600
end
601
end
602
603
if p.Character.Parent == nil then
604
local model = Instance.new("Model")
605
model.Name = p.Name
606
p.Character = model
607
for i,v in pairs(char:GetChildren()) do
608
v.Parent = p.Character
609
end
610
end
611
612
char = p.Character
613
if p.Character.Parent ~= workspace then
614
p.Character.Parent = workspace
615
end
616
for i,v in pairs(char:GetChildren()) do
617
if v:IsA("Accoutrement") then
618
if v.Handle:FindFirstChild("Mesh") then
619
v.Handle:FindFirstChild("Mesh").Offset = Vector3.new()
620
v.Handle.Transparency = 0
621
end
622
elseif v:IsA("BasePart") then
623
v.Anchored = false
624
if v:FindFirstChildOfClass("BodyPosition") then
625
v:FindFirstChildOfClass("BodyPosition"):Destroy()
626
end
627
if v:FindFirstChildOfClass("BodyVelocity") then
628
v:FindFirstChildOfClass("BodyVelocity"):Destroy()
629
end
630
if v:FindFirstChildOfClass("BodyGyro") and v:FindFirstChildOfClass("BodyGyro").Name ~= "lolnochara" then
631
v:FindFirstChildOfClass("BodyGyro"):Destroy()
632
end
633
if v:FindFirstChild("Mesh") then
634
v:FindFirstChild("Mesh").Offset = Vector3.new()
635
end
636
if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD") then
637
local force = Instance.new("Part",DebrisModel)
638
force.Name = v.Name.."FORCEFIELD"
639
if v ~= hed then
640
force.Size = v.Size+(Vector3.new(1,1,1)*0.2)
641
else
642
force.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
643
end
644
force.CanCollide = false
645
force.Transparency = 1
646
force.Color = Color3.new(0,1,1)
647
force.Material = Enum.Material.Neon
648
newWeld(v,force,0,0,0)
649
else
650
if not DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"):FindFirstChildOfClass("Weld") then
651
newWeld(v,DebrisModel:FindFirstChild(v.Name.."FORCEFIELD"),0,0,0)
652
end
653
end
654
if v.Name ~= "HumanoidRootPart" then
655
v.Transparency = 0
656
else
657
v.Transparency = 1
658
end
659
end
660
end
661
662
if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 150 then
663
velocityYFall = root.Velocity.Y/1.5
664
else
665
if -root.Velocity.Y/1.5 < -5 then
666
velocityYFall = 5
667
elseif -root.Velocity.Y/1.5 > 150 then
668
velocityYFall = -150
669
end
670
end
671
672
if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
673
velocityYFall2 = root.Velocity.Y/180
674
else
675
if -root.Velocity.Y/180 < 0 then
676
velocityYFall2 = 0
677
elseif -root.Velocity.Y/180 > 1.2 then
678
velocityYFall2 = -1.2
679
end
680
end
681
682
if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
683
velocityYFall3 = root.Velocity.Y/1.5
684
else
685
if -root.Velocity.Y/1.5 < -5 then
686
velocityYFall3 = 5
687
elseif -root.Velocity.Y/1.5 > 50 then
688
velocityYFall3 = -50
689
end
690
end
691
692
if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
693
velocityYFall4 = root.Velocity.Y/1.5
694
else
695
if -root.Velocity.Y/180 < -5 then
696
velocityYFall4 = 5
697
elseif -root.Velocity.Y/180 > 50 then
698
velocityYFall4 = -50
699
end
700
end
701
702
if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
703
neckrotY = root.RotVelocity.Y/6
704
else
705
if root.RotVelocity.Y/6 < -1 then
706
neckrotY = -1
707
elseif root.RotVelocity.Y/6 > 1 then
708
neckrotY = 1
709
end
710
end
711
712
if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
713
neckrotY2 = root.RotVelocity.Y/8
714
else
715
if root.RotVelocity.Y/8 < -0.6 then
716
neckrotY2 = -0.6
717
elseif root.RotVelocity.Y/8 > 0.6 then
718
neckrotY2 = 0.6
719
end
720
end
721
722
if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
723
torsorotY = root.RotVelocity.Y/6
724
else
725
if root.RotVelocity.Y/6 < -0.2 then
726
torsorotY = -0.2
727
elseif root.RotVelocity.Y/6 > 0.2 then
728
torsorotY = 0.2
729
end
730
end
731
732
if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
733
torsorotY2 = root.RotVelocity.Y/8
734
else
735
if root.RotVelocity.Y/8 < -0.2 then
736
torsorotY2 = -0.2
737
elseif root.RotVelocity.Y/8 > 0.2 then
738
torsorotY2 = 0.2
739
end
740
end
741
742
torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
743
torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
744
745
local ray1 = Ray.new(root.Position+Vector3.new(size,0,0),Vector3.new(0, -4, 0))
746
local part1, endPoint = workspace:FindPartOnRay(ray1, char)
747
748
local ray2 = Ray.new(root.Position-Vector3.new(size,0,0),Vector3.new(0, -4, 0))
749
local part2, endPoint = workspace:FindPartOnRay(ray2, char)
750
751
local ray3 = Ray.new(root.Position+Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
752
local part3, endPoint = workspace:FindPartOnRay(ray3, char)
753
754
local ray4 = Ray.new(root.Position-Vector3.new(0,0,size/2),Vector3.new(0, -4, 0))
755
local part4, endPoint = workspace:FindPartOnRay(ray4, char)
756
757
local ray5 = Ray.new(root.Position+Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
758
local part5, endPoint = workspace:FindPartOnRay(ray5, char)
759
760
local ray6 = Ray.new(root.Position-Vector3.new(size,0,size/2),Vector3.new(0, -4, 0))
761
local part6, endPoint = workspace:FindPartOnRay(ray6, char)
762
763
local ray7 = Ray.new(root.Position+Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
764
local part7, endPoint = workspace:FindPartOnRay(ray7, char)
765
766
local ray8 = Ray.new(root.Position-Vector3.new(size,0,-size/2),Vector3.new(0, -4, 0))
767
local part8, endPoint = workspace:FindPartOnRay(ray8, char)
768
769
local ray = Ray.new(root.Position,Vector3.new(0, -6, 0))
770
local part, endPoint = workspace:FindPartOnRay(ray, char)
771
772
if part1 or part2 or part3 or part4 or part5 or part6 or part7 or part8 then jumped = false else endPoint = 0 jumped = true end
773
774
local rlegray = Ray.new(rleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
775
local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
776
777
local llegray = Ray.new(lleg.Position+Vector3.new(0,size/2,0),Vector3.new(0, -1.75, 0))
778
local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
779
780
if hum.Health > 0 and noidle == false then
781
if hum.Sit == false then
782
if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
783
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.2) * CFrame.Angles(math.rad((torso.Velocity*Vector3.new(1, 0, 1)).magnitude/35),torsorotY, math.rad(0)+torsorotY), 0.4)
784
hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles((change/10)*math.cos(sine/2)+0.1,-(change/10)*math.cos(sine/4)-(torsorotY/5),(change/5)*math.cos(sine/4)), 0.1)
785
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/40)*math.cos(sine/4)/3,(movement/150)+(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
786
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/40)*math.cos(sine/4)/3,(movement/150)-(movement/40)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4)*2,math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
787
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -0.5+(change*2)*math.sin(sine/2), 0) * CFrame.Angles(math.rad(30+(change*20)-(movement/20)*math.cos(sine/2)), torsorotY2+math.rad(0-20*math.sin(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1)
788
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,(-0.85-(movement/15)*math.cos(sine/4)/2),-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
789
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,(-0.85+(movement/15)*math.cos(sine/4)/2),-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-50+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2)
790
elseif jumped == true then
791
didjump = true
792
jumppower = root.Velocity.Y
793
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1) * CFrame.Angles(0,0,0), 0.4)
794
hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0), 0.1)
795
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
796
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
797
torso.Weld.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(math.random(-90,90)),math.rad(0), math.rad(math.random(-180,180)))
798
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925,0) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
799
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0,-0.8) * CFrame.Angles(math.rad(0),math.rad(0), math.rad(0)), 0.1)
800
elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
801
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
802
hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(0+50*math.sin(sine/4)),0,0), 0.1)
803
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(-5-5*math.sin(sine/8)),math.rad(-6+2*math.cos(sine/8))), 0.2)
804
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55,-0.05-0.2*math.cos(sine/4))*CFrame.Angles(math.rad(0+80*math.sin(sine/4)),math.rad(5+5*math.sin(sine/8)),math.rad(6-2*math.cos(sine/8))), 0.2)
805
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-hum.HipHeight, 0+2*math.cos(sine/4)) * CFrame.Angles(math.rad(0-80*math.cos(sine/4)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
806
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(10),math.rad(-5+1*math.cos(sine/16))), 0.1)
807
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0,0)*CFrame.Angles(math.rad(0+120*math.cos(sine/4)),math.rad(-10),math.rad(5+1*math.cos(sine/16))), 0.1)
808
end
809
810
else
811
hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 1.5, -.1), 0.4)
812
hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0.05*math.sin(sine/16)+0.15,0.05*math.cos(sine/32),0.01*math.cos(sine/32)), 0.1)
813
larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(-5-5*math.sin(sine/16)),math.rad(-6+2*math.cos(sine/16))), 0.2)
814
rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-(0.1)*math.cos(sine/16)/3,-0.05-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(-2+4*math.sin(sine/16)),math.rad(5+5*math.sin(sine/16)),math.rad(6-2*math.cos(sine/16))), 0.2)
815
torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.4-(0.1)*math.cos(sine/16)-hum.HipHeight, 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1)
816
lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(4),math.rad(-2+1*math.cos(sine/32))), 0.2)
817
rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.55+(0.1)*math.cos(sine/16),0)*CFrame.Angles(math.rad(80+2*math.cos(sine/16)),math.rad(-4),math.rad(2+1*math.cos(sine/32))), 0.2)
818
end
819
820
end
821
if didjump == true and jumped == false and jumppower < 0 then
822
didjump = false
823
jumpimpact()
824
end
825
826
sine = sine + change
827
hum.Health = math.huge
828
hum.MaxHealth = math.huge
829
end)