View difference between Paste ID: EzYqsCAL and A4y5fsDY
SHOW: | | - or go back to the newest paste.
1
--void Script bbuilder fe script converter V2
2
3
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
4
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
5
local RealPlayer = Player
6
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
7
8
------------------------------
9
10
--Made by goodguyaiden--------
11
--Sassy Girl------------------
12
13
------------------------------
14
15
wait(0.2)
16
local Player = game:service'Players'.localPlayer
17
local chara = Player.Character
18
Player=game:GetService("Players").LocalPlayer
19
Character=Player.Character 
20
PlayerGui=Player.PlayerGui
21
Backpack=Player.Backpack 
22
Torso=Character.Torso 
23
Head=Character.Head 
24
Humanoid=Character.Humanoid
25
m=Instance.new('Model',Character)
26
LeftArm=Character["Left Arm"] 
27
LeftLeg=Character["Left Leg"] 
28
RightArm=Character["Right Arm"] 
29
RightLeg=Character["Right Leg"] 
30
LS=Torso["Left Shoulder"] 
31
LH=Torso["Left Hip"] 
32
RS=Torso["Right Shoulder"] 
33
RH=Torso["Right Hip"] 
34
Face = Head.face
35
Neck=Torso.Neck
36
it=Instance.new
37
attacktype=1
38
vt=Vector3.new
39
cf=CFrame.new
40
cl3=Color3.new
41
rgb=Color3.fromRGB
42
bcn=BrickColor.new
43
euler=CFrame.fromEulerAnglesXYZ
44
angles=CFrame.Angles
45
Humanoid.WalkSpeed = 16
46
Player = game:GetService("Players").LocalPlayer
47
PlayerGui = Player.PlayerGui
48
Cam = workspace.CurrentCamera
49
Backpack = Player.Backpack
50
Character = Player.Character
51
Humanoid = Character.Humanoid
52
Mouse = Player:GetMouse()
53
RootPart = Character["HumanoidRootPart"]
54
Torso = Character["Torso"]
55
Head = Character["Head"]
56
RightArm = Character["Right Arm"]
57
LeftArm = Character["Left Arm"]
58
RightLeg = Character["Right Leg"]
59
LeftLeg = Character["Left Leg"]
60
RootJoint = RootPart["RootJoint"]
61
Neck = Torso["Neck"]
62
RightShoulder = Torso["Right Shoulder"]
63
LeftShoulder = Torso["Left Shoulder"]
64
RightHip = Torso["Right Hip"]
65
LeftHip = Torso["Left Hip"]
66
local Player = game:service'Players'.localPlayer
67
local chara = Player.Character
68
      
69
	    shirt= Instance.new("Shirt", Character)
70
        shirt.Name = "Shirt"
71
        pants = Instance.new("Pants", Character)
72
        pants.Name = "Pants"
73
        chara.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=0"
74
        chara.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=405297110"
75
pumpk = Instance.new("Sound")
76
pumpk.Parent = game.Players.LocalPlayer.Character.Head
77
pumpk.SoundId = "rbxassetid://1267328508"
78
pumpk.Volume = 3
79
pumpk.Looped = true
80
pumpk:Play()
81
IT = Instance.new
82
CF = CFrame.new
83
VT = Vector3.new
84
RAD = math.rad
85
C3 = Color3.new
86
UD2 = UDim2.new
87
BRICKC = BrickColor.new
88
ANGLES = CFrame.Angles
89
EULER = CFrame.fromEulerAnglesXYZ
90
COS = math.cos
91
ACOS = math.acos
92
SIN = math.sin
93
ASIN = math.asin
94
ABS = math.abs
95
MRANDOM = math.random
96
FLOOR = math.floor
97
Animation_Speed = 3
98
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
99
local Speed = 12
100
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
101
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
102
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
103
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
104
local DAMAGEMULTIPLIER = 1
105
local ANIM = "Idle"
106
local ATTACK = false
107
local EQUIPPED = false
108
local HOLD = false
109
local COMBO = 1
110
local Rooted = false
111
local SINE = 0
112
local KEYHOLD = false
113
local CHANGE = 2 / Animation_Speed
114
local WALKINGANIM = false
115
local VALUE1 = false
116
local VALUE2 = false
117
local ROBLOXIDLEANIMATION = IT("Animation")
118
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
119
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
120
--ROBLOXIDLEANIMATION.Parent = Humanoid
121
local WEAPONGUI = IT("ScreenGui", PlayerGui)
122
WEAPONGUI.Name = "Weapon GUI"
123
local Weapon = IT("Model")
124
Weapon.Name = "Adds"
125
local Effects = IT("Folder", Weapon)
126
Effects.Name = "Effects"
127
local ANIMATOR = Humanoid.Animator
128
local ANIMATE = Character.Animate
129
local UNANCHOR = true
130
local PLAYANIMS = true
131
ArtificialHB = Instance.new("BindableEvent", script)
132
ArtificialHB.Name = "ArtificialHB"
133
134
script:WaitForChild("ArtificialHB")
135
136
frame = Frame_Speed
137
tf = 0
138
allowframeloss = false
139
tossremainder = false
140
lastframe = tick()
141
script.ArtificialHB:Fire()
142
143
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
144
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
145
end
146
147
function PositiveAngle(NUMBER)
148
	if NUMBER >= 0 then
149
		NUMBER = 0
150
	end
151
	return NUMBER
152
end
153
154
function NegativeAngle(NUMBER)
155
	if NUMBER <= 0 then
156
		NUMBER = 0
157
	end
158
	return NUMBER
159
end
160
161
function Swait(NUMBER)
162
	if NUMBER == 0 or NUMBER == nil then
163
		ArtificialHB.Event:wait()
164
	else
165
		for i = 1, NUMBER do
166
			ArtificialHB.Event:wait()
167
		end
168
	end
169
end
170
171
function QuaternionFromCFrame(cf)
172
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
173
	local trace = m00 + m11 + m22
174
	if trace > 0 then 
175
		local s = math.sqrt(1 + trace)
176
		local recip = 0.5 / s
177
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
178
	else
179
		local i = 0
180
		if m11 > m00 then
181
			i = 1
182
		end
183
		if m22 > (i == 0 and m00 or m11) then
184
			i = 2
185
		end
186
		if i == 0 then
187
			local s = math.sqrt(m00 - m11 - m22 + 1)
188
			local recip = 0.5 / s
189
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
190
		elseif i == 1 then
191
			local s = math.sqrt(m11 - m22 - m00 + 1)
192
			local recip = 0.5 / s
193
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
194
		elseif i == 2 then
195
			local s = math.sqrt(m22 - m00 - m11 + 1)
196
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
197
		end
198
	end
199
end
200
 
201
function QuaternionToCFrame(px, py, pz, x, y, z, w)
202
	local xs, ys, zs = x + x, y + y, z + z
203
	local wx, wy, wz = w * xs, w * ys, w * zs
204
	local xx = x * xs
205
	local xy = x * ys
206
	local xz = x * zs
207
	local yy = y * ys
208
	local yz = y * zs
209
	local zz = z * zs
210
	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))
211
end
212
 
213
function QuaternionSlerp(a, b, t)
214
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
215
	local startInterp, finishInterp;
216
	if cosTheta >= 0.0001 then
217
		if (1 - cosTheta) > 0.0001 then
218
			local theta = ACOS(cosTheta)
219
			local invSinTheta = 1 / SIN(theta)
220
			startInterp = SIN((1 - t) * theta) * invSinTheta
221
			finishInterp = SIN(t * theta) * invSinTheta
222
		else
223
			startInterp = 1 - t
224
			finishInterp = t
225
		end
226
	else
227
		if (1 + cosTheta) > 0.0001 then
228
			local theta = ACOS(-cosTheta)
229
			local invSinTheta = 1 / SIN(theta)
230
			startInterp = SIN((t - 1) * theta) * invSinTheta
231
			finishInterp = SIN(t * theta) * invSinTheta
232
		else
233
			startInterp = t - 1
234
			finishInterp = t
235
		end
236
	end
237
	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
238
end
239
240
function Clerp(a, b, t)
241
	local qa = {QuaternionFromCFrame(a)}
242
	local qb = {QuaternionFromCFrame(b)}
243
	local ax, ay, az = a.x, a.y, a.z
244
	local bx, by, bz = b.x, b.y, b.z
245
	local _t = 1 - t
246
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
247
end
248
249
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
250
	local frame = IT("Frame")
251
	frame.BackgroundTransparency = TRANSPARENCY
252
	frame.BorderSizePixel = BORDERSIZEPIXEL
253
	frame.Position = POSITION
254
	frame.Size = SIZE
255
	frame.BackgroundColor3 = COLOR
256
	frame.BorderColor3 = BORDERCOLOR
257
	frame.Name = NAME
258
	frame.Parent = PARENT
259
	return frame
260
end
261
262
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
263
	local label = IT("TextLabel")
264
	label.BackgroundTransparency = 1
265
	label.Size = UD2(1, 0, 1, 0)
266
	label.Position = UD2(0, 0, 0, 0)
267
	label.TextColor3 = TEXTCOLOR
268
	label.TextStrokeTransparency = STROKETRANSPARENCY
269
	label.TextTransparency = TRANSPARENCY
270
	label.FontSize = TEXTFONTSIZE
271
	label.Font = TEXTFONT
272
	label.BorderSizePixel = BORDERSIZEPIXEL
273
	label.TextScaled = false
274
	label.Text = TEXT
275
	label.Name = NAME
276
	label.Parent = PARENT
277
	return label
278
end
279
280
function NoOutlines(PART)
281
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
282
end
283
284
285
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
286
	local NEWWELD = IT(TYPE)
287
	NEWWELD.Part0 = PART0
288
	NEWWELD.Part1 = PART1
289
	NEWWELD.C0 = C0
290
	NEWWELD.C1 = C1
291
	NEWWELD.Parent = PARENT
292
	return NEWWELD
293
end
294
295
local S = IT("Sound")
296
297
function CreateSound(ID, PARENT, VOLUME, PITCH)
298
	local NEWSOUND = nil
299
	coroutine.resume(coroutine.create(function()
300
		NEWSOUND = S:Clone()
301
		NEWSOUND.Parent = PARENT
302
		NEWSOUND.Volume = VOLUME
303
		NEWSOUND.Pitch = PITCH
304
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
305
		Swait()
306
		NEWSOUND:play()
307
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
308
	end))
309
	return NEWSOUND
310
end
311
312
function CFrameFromTopBack(at, top, back)
313
	local right = top:Cross(back)
314
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
315
end
316
317
function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
318
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
319
	local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
320
	wave.CFrame = CFRAME
321
	coroutine.resume(coroutine.create(function(PART)
322
		for i = 1, WAIT do
323
			Swait()
324
			mesh.Scale = mesh.Scale + GROW
325
			mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
326
			if DOESROT == true then
327
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
328
			end
329
			wave.Transparency = wave.Transparency + (0.5/WAIT)
330
			if wave.Transparency > 0.99 then
331
				wave:remove()
332
			end
333
		end
334
	end))
335
end
336
337
function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
338
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
339
	local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "559831844", "", SIZE, VT(0,0,0))
340
	wave.CFrame = CFRAME
341
	coroutine.resume(coroutine.create(function(PART)
342
		for i = 1, WAIT do
343
			Swait()
344
			mesh.Scale = mesh.Scale + GROW
345
			if DOESROT == true then
346
				wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
347
			end
348
			wave.Transparency = wave.Transparency + (0.5/WAIT)
349
			if wave.Transparency > 0.99 then
350
				wave:remove()
351
			end
352
		end
353
	end))
354
end
355
356
function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
357
	local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
358
	local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
359
	wave.CFrame = CFRAME
360
	coroutine.resume(coroutine.create(function(PART)
361
		for i = 1, WAIT do
362
			Swait()
363
			mesh.Scale = mesh.Scale + GROW
364
			wave.Transparency = wave.Transparency + (1/WAIT)
365
			if wave.Transparency > 0.99 then
366
				wave:remove()
367
			end
368
		end
369
	end))
370
end
371
372
function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
373
	local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
374
	local mesh = nil
375
	if KIND == "Base" then
376
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
377
	elseif KIND == "Thin" then
378
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
379
	elseif KIND == "Round" then
380
 		mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
381
	end
382
	wave.CFrame = CFRAME
383
	coroutine.resume(coroutine.create(function(PART)
384
		for i = 1, WAIT do
385
			Swait()
386
			mesh.Scale = mesh.Scale + GROW/10
387
			wave.Transparency = wave.Transparency + (0.5/WAIT)
388
			if wave.Transparency > 0.99 then
389
				wave:remove()
390
			end
391
		end
392
	end))
393
end
394
395
function MakeForm(PART,TYPE)
396
	if TYPE == "Cyl" then
397
		local MSH = IT("CylinderMesh",PART)
398
	elseif TYPE == "Ball" then
399
		local MSH = IT("SpecialMesh",PART)
400
		MSH.MeshType = "Sphere"
401
	elseif TYPE == "Wedge" then
402
		local MSH = IT("SpecialMesh",PART)
403
		MSH.MeshType = "Wedge"
404
	end
405
end
406
407
408
function CheckTableForString(Table, String)
409
	for i, v in pairs(Table) do
410
		if string.find(string.lower(String), string.lower(v)) then
411
			return true
412
		end
413
	end
414
	return false
415
end
416
417
function CheckIntangible(Hit)
418
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
419
	if Hit and Hit.Parent then
420
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
421
			return true
422
		end
423
	end
424
	return false
425
end
426
427
Debris = game:GetService("Debris")
428
429
function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
430
	local Direction = CFrame.new(StartPos, Vec).lookVector
431
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
432
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
433
	if RayHit and CheckIntangible(RayHit) then
434
		if DelayIfHit then
435
			wait()
436
		end
437
		RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
438
	end
439
	return RayHit, RayPos, RayNormal
440
end
441
442
function turnto(position)
443
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
444
end
445
446
447
448
game:GetService("RunService").Heartbeat:connect(function(s, p)
449
	tf = tf + s
450
	if tf >= frame then
451
		if allowframeloss then
452
			script.ArtificialHB:Fire()
453
			lastframe = tick()
454
		else
455
			for i = 1, math.floor(tf / frame) do
456
				script.ArtificialHB:Fire()
457
			end
458
		lastframe = tick()
459
		end
460
		if tossremainder then
461
			tf = 0
462
		else
463
			tf = tf - frame * math.floor(tf / frame)
464
		end
465
	end
466
end)
467
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
468
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
469
end
470
471
function PositiveAngle(NUMBER)
472
	if NUMBER >= 0 then
473
		NUMBER = 0
474
	end
475
	return NUMBER
476
end
477
478
function NegativeAngle(NUMBER)
479
	if NUMBER <= 0 then
480
		NUMBER = 0
481
	end
482
	return NUMBER
483
end
484
485
function Swait(NUMBER)
486
	if NUMBER == 0 or NUMBER == nil then
487
		ArtificialHB.Event:wait()
488
	else
489
		for i = 1, NUMBER do
490
			ArtificialHB.Event:wait()
491
		end
492
	end
493
end
494
495
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
496
	local NEWMESH = IT(MESH)
497
	if MESH == "SpecialMesh" then
498
		NEWMESH.MeshType = MESHTYPE
499
		if MESHID ~= "nil" and MESHID ~= "" then
500
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
501
		end
502
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
503
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
504
		end
505
	end
506
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
507
	NEWMESH.Scale = SCALE
508
	NEWMESH.Parent = PARENT
509
	return NEWMESH
510
end
511
512
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
513
	local NEWPART = IT("Part")
514
	NEWPART.formFactor = FORMFACTOR
515
	NEWPART.Reflectance = REFLECTANCE
516
	NEWPART.Transparency = TRANSPARENCY
517
	NEWPART.CanCollide = false
518
	NEWPART.Locked = true
519
	NEWPART.Anchored = true
520
	if ANCHOR == false then
521
		NEWPART.Anchored = false
522
	end
523
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
524
	NEWPART.Name = NAME
525
	NEWPART.Size = SIZE
526
	NEWPART.Position = Torso.Position
527
	NEWPART.Material = MATERIAL
528
	NEWPART:BreakJoints()
529
	NEWPART.Parent = PARENT
530
	return NEWPART
531
end
532
533
	local function weldBetween(a, b)
534
	    local weldd = Instance.new("ManualWeld")
535
	    weldd.Part0 = a
536
	    weldd.Part1 = b
537
	    weldd.C0 = CFrame.new()
538
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
539
	    weldd.Parent = a
540
	    return weldd
541
	end
542
543
544
function QuaternionFromCFrame(cf)
545
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
546
	local trace = m00 + m11 + m22
547
	if trace > 0 then 
548
		local s = math.sqrt(1 + trace)
549
		local recip = 0.5 / s
550
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
551
	else
552
		local i = 0
553
		if m11 > m00 then
554
			i = 1
555
		end
556
		if m22 > (i == 0 and m00 or m11) then
557
			i = 2
558
		end
559
		if i == 0 then
560
			local s = math.sqrt(m00 - m11 - m22 + 1)
561
			local recip = 0.5 / s
562
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
563
		elseif i == 1 then
564
			local s = math.sqrt(m11 - m22 - m00 + 1)
565
			local recip = 0.5 / s
566
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
567
		elseif i == 2 then
568
			local s = math.sqrt(m22 - m00 - m11 + 1)
569
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
570
		end
571
	end
572
end
573
 
574
function QuaternionToCFrame(px, py, pz, x, y, z, w)
575
	local xs, ys, zs = x + x, y + y, z + z
576
	local wx, wy, wz = w * xs, w * ys, w * zs
577
	local xx = x * xs
578
	local xy = x * ys
579
	local xz = x * zs
580
	local yy = y * ys
581
	local yz = y * zs
582
	local zz = z * zs
583
	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))
584
end
585
 
586
function QuaternionSlerp(a, b, t)
587
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
588
	local startInterp, finishInterp;
589
	if cosTheta >= 0.0001 then
590
		if (1 - cosTheta) > 0.0001 then
591
			local theta = ACOS(cosTheta)
592
			local invSinTheta = 1 / SIN(theta)
593
			startInterp = SIN((1 - t) * theta) * invSinTheta
594
			finishInterp = SIN(t * theta) * invSinTheta
595
		else
596
			startInterp = 1 - t
597
			finishInterp = t
598
		end
599
	else
600
		if (1 + cosTheta) > 0.0001 then
601
			local theta = ACOS(-cosTheta)
602
			local invSinTheta = 1 / SIN(theta)
603
			startInterp = SIN((t - 1) * theta) * invSinTheta
604
			finishInterp = SIN(t * theta) * invSinTheta
605
		else
606
			startInterp = t - 1
607
			finishInterp = t
608
		end
609
	end
610
	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
611
end
612
613
function Clerp(a, b, t)
614
	local qa = {QuaternionFromCFrame(a)}
615
	local qb = {QuaternionFromCFrame(b)}
616
	local ax, ay, az = a.x, a.y, a.z
617
	local bx, by, bz = b.x, b.y, b.z
618
	local _t = 1 - t
619
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
620
end
621
622
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
623
	local frame = IT("Frame")
624
	frame.BackgroundTransparency = TRANSPARENCY
625
	frame.BorderSizePixel = BORDERSIZEPIXEL
626
	frame.Position = POSITION
627
	frame.Size = SIZE
628
	frame.BackgroundColor3 = COLOR
629
	frame.BorderColor3 = BORDERCOLOR
630
	frame.Name = NAME
631
	frame.Parent = PARENT
632
	return frame
633
end
634
635
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
636
	local label = IT("TextLabel")
637
	label.BackgroundTransparency = 1
638
	label.Size = UD2(1, 0, 1, 0)
639
	label.Position = UD2(0, 0, 0, 0)
640
	label.TextColor3 = TEXTCOLOR
641
	label.TextStrokeTransparency = STROKETRANSPARENCY
642
	label.TextTransparency = TRANSPARENCY
643
	label.FontSize = TEXTFONTSIZE
644
	label.Font = TEXTFONT
645
	label.BorderSizePixel = BORDERSIZEPIXEL
646
	label.TextScaled = false
647
	label.Text = TEXT
648
	label.Name = NAME
649
	label.Parent = PARENT
650
	return label
651
end
652
653
function NoOutlines(PART)
654
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
655
end
656
657
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
658
	local NEWWELD = IT(TYPE)
659
	NEWWELD.Part0 = PART0
660
	NEWWELD.Part1 = PART1
661
	NEWWELD.C0 = C0
662
	NEWWELD.C1 = C1
663
	NEWWELD.Parent = PARENT
664
	return NEWWELD
665
end
666
667
local S = IT("Sound")
668
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
669
	local NEWSOUND = nil
670
	coroutine.resume(coroutine.create(function()
671
		NEWSOUND = S:Clone()
672
		NEWSOUND.Parent = PARENT
673
		NEWSOUND.Volume = VOLUME
674
		NEWSOUND.Pitch = PITCH
675
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
676
		NEWSOUND:play()
677
		if DOESLOOP == true then
678
			NEWSOUND.Looped = true
679
		else
680
			repeat wait(1) until NEWSOUND.Playing == false
681
			NEWSOUND:remove()
682
		end
683
	end))
684
	return NEWSOUND
685
end
686
687
function MakeForm(PART,TYPE)
688
	if TYPE == "Cyl" then
689
		local MSH = IT("CylinderMesh",PART)
690
	elseif TYPE == "Ball" then
691
		local MSH = IT("SpecialMesh",PART)
692
		MSH.MeshType = "Sphere"
693
	elseif TYPE == "Wedge" then
694
		local MSH = IT("SpecialMesh",PART)
695
		MSH.MeshType = "Wedge"
696
	end
697
end
698
699
function CFrameFromTopBack(at, top, back)
700
	local right = top:Cross(back)
701
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
702
end
703
704
function PuddleOfBlood(Position,MaxDrop,Model,MaxSize)
705
	local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model)
706
	if HITFLOOR ~= nil then
707
		if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
708
			if HITFLOOR.Name == "BloodPuddle" then
709
				local DIST = (Position - HITFLOOR.Position).Magnitude
710
				if (HITFLOOR.Size.Z <= 5 and HITFLOOR.Size.Z < MaxSize) or (HITFLOOR.Size.Z > 5 and HITFLOOR.Size.Z < MaxSize and DIST < HITFLOOR.Size.Z/3) then
711
					HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1)
712
				end
713
			else
714
				if HITFLOOR.Anchored == true then
715
					local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2))
716
					BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0))
717
					MakeForm(BLOOD,"Cyl")
718
					coroutine.resume(coroutine.create(function()
719
						Swait(75)
720
						while true do
721
							Swait()
722
							BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02)
723
							if BLOOD.Size.Z < 0.051 then
724
								BLOOD:remove()
725
								break
726
							end
727
						end
728
					end))
729
				end
730
			end
731
		end
732
	end
733
end
734
735
function SprayBlood(POSITION,DIRECTION,BloodSize)
736
	local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false)
737
	BLOOD.CFrame = CF(POSITION)
738
	MakeForm(BLOOD,"Ball")
739
	local bv = Instance.new("BodyVelocity",BLOOD) 
740
	bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
741
	bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
742
	bv.Name = "MOVE"
743
	Debris:AddItem(bv,0.05)
744
	coroutine.resume(coroutine.create(function()
745
		local HASTOUCHEDGROUND = false
746
		local HIT = BLOOD.Touched:Connect(function(hit)
747
			if hit.Anchored == true then
748
				HASTOUCHEDGROUND = true
749
				PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize)
750
			end
751
		end)
752
		wait(5)
753
		if HASTOUCHEDGROUND == false then
754
			BLOOD:remove()
755
		end
756
	end))
757
end
758
759
Debris = game:GetService("Debris")
760
761
function CastProperRay(StartPos, EndPos, Distance, Ignore)
762
	local DIRECTION = CF(StartPos,EndPos).lookVector
763
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
764
end
765
766
function turnto(position)
767
	RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
768
end
769
770
function recurse(root,callback,i)
771
	i= i or 0
772
	for _,v in pairs(root:GetChildren()) do
773
		i = i + 1
774
		callback(i,v)
775
		
776
		if #v:GetChildren() > 0 then
777
			i = recurse(v,callback,i)
778
		end
779
	end
780
	
781
	return i
782
end
783
784
function ragdollJoint(character, part0, part1, attachmentName, className, properties)
785
	attachmentName = attachmentName.."RigAttachment"
786
	local constraint = Instance.new(className.."Constraint")
787
	constraint.Attachment0 = part0:FindFirstChild(attachmentName)
788
	constraint.Attachment1 = part1:FindFirstChild(attachmentName)
789
	constraint.Name = "RagdollConstraint"..part1.Name
790
	
791
	for _,propertyData in next,properties or {} do
792
		constraint[propertyData[1]] = propertyData[2]
793
	end
794
	
795
	constraint.Parent = character
796
end
797
798
function getAttachment0(character, attachmentName)
799
	for _,child in next,character:GetChildren() do
800
		local attachment = child:FindFirstChild(attachmentName)
801
		if attachment then
802
			return attachment
803
		end
804
	end
805
end
806
807
function R15Ragdoll(character)
808
	recurse(character, function(_,v)
809
		if v:IsA("Attachment") then
810
			v.Axis = Vector3.new(0, 1, 0)
811
			v.SecondaryAxis = Vector3.new(0, 0, 1)
812
			v.Rotation = Vector3.new(0, 0, 0)
813
		end
814
	end)
815
	for _,child in next,character:GetChildren() do
816
		if child:IsA("Accoutrement") then
817
			for _,part in next,child:GetChildren() do
818
				if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
819
					local attachment1 = part:FindFirstChildOfClass("Attachment")
820
					local attachment0 = getAttachment0(character,attachment1.Name)
821
					if attachment0 and attachment1 then
822
						local constraint = Instance.new("HingeConstraint")
823
						constraint.Attachment0 = attachment0
824
						constraint.Attachment1 = attachment1
825
						constraint.LimitsEnabled = true
826
						constraint.UpperAngle = 0
827
						constraint.LowerAngle = 0
828
						constraint.Parent = character
829
					end
830
				elseif part.Name == "HumanoidRootPart" then
831
					part:remove()
832
				end
833
			end
834
		end
835
	end
836
	
837
	ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
838
		{"LimitsEnabled",true};
839
		{"UpperAngle",5};
840
	})
841
	ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
842
		{"LimitsEnabled",true};
843
		{"UpperAngle",15};
844
	})
845
	
846
	local handProperties = {
847
		{"LimitsEnabled", true};
848
		{"UpperAngle",0};
849
		{"LowerAngle",0};
850
	}
851
	ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
852
	ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
853
	
854
	local shinProperties = {
855
		{"LimitsEnabled", true};
856
		{"UpperAngle", 0};
857
		{"LowerAngle", -75};
858
	}
859
	ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
860
	ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
861
	
862
	local footProperties = {
863
		{"LimitsEnabled", true};
864
		{"UpperAngle", 15};
865
		{"LowerAngle", -45};
866
	}
867
	ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
868
	ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
869
	
870
	ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
871
	ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
872
	ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
873
	ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
874
	ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
875
	ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
876
end
877
878
function Ragdoll(Character2,CharTorso)
879
	Character2:BreakJoints()
880
	local hum = Character2:findFirstChild("Humanoid")
881
	hum:remove()
882
	local function Scan(ch)
883
		local e
884
		for e = 1,#ch do
885
			Scan(ch[e]:GetChildren())
886
			if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
887
				ch[e]:remove()
888
			end
889
		end
890
	end
891
	local NEWHUM = IT("Humanoid")
892
	NEWHUM.Name = "Corpse"
893
	NEWHUM.Health = 0
894
	NEWHUM.MaxHealth = 0
895
	NEWHUM.PlatformStand = true
896
	NEWHUM.Parent = Character2
897
	NEWHUM.DisplayDistanceType = "None"
898
899
	local ch = Character2:GetChildren()
900
	local i
901
	for i = 1,#ch do
902
		if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
903
			ch[i]:remove()
904
		end
905
	end
906
907
	local Torso2 = Character2.Torso
908
	local movevector = Vector3.new()
909
910
	if Torso2 then
911
		movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
912
		local Head = Character2:FindFirstChild("Head")
913
		if Head then
914
			local Neck = Instance.new("Weld")
915
			Neck.Name = "Neck"
916
			Neck.Part0 = Torso2
917
			Neck.Part1 = Head
918
			Neck.C0 = CFrame.new(0, 1.5, 0)
919
			Neck.C1 = CFrame.new()
920
			Neck.Parent = Torso2
921
922
		end
923
		local Limb = Character2:FindFirstChild("Right Arm")
924
		if Limb then
925
926
			Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
927
			local Joint = Instance.new("Glue")
928
			Joint.Name = "RightShoulder"
929
			Joint.Part0 = Torso2
930
			Joint.Part1 = Limb
931
			Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
932
			Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
933
			Joint.Parent = Torso2
934
935
			local B = Instance.new("Part")
936
			B.TopSurface = 0
937
			B.BottomSurface = 0
938
			B.formFactor = "Symmetric"
939
			B.Size = Vector3.new(1, 1, 1)
940
			B.Transparency = 1
941
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
942
			B.Parent = Character2
943
			local W = Instance.new("Weld")
944
			W.Part0 = Limb
945
			W.Part1 = B
946
			W.C0 = CFrame.new(0, -0.5, 0)
947
			W.Parent = Limb
948
949
		end
950
		local Limb = Character2:FindFirstChild("Left Arm")
951
		if Limb then
952
953
			Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
954
			local Joint = Instance.new("Glue")
955
			Joint.Name = "LeftShoulder"
956
			Joint.Part0 = Torso2
957
			Joint.Part1 = Limb
958
			Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
959
			Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
960
			Joint.Parent = Torso2
961
962
			local B = Instance.new("Part")
963
			B.TopSurface = 0
964
			B.BottomSurface = 0
965
			B.formFactor = "Symmetric"
966
			B.Size = Vector3.new(1, 1, 1)
967
			B.Transparency = 1
968
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
969
			B.Parent = Character2
970
			local W = Instance.new("Weld")
971
			W.Part0 = Limb
972
			W.Part1 = B
973
			W.C0 = CFrame.new(0, -0.5, 0)
974
			W.Parent = Limb
975
976
		end
977
		local Limb = Character2:FindFirstChild("Right Leg")
978
		if Limb then
979
980
			Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
981
			local Joint = Instance.new("Glue")
982
			Joint.Name = "RightHip"
983
			Joint.Part0 = Torso2
984
			Joint.Part1 = Limb
985
			Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
986
			Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
987
			Joint.Parent = Torso2
988
989
			local B = Instance.new("Part")
990
			B.TopSurface = 0
991
			B.BottomSurface = 0
992
			B.formFactor = "Symmetric"
993
			B.Size = Vector3.new(1, 1, 1)
994
			B.Transparency = 1
995
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
996
			B.Parent = Character2
997
			local W = Instance.new("Weld")
998
			W.Part0 = Limb
999
			W.Part1 = B
1000
			W.C0 = CFrame.new(0, -0.5, 0)
1001
			W.Parent = Limb
1002
1003
		end
1004
		local Limb = Character2:FindFirstChild("Left Leg")
1005
		if Limb then
1006
1007
			Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
1008
			local Joint = Instance.new("Glue")
1009
			Joint.Name = "LeftHip"
1010
			Joint.Part0 = Torso2
1011
			Joint.Part1 = Limb
1012
			Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
1013
			Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
1014
			Joint.Parent = Torso2
1015
1016
			local B = Instance.new("Part")
1017
			B.TopSurface = 0
1018
			B.BottomSurface = 0
1019
			B.formFactor = "Symmetric"
1020
			B.Size = Vector3.new(1, 1, 1)
1021
			B.Transparency = 1
1022
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
1023
			B.Parent = Character2
1024
			local W = Instance.new("Weld")
1025
			W.Part0 = Limb
1026
			W.Part1 = B
1027
			W.C0 = CFrame.new(0, -0.5, 0)
1028
			W.Parent = Limb
1029
1030
		end
1031
		--[
1032
		local Bar = Instance.new("Part")
1033
		Bar.TopSurface = 0
1034
		Bar.BottomSurface = 0
1035
		Bar.formFactor = "Symmetric"
1036
		Bar.Size = Vector3.new(1, 1, 1)
1037
		Bar.Transparency = 1
1038
		Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
1039
		Bar.Parent = Character2
1040
		local Weld = Instance.new("Weld")
1041
		Weld.Part0 = Torso2
1042
		Weld.Part1 = Bar
1043
		Weld.C0 = CFrame.new(0, 0.5, 0)
1044
		Weld.Parent = Torso2
1045
		--]]
1046
	end
1047
	Character2.Parent = workspace
1048
	Debris:AddItem(Character2,5)
1049
1050
	return Character2,Torso2
1051
end
1052
1053
we = true
1054
1055
local le = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "le", VT(0, 0, 0),false)
1056
local HandleMesh = CreateMesh("SpecialMesh", le, "FileMesh", "746694198", "0", VT(1,1,1), VT(0,0, 0))
1057
local Weld = CreateWeldOrSnapOrMotor("Weld", le, LeftArm, le, CF(0, -1.8, -0.2) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1058
1059
local txt = Instance.new("BillboardGui", chara)
1060
CV="Lime green"
1061
    txt.Adornee = chara.Head
1062
    txt.Name = "_status"
1063
    txt.Size = UDim2.new(2, 0, 1.2, 0)
1064
    txt.StudsOffset = Vector3.new(-9, 8, 0)
1065
    local text = Instance.new("TextLabel", txt)
1066
    text.Size = UDim2.new(10, 0, 7, 0)
1067
    text.FontSize = "Size24"
1068
    text.TextScaled = true
1069
    text.TextTransparency = 0
1070
    text.BackgroundTransparency = 1
1071
    text.TextTransparency = 0
1072
    text.TextStrokeTransparency = 0
1073
    text.Font = "Bodoni"
1074
    text.TextStrokeColor3 = BrickColor.new("Carnation pink").Color
1075
    text.TextColor3 = BrickColor.new("Light reddish violet").Color
1076
    text.Text = ""
1077
1078
1079
function EW()
1080
    text.Text = "Ew"
1081
we = true
1082
	ATTACK = true
1083
	Rooted = true
1084
CreateSound("838721484", Head, 10, 1)
1085
game.Players.LocalPlayer.Character["le"].Touched:connect(function(hit)
1086
    local humanoid = hit.Parent:findFirstChild("Humanoid")
1087
    if we == true then
1088
        humanoid:TakeDamage(10)
1089
    end
1090
end)
1091
	for i=0, 1, 0.1 / Animation_Speed do
1092
		Swait()
1093
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1094
		Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(12), RAD(0), RAD(20)), 0.5 / Animation_Speed)
1095
		RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.55, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.5 / Animation_Speed)
1096
		LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.55, 0) * ANGLES(RAD(150), RAD(0), RAD(40)) * LEFTSHOULDERC0, 0.5 / Animation_Speed)
1097
		RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)
1098
		LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.5 / Animation_Speed)	
1099
	end
1100
wait(1)
1101
we = false
1102
    text.Text = ""
1103
	ATTACK = false
1104
	Rooted = false
1105
end
1106
1107
1108
1109
function MouseDown(Mouse)
1110
end
1111
1112
function MouseUp(Mouse)
1113
HOLD = false
1114
end
1115
1116
function KeyDown(Key)
1117
	KEYHOLD = true
1118
	if Key == "q" and ATTACK == false then
1119
		EW()
1120
1121
	end
1122
end
1123
1124
function KeyUp(Key)
1125
	KEYHOLD = false
1126
end
1127
1128
	Mouse.Button1Down:connect(function(NEWKEY)
1129
		MouseDown(NEWKEY)
1130
	end)
1131
	Mouse.Button1Up:connect(function(NEWKEY)
1132
		MouseUp(NEWKEY)
1133
	end)
1134
	Mouse.KeyDown:connect(function(NEWKEY)
1135
		KeyDown(NEWKEY)
1136
	end)
1137
	Mouse.KeyUp:connect(function(NEWKEY)
1138
		KeyUp(NEWKEY)
1139
	end)
1140
1141
1142
Humanoid.Changed:connect(function(Jump)
1143
	if Jump == "Jump" and (Disable_Jump == true) then
1144
		Humanoid.Jump = false
1145
	end
1146
end)
1147
1148
while true do
1149
	Swait()
1150
	script.Parent = WEAPONGUI
1151
	ANIMATE.Parent = nil
1152
	for _,v in next, Humanoid:GetPlayingAnimationTracks() do
1153
	    v:Stop();
1154
	end
1155
	SINE = SINE + CHANGE
1156
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1157
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1158
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
1159
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
1160
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
1161
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1162
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1163
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1164
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1165
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
1166
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1167
		Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1168
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1169
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1170
	end
1171
	if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
1172
		ANIM = "Jump"
1173
		if PLAYANIMS == true then
1174
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1175
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1176
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
1177
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1178
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
1179
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
1180
	    end
1181
	elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
1182
		ANIM = "Fall"
1183
		if PLAYANIMS == true then
1184
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1185
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1186
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
1187
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-100), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
1188
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
1189
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
1190
		end
1191
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
1192
		ANIM = "Idle"
1193
		if PLAYANIMS == true then
1194
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(4 - 6 * SIN(SINE / 12)), RAD(0)), 0.15 / Animation_Speed)
1195
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(10 - 20 * SIN(SINE / 12))), 0.15 / Animation_Speed)
1196
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1197
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1198
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1199
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1200
		end
1201
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1202
		ANIM = "Walk"
1203
		if PLAYANIMS == true then
1204
		RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1205
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1206
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1207
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1208
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1209
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1210
			end
1211
		end
1212
	end
1213
	if Rooted == false then
1214
		Disable_Jump = false
1215
		Humanoid.WalkSpeed = Speed
1216
	elseif Rooted == true then
1217
		Disable_Jump = true
1218
		Humanoid.WalkSpeed = 0
1219
	end
1220
1221
	Humanoid.Health = Humanoid.Health + 1