View difference between Paste ID: m4a4mjs2 and rPJHSLyv
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,game,owner = owner,game
3
local RealPlayer = Player
4
do
5-
    print("Love Bot Edit by Penien23")
5+
6
    script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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 then
32
            for _,f in pairs(t.Functions) do
33
                f(...)
34
            end
35
        end
36
    end
37
    m.TrigEvent = te
38
    UIS.TrigEvent = te
39
 
40
    Event.OnServerEvent:Connect(function(plr,io)
41
        if plr~=rp then return end
42
        m.Target = io.Target
43
        m.Hit = io.Hit
44
        if not io.isMouse then
45
            local b = io.UserInputState == Enum.UserInputState.Begin
46
            if io.UserInputType == Enum.UserInputType.MouseButton1 then
47
                return m:TrigEvent(b and "Button1Down" or "Button1Up")
48
            end
49
            for _,t in pairs(CAS.Actions) do
50
                for _,k in pairs(t.Keys) do
51
                    if k==io.KeyCode then
52
                        t.Function(t.Name,io.UserInputState,io)
53
                    end
54
                end
55
            end
56
            m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
57
            UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
58
        end
59
    end)
60
    Event.Parent = NLS([==[
61
    local Player = game:GetService("Players").LocalPlayer
62
    local Event = script:WaitForChild("UserInput_Event")
63
 
64
    local Mouse = Player:GetMouse()
65
    local UIS = game:GetService("UserInputService")
66
    local input = function(io,a)
67
        if a then return end
68
        --Since InputObject is a client-side instance, we create and pass table instead
69
        Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
70
    end
71
    UIS.InputBegan:Connect(input)
72
    UIS.InputEnded:Connect(input)
73
 
74
    local h,t
75
    --Give the server mouse data 30 times every second, but only if the values changed
76
    --If player is not moving their mouse, client won't fire events
77
    while wait(1/30) do
78
        if h~=Mouse.Hit or t~=Mouse.Target then
79
            h,t=Mouse.Hit,Mouse.Target
80
            Event:FireServer({isMouse=true,Target=t,Hit=h})
81
        end
82
    end]==],Player.Character)
83
 
84
    ----Sandboxed game object that allows the usage of client-side methods and services
85
    --Real game object
86
    local _rg = game
87
 
88
    --Metatable for fake service
89
    local fsmt = {
90
        __index = function(self,k)
91
            local s = rawget(self,"_RealService")
92
            if s then return s[k] end
93
        end,
94
        __newindex = function(self,k,v)
95
            local s = rawget(self,"_RealService")
96
            if s then s[k]=v end
97
        end,
98
        __call = function(self,...)
99
            local s = rawget(self,"_RealService")
100
            if s then return s(...) end
101
        end
102
    }
103
    local function FakeService(t,RealService)
104
        t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
105
        return setmetatable(t,fsmt)
106
    end
107
 
108
    --Fake game object
109
    local g = {
110
        GetService = function(self,s)
111
            return self[s]
112
        end,
113
        Players = FakeService({
114
            LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
115
        },"Players"),
116
        UserInputService = FakeService(UIS,"UserInputService"),
117
        ContextActionService = FakeService(CAS,"ContextActionService"),
118
    }
119
    rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
120
    g.service = g.GetService
121
   
122
    g.RunService = FakeService({
123
        RenderStepped = _rg:GetService("RunService").Heartbeat,
124
        BindToRenderStep = function(self,name,_,fun)
125
 
126
        end,
127
        UnbindFromRenderStep = function(self,name)
128
            self._btrs[name]:Disconnect()
129
        end,
130
    },"RunService")
131
 
132
    setmetatable(g,{
133
        __index=function(self,s)
134
            return _rg:GetService(s) or typeof(_rg[s])=="function"
135
            and function(_,...)return _rg[s](_rg,...)end or _rg[s]
136
        end,
137
        __newindex = fsmt.__newindex,
138
        __call = fsmt.__call
139
    })
140
    --Changing owner to fake player object to support owner:GetMouse()
141
    game,owner = g,g.Players.LocalPlayer
142
end
143
--//====================================================\\--
144
--||			   CREATED BY SHACKLUSTER
145
--\\====================================================//--
146
147
wait(0.2)
148
149
Player = game:GetService("Players").LocalPlayer
150
PlayerGui = Player.PlayerGui
151
Cam = workspace.CurrentCamera
152
Backpack = Player.Backpack
153
Character = Player.Character
154
Humanoid = Character.Humanoid
155
Mouse = Player:GetMouse()
156
RootPart = Character["HumanoidRootPart"]
157
Torso = Character["Torso"]
158
Head = Character["Head"]
159
RightArm = Character["Right Arm"]
160
LeftArm = Character["Left Arm"]
161
RightLeg = Character["Right Leg"]
162
LeftLeg = Character["Left Leg"]
163
RootJoint = RootPart["RootJoint"]
164
Neck = Torso["Neck"]
165
RightShoulder = Torso["Right Shoulder"]
166
LeftShoulder = Torso["Left Shoulder"]
167
RightHip = Torso["Right Hip"]
168
LeftHip = Torso["Left Hip"]
169
170
IT = Instance.new
171
CF = CFrame.new
172
VT = Vector3.new
173
RAD = math.rad
174
C3 = Color3.new
175
UD2 = UDim2.new
176
BRICKC = BrickColor.new
177
ANGLES = CFrame.Angles
178
EULER = CFrame.fromEulerAnglesXYZ
179
COS = math.cos
180
ACOS = math.acos
181
SIN = math.sin
182
ASIN = math.asin
183
ABS = math.abs
184
MRANDOM = math.random
185
FLOOR = math.floor
186
187
--//=================================\\
188
--|| 	      USEFUL VALUES
189
--\\=================================//
190
191
Animation_Speed = 3
192
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
193
local Speed = 16
194
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
195
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
196
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
197
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
198
local DAMAGEMULTIPLIER = 1
199-
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
199+
200
local ATTACK = false
201
local EQUIPPED = false
202
local HOLD = false
203
local COMBO = 1
204
local Rooted = false
205
local SINE = 0
206
local KEYHOLD = false
207
local CHANGE = 2 / Animation_Speed
208
local WALKINGANIM = false
209
local VALUE1 = false
210
local VALUE2 = false
211
local ROBLOXIDLEANIMATION = IT("Animation")
212
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
213
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
214
--ROBLOXIDLEANIMATION.Parent = Humanoid
215
local WEAPONGUI = IT("ScreenGui", PlayerGui)
216
WEAPONGUI.Name = "Weapon GUI"
217
local Weapon = IT("Model")
218
Weapon.Name = "Adds"
219
local Effects = IT("Folder", Weapon)
220
Effects.Name = "Effects"
221
local ANIMATOR = Humanoid.Animator
222
local ANIMATE = Character.Animate
223
local UNANCHOR = true
224
225
--//=================================\\
226
--\\=================================//
227
228
229
--//=================================\\
230
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
231
--\\=================================//
232
233
ArtificialHB = Instance.new("BindableEvent", script)
234
ArtificialHB.Name = "ArtificialHB"
235
236
script:WaitForChild("ArtificialHB")
237
238
frame = Frame_Speed
239
tf = 0
240
allowframeloss = false
241
tossremainder = false
242
lastframe = tick()
243
script.ArtificialHB:Fire()
244
245
game:GetService("RunService").Heartbeat:connect(function(s, p)
246
	tf = tf + s
247
	if tf >= frame then
248
		if allowframeloss then
249
			script.ArtificialHB:Fire()
250
			lastframe = tick()
251
		else
252
			for i = 1, math.floor(tf / frame) do
253
				script.ArtificialHB:Fire()
254
			end
255
		lastframe = tick()
256
		end
257
		if tossremainder then
258
			tf = 0
259
		else
260
			tf = tf - frame * math.floor(tf / frame)
261
		end
262
	end
263
end)
264
265
--//=================================\\
266
--\\=================================//
267
268
--//=================================\\
269
--|| 	      SOME FUNCTIONS
270
--\\=================================//
271
272
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
273
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
274
end
275
276
function PositiveAngle(NUMBER)
277
	if NUMBER >= 0 then
278
		NUMBER = 0
279
	end
280
	return NUMBER
281
end
282
283
function NegativeAngle(NUMBER)
284
	if NUMBER <= 0 then
285
		NUMBER = 0
286
	end
287
	return NUMBER
288
end
289
290
function Swait(NUMBER)
291
	if NUMBER == 0 or NUMBER == nil then
292
		ArtificialHB.Event:wait()
293
	else
294
		for i = 1, NUMBER do
295
			ArtificialHB.Event:wait()
296
		end
297
	end
298
end
299
300
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
301
	local NEWMESH = IT(MESH)
302
	if MESH == "SpecialMesh" then
303
		NEWMESH.MeshType = MESHTYPE
304
		if MESHID ~= "nil" and MESHID ~= "" then
305
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
306
		end
307
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
308
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
309
		end
310
	end
311
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
312
	NEWMESH.Scale = SCALE
313
	NEWMESH.Parent = PARENT
314
	return NEWMESH
315
end
316
317
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
318
	local NEWPART = IT("Part")
319
	NEWPART.formFactor = FORMFACTOR
320
	NEWPART.Reflectance = REFLECTANCE
321
	NEWPART.Transparency = TRANSPARENCY
322
	NEWPART.CanCollide = false
323
	NEWPART.Locked = true
324
	NEWPART.Anchored = true
325
	if ANCHOR == false then
326
		NEWPART.Anchored = false
327
	end
328
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
329
	NEWPART.Name = NAME
330
	NEWPART.Size = SIZE
331
	NEWPART.Position = Torso.Position
332
	NEWPART.Material = MATERIAL
333
	NEWPART:BreakJoints()
334
	NEWPART.Parent = PARENT
335
	return NEWPART
336
end
337
338
	local function weldBetween(a, b)
339
	    local weldd = Instance.new("ManualWeld")
340
	    weldd.Part0 = a
341
	    weldd.Part1 = b
342
	    weldd.C0 = CFrame.new()
343
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
344
	    weldd.Parent = a
345
	    return weldd
346
	end
347
348
349
function QuaternionFromCFrame(cf)
350
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
351
	local trace = m00 + m11 + m22
352
	if trace > 0 then 
353
		local s = math.sqrt(1 + trace)
354
		local recip = 0.5 / s
355
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
356
	else
357
		local i = 0
358
		if m11 > m00 then
359
			i = 1
360
		end
361
		if m22 > (i == 0 and m00 or m11) then
362
			i = 2
363
		end
364
		if i == 0 then
365
			local s = math.sqrt(m00 - m11 - m22 + 1)
366
			local recip = 0.5 / s
367
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
368
		elseif i == 1 then
369
			local s = math.sqrt(m11 - m22 - m00 + 1)
370
			local recip = 0.5 / s
371
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
372
		elseif i == 2 then
373
			local s = math.sqrt(m22 - m00 - m11 + 1)
374
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
375
		end
376
	end
377
end
378
 
379
function QuaternionToCFrame(px, py, pz, x, y, z, w)
380
	local xs, ys, zs = x + x, y + y, z + z
381
	local wx, wy, wz = w * xs, w * ys, w * zs
382
	local xx = x * xs
383
	local xy = x * ys
384
	local xz = x * zs
385
	local yy = y * ys
386
	local yz = y * zs
387
	local zz = z * zs
388
	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))
389
end
390
 
391
function QuaternionSlerp(a, b, t)
392
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
393
	local startInterp, finishInterp;
394
	if cosTheta >= 0.0001 then
395
		if (1 - cosTheta) > 0.0001 then
396
			local theta = ACOS(cosTheta)
397
			local invSinTheta = 1 / SIN(theta)
398
			startInterp = SIN((1 - t) * theta) * invSinTheta
399
			finishInterp = SIN(t * theta) * invSinTheta
400
		else
401
			startInterp = 1 - t
402
			finishInterp = t
403
		end
404
	else
405
		if (1 + cosTheta) > 0.0001 then
406
			local theta = ACOS(-cosTheta)
407
			local invSinTheta = 1 / SIN(theta)
408
			startInterp = SIN((t - 1) * theta) * invSinTheta
409
			finishInterp = SIN(t * theta) * invSinTheta
410
		else
411
			startInterp = t - 1
412
			finishInterp = t
413
		end
414
	end
415
	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
416
end
417
418
function Clerp(a, b, t)
419
	local qa = {QuaternionFromCFrame(a)}
420
	local qb = {QuaternionFromCFrame(b)}
421
	local ax, ay, az = a.x, a.y, a.z
422
	local bx, by, bz = b.x, b.y, b.z
423
	local _t = 1 - t
424
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
425
end
426
427
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
428
	local frame = IT("Frame")
429
	frame.BackgroundTransparency = TRANSPARENCY
430
	frame.BorderSizePixel = BORDERSIZEPIXEL
431
	frame.Position = POSITION
432
	frame.Size = SIZE
433
	frame.BackgroundColor3 = COLOR
434
	frame.BorderColor3 = BORDERCOLOR
435
	frame.Name = NAME
436
	frame.Parent = PARENT
437
	return frame
438
end
439
440
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
441
	local label = IT("TextLabel")
442
	label.BackgroundTransparency = 1
443
	label.Size = UD2(1, 0, 1, 0)
444
	label.Position = UD2(0, 0, 0, 0)
445
	label.TextColor3 = TEXTCOLOR
446
	label.TextStrokeTransparency = STROKETRANSPARENCY
447
	label.TextTransparency = TRANSPARENCY
448
	label.FontSize = TEXTFONTSIZE
449
	label.Font = TEXTFONT
450
	label.BorderSizePixel = BORDERSIZEPIXEL
451
	label.TextScaled = false
452
	label.Text = TEXT
453
	label.Name = NAME
454
	label.Parent = PARENT
455
	return label
456
end
457
458
function NoOutlines(PART)
459
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
460
end
461
462
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
463
	local NEWWELD = IT(TYPE)
464
	NEWWELD.Part0 = PART0
465
	NEWWELD.Part1 = PART1
466
	NEWWELD.C0 = C0
467
	NEWWELD.C1 = C1
468
	NEWWELD.Parent = PARENT
469
	return NEWWELD
470
end
471
472
local S = IT("Sound")
473
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
474
	local NEWSOUND = nil
475
	coroutine.resume(coroutine.create(function()
476
		NEWSOUND = S:Clone()
477
		NEWSOUND.Parent = PARENT
478
		NEWSOUND.Volume = VOLUME
479
		NEWSOUND.Pitch = PITCH
480
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
481
		NEWSOUND:play()
482
		if DOESLOOP == true then
483
			NEWSOUND.Looped = true
484
		else
485
			repeat wait(1) until NEWSOUND.Playing == false
486
			NEWSOUND:remove()
487
		end
488
	end))
489
	return NEWSOUND
490
end
491
492
function CFrameFromTopBack(at, top, back)
493
	local right = top:Cross(back)
494
	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)
495
end
496
497
--WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
498
function WACKYEFFECT(Table)
499
	local TYPE = (Table.EffectType or "Sphere")
500
	local SIZE = (Table.Size or VT(1,1,1))
501
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
502
	local TRANSPARENCY = (Table.Transparency or 0)
503
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
504
	local CFRAME = (Table.CFrame or Torso.CFrame)
505
	local MOVEDIRECTION = (Table.MoveToPos or nil)
506
	local ROTATION1 = (Table.RotationX or 0)
507
	local ROTATION2 = (Table.RotationY or 0)
508
	local ROTATION3 = (Table.RotationZ or 0)
509
	local MATERIAL = (Table.Material or "Neon")
510
	local COLOR = (Table.Color or C3(1,1,1))
511
	local TIME = (Table.Time or 45)
512
	local SOUNDID = (Table.SoundID or nil)
513
	local SOUNDPITCH = (Table.SoundPitch or nil)
514
	local SOUNDVOLUME = (Table.SoundVolume or nil)
515
	coroutine.resume(coroutine.create(function()
516
		local PLAYSSOUND = false
517
		local SOUND = nil
518
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
519
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
520
			PLAYSSOUND = true
521
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
522
		end
523
		EFFECT.Color = COLOR
524
		local MSH = nil
525
		if TYPE == "Sphere" then
526
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
527
		elseif TYPE == "Block" then
528
			MSH = IT("BlockMesh",EFFECT)
529
			MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
530
		elseif TYPE == "Wave" then
531
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
532
		elseif TYPE == "Ring" then
533
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
534
		elseif TYPE == "Slash" then
535
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
536
		elseif TYPE == "Round Slash" then
537
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
538
		elseif TYPE == "Swirl" then
539
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
540
		elseif TYPE == "Skull" then
541
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
542
		elseif TYPE == "Crystal" then
543
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
544
		end
545
		if MSH ~= nil then
546
			local MOVESPEED = nil
547
			if MOVEDIRECTION ~= nil then
548
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
549
			end
550
			local GROWTH = SIZE - ENDSIZE
551
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
552
			if TYPE == "Block" then
553
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
554
			else
555
				EFFECT.CFrame = CFRAME
556
			end
557
			for LOOP = 1, TIME+1 do
558
				Swait()
559
				MSH.Scale = MSH.Scale - GROWTH/TIME
560
				if TYPE == "Wave" then
561
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
562
				end
563
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
564
				if TYPE == "Block" then
565
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
566
				else
567
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
568
				end
569
				if MOVEDIRECTION ~= nil then
570
					local ORI = EFFECT.Orientation
571
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
572
					EFFECT.Orientation = ORI
573
				end
574
			end
575
			if PLAYSSOUND == false then
576
				EFFECT:remove()
577
			else
578
				repeat Swait() until SOUND.Playing == false
579
				EFFECT:remove()
580
			end
581
		else
582
			if PLAYSSOUND == false then
583
				EFFECT:remove()
584
			else
585
				repeat Swait() until SOUND.Playing == false
586
				EFFECT:remove()
587
			end
588
		end
589
	end))
590
end
591
592
function MakeForm(PART,TYPE)
593
	if TYPE == "Cyl" then
594
		local MSH = IT("CylinderMesh",PART)
595
	elseif TYPE == "Ball" then
596
		local MSH = IT("SpecialMesh",PART)
597
		MSH.MeshType = "Sphere"
598
	elseif TYPE == "Wedge" then
599
		local MSH = IT("SpecialMesh",PART)
600
		MSH.MeshType = "Wedge"
601
	end
602
end
603
604
Debris = game:GetService("Debris")
605
606
function CastProperRay(StartPos, EndPos, Distance, Ignore)
607
	local DIRECTION = CF(StartPos,EndPos).lookVector
608
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
609
end
610
611
function CharacterFade(COLOR,TIMER)
612
	coroutine.resume(coroutine.create(function()
613
		local FADE = IT("Model",Effects)
614
		for _, c in pairs(Character:GetChildren()) do
615
			if c.ClassName == "Part" and c ~= RootPart then
616
				local FADER = c:Clone()
617
				FADER.Color = COLOR
618
				FADER.CFrame = c.CFrame
619
				FADER.Parent = FADE
620
				FADER.Anchored = true
621
				FADER.Transparency = 0.25
622
				FADER:BreakJoints()
623
				FADER.Material = "Glass"
624
				FADER:ClearAllChildren()
625
				if FADER.Name == "Head" then
626
					FADER.Size = VT(1,1,1)
627
				end
628
			end
629
		end
630
		local TRANS = 0.75/TIMER
631
		for i = 1, TIMER do
632
			Swait()
633
			for _, c in pairs(FADE:GetChildren()) do
634
				if c.ClassName == "Part" then
635
					c.Transparency = c.Transparency + TRANS
636
				end
637
			end
638
		end
639
		FADE:remove()
640
	end))
641
end
642
643
local PE=Instance.new("ParticleEmitter")
644
PE.LightEmission=0.3
645
PE.Size=NumberSequence.new(0)
646
PE.Transparency=NumberSequence.new(0,1)
647
PE.Rotation=NumberRange.new(0,360)
648
PE.LockedToPart = false
649
PE.Speed = NumberRange.new(0,0,0)
650
PE.ZOffset = 0.3
651
PE.Rate = 999
652
PE.VelocitySpread = 25
653
PE.Name = "Particles"
654
655
function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
656
    local particle = nil
657
    coroutine.resume(coroutine.create(function(PART)
658
        particle = PE:Clone()
659
        Swait()
660
        particle.Rate = 999
661
        particle.Parent = art
662
        particle.Acceleration = accel
663
        if type == "Fire" then
664
            local EyeSizes={
665
                NumberSequenceKeypoint.new(0,size,size/2),
666
                NumberSequenceKeypoint.new(1,size/4,size/8)
667
            }
668
            particle.Size = NumberSequence.new(EyeSizes)
669
        elseif type == "Smoke" then
670
            local EyeSizes={
671
                NumberSequenceKeypoint.new(0,size/5,0),
672
                NumberSequenceKeypoint.new(1,size*2,0.5)
673
            }
674
            particle.Size = NumberSequence.new(EyeSizes)
675
        elseif type == "Solid" then
676
            local EyeSizes={
677
                NumberSequenceKeypoint.new(0,size,0),
678
                NumberSequenceKeypoint.new(1,size,0)
679
            }
680
            particle.Size = NumberSequence.new(EyeSizes)
681
        end
682
        particle.Lifetime=NumberRange.new(lifetime)
683
        particle.Drag = drag
684
        if locked == true then
685
            particle.LockedToPart = true
686
        end
687
        particle.Speed = NumberRange.new(speed*0.8,speed)
688
        particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
689
        particle.Enabled = isenabledbydefault
690
        particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0))
691
    end))
692
return particle
693
end
694
695
--//=================================\\
696
--||	     RAGDOLL STUFF
697
--\\=================================//
698
699
function recurse(root,callback,i)
700
	i= i or 0
701
	for _,v in pairs(root:GetChildren()) do
702
		i = i + 1
703
		callback(i,v)
704
		
705
		if #v:GetChildren() > 0 then
706
			i = recurse(v,callback,i)
707
		end
708
	end
709
	
710
	return i
711
end
712
713
function ragdollJoint(character, part0, part1, attachmentName, className, properties)
714
	attachmentName = attachmentName.."RigAttachment"
715
	local constraint = Instance.new(className.."Constraint")
716
	constraint.Attachment0 = part0:FindFirstChild(attachmentName)
717
	constraint.Attachment1 = part1:FindFirstChild(attachmentName)
718
	constraint.Name = "RagdollConstraint"..part1.Name
719
	
720
	for _,propertyData in next,properties or {} do
721
		constraint[propertyData[1]] = propertyData[2]
722
	end
723
	
724
	constraint.Parent = character
725
end
726
727
function getAttachment0(character, attachmentName)
728
	for _,child in next,character:GetChildren() do
729
		local attachment = child:FindFirstChild(attachmentName)
730
		if attachment then
731
			return attachment
732
		end
733
	end
734
end
735
736
function ArtificialHitbox(Part)
737
	local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false)
738
	HITBOX.CanCollide = true
739
	HITBOX.CFrame = Part.CFrame
740
	weldBetween(Part,HITBOX)
741
end
742
743
function R15Ragdoll(character,KeepArms)
744
	character:BreakJoints()
745
	coroutine.resume(coroutine.create(function()
746
		recurse(character, function(_,v)
747
			if v:IsA("Attachment") then
748
				v.Axis = Vector3.new(0, 1, 0)
749
				v.SecondaryAxis = Vector3.new(0, 0, 1)
750
				v.Rotation = Vector3.new(0, 0, 0)
751
			end
752
		end)
753
		for _,child in next,character:GetChildren() do
754
			if child:IsA("Accoutrement") then
755
				for _,part in next,child:GetChildren() do
756
					if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
757
						local attachment1 = part:FindFirstChildOfClass("Attachment")
758
						local attachment0 = getAttachment0(character,attachment1.Name)
759
						if attachment0 and attachment1 then
760
							local constraint = Instance.new("HingeConstraint")
761
							constraint.Attachment0 = attachment0
762
							constraint.Attachment1 = attachment1
763
							constraint.LimitsEnabled = true
764
							constraint.UpperAngle = 0
765
							constraint.LowerAngle = 0
766
							constraint.Parent = character
767
						end
768
						ArtificialHitbox(part)
769
					elseif part.Name == "HumanoidRootPart" then
770
						part:remove()
771
					end
772
				end
773
			end
774
		end
775
		
776
		ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
777
			{"LimitsEnabled",true};
778
			{"UpperAngle",5};
779
		})
780
		if character:FindFirstChild("Head") then
781
			ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
782
				{"LimitsEnabled",true};
783
				{"UpperAngle",15};
784
			})
785
		end
786
		
787
		local handProperties = {
788
			{"LimitsEnabled", true};
789
			{"UpperAngle",0};
790
			{"LowerAngle",0};
791
		}
792
		ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
793
		ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
794
		
795
		local shinProperties = {
796
			{"LimitsEnabled", true};
797
			{"UpperAngle", 0};
798
			{"LowerAngle", -75};
799
		}
800
		ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
801
		ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
802
		
803
		local footProperties = {
804
			{"LimitsEnabled", true};
805
			{"UpperAngle", 15};
806
			{"LowerAngle", -45};
807
		}
808
		ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
809
		ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
810
		if KeepArms == true then
811
			ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
812
			ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
813
			ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
814
			ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
815
		end
816
		ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
817
		ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
818
		Debris:AddItem(character,5)
819
	end))
820
end
821
822
function Ragdoll(Character2,CharTorso,KeepArms)
823
	coroutine.resume(coroutine.create(function()
824
		Character2:BreakJoints()
825
		local hum = Character2:findFirstChild("Humanoid")
826
		hum:remove()
827
		local function Scan(ch)
828
			local e
829
			for e = 1,#ch do
830
				Scan(ch[e]:GetChildren())
831
				if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
832
					ch[e]:remove()
833
				end
834
			end
835
		end
836
		local NEWHUM = IT("Humanoid")
837
		NEWHUM.Name = "Corpse"
838
		NEWHUM.Health = 0
839
		NEWHUM.MaxHealth = 0
840
		NEWHUM.PlatformStand = true
841
		NEWHUM.Parent = Character2
842
		NEWHUM.DisplayDistanceType = "None"
843
	
844
		local ch = Character2:GetChildren()
845
		local i
846
		for i = 1,#ch do
847
			if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
848
				ch[i]:remove()
849
			end
850
		end
851
	
852
		local Torso2 = Character2.Torso
853
		local movevector = Vector3.new()
854
	
855
		if Torso2 then
856
			movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
857
			local Head = Character2:FindFirstChild("Head")
858
			if Head then
859
				local Neck = Instance.new("Weld")
860
				Neck.Name = "Neck"
861
				Neck.Part0 = Torso2
862
				Neck.Part1 = Head
863
				Neck.C0 = CFrame.new(0, 1.5, 0)
864
				Neck.C1 = CFrame.new()
865
				Neck.Parent = Torso2
866
	
867
			end
868
			local Limb = Character2:FindFirstChild("Right Arm")
869
			if Limb and KeepArms == true then
870
	
871
				Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
872
				local Joint = Instance.new("Glue")
873
				Joint.Name = "RightShoulder"
874
				Joint.Part0 = Torso2
875
				Joint.Part1 = Limb
876
				Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
877
				Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
878
				Joint.Parent = Torso2
879
	
880
				local B = Instance.new("Part")
881
				B.TopSurface = 0
882
				B.BottomSurface = 0
883
				B.formFactor = "Symmetric"
884
				B.Size = Vector3.new(1, 1, 1)
885
				B.Transparency = 1
886
				B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
887
				B.Parent = Character2
888
				local W = Instance.new("Weld")
889
				W.Part0 = Limb
890
				W.Part1 = B
891
				W.C0 = CFrame.new(0, -0.5, 0)
892
				W.Parent = Limb
893
	
894
			end
895
			local Limb = Character2:FindFirstChild("Left Arm")
896
			if Limb and KeepArms == true then
897
	
898
				Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
899
				local Joint = Instance.new("Glue")
900
				Joint.Name = "LeftShoulder"
901
				Joint.Part0 = Torso2
902
				Joint.Part1 = Limb
903
				Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
904
				Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
905
				Joint.Parent = Torso2
906
	
907
				local B = Instance.new("Part")
908
				B.TopSurface = 0
909
				B.BottomSurface = 0
910
				B.formFactor = "Symmetric"
911
				B.Size = Vector3.new(1, 1, 1)
912
				B.Transparency = 1
913
				B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
914
				B.Parent = Character2
915
				local W = Instance.new("Weld")
916
				W.Part0 = Limb
917
				W.Part1 = B
918
				W.C0 = CFrame.new(0, -0.5, 0)
919
				W.Parent = Limb
920
	
921
			end
922
			local Limb = Character2:FindFirstChild("Right Leg")
923
			if Limb then
924
	
925
				Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
926
				local Joint = Instance.new("Glue")
927
				Joint.Name = "RightHip"
928
				Joint.Part0 = Torso2
929
				Joint.Part1 = Limb
930
				Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
931
				Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
932
				Joint.Parent = Torso2
933
	
934
				local B = Instance.new("Part")
935
				B.TopSurface = 0
936
				B.BottomSurface = 0
937
				B.formFactor = "Symmetric"
938
				B.Size = Vector3.new(1, 1, 1)
939
				B.Transparency = 1
940
				B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
941
				B.Parent = Character2
942
				local W = Instance.new("Weld")
943
				W.Part0 = Limb
944
				W.Part1 = B
945
				W.C0 = CFrame.new(0, -0.5, 0)
946
				W.Parent = Limb
947
	
948
			end
949
			local Limb = Character2:FindFirstChild("Left Leg")
950
			if Limb then
951
	
952
				Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
953
				local Joint = Instance.new("Glue")
954
				Joint.Name = "LeftHip"
955
				Joint.Part0 = Torso2
956
				Joint.Part1 = Limb
957
				Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
958
				Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
959
				Joint.Parent = Torso2
960
	
961
				local B = Instance.new("Part")
962
				B.TopSurface = 0
963
				B.BottomSurface = 0
964
				B.formFactor = "Symmetric"
965
				B.Size = Vector3.new(1, 1, 1)
966
				B.Transparency = 1
967
				B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
968
				B.Parent = Character2
969
				local W = Instance.new("Weld")
970
				W.Part0 = Limb
971
				W.Part1 = B
972
				W.C0 = CFrame.new(0, -0.5, 0)
973
				W.Parent = Limb
974
	
975
			end
976
			--[
977
			local Bar = Instance.new("Part")
978
			Bar.TopSurface = 0
979
			Bar.BottomSurface = 0
980
			Bar.formFactor = "Symmetric"
981
			Bar.Size = Vector3.new(1, 1, 1)
982
			Bar.Transparency = 1
983
			Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
984
			Bar.Parent = Character2
985
			local Weld = Instance.new("Weld")
986
			Weld.Part0 = Torso2
987
			Weld.Part1 = Bar
988
			Weld.C0 = CFrame.new(0, 0.5, 0)
989
			Weld.Parent = Torso2
990
			--]]
991
		end
992
		Character2.Parent = workspace
993
		Debris:AddItem(Character2,5)
994
	
995
		return Character2,Torso2
996
	end))
997
end
998
999
--//=================================\\
1000
--||	     WEAPON CREATION
1001
--\\=================================//
1002
1003
for _, c in pairs(Weapon:GetChildren()) do
1004
	if c.ClassName == "Part" then
1005
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
1006-
local DUST = CreateParticles(RightArm,VT(0,0,0),5,2,"Smoke",false,false,5,0)
1006+
1007-
DUST.ZOffset = 1
1007+
1008-
RightArm.Transparency = 1
1008+
1009-
local BasePart = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1,2,1),false)
1009+
1010-
CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1010+
1011-
local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1.4,1.4,1.4),false)
1011+
1012-
MakeForm(Sphere,"Ball")
1012+
1013-
CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.2,0.8,0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1013+
1014-
local LaserPart = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0.3,0.3,0.1),false)
1014+
1015-
MakeForm(LaserPart,"Ball")
1015+
1016-
CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, LaserPart, CF(0,0,-0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1016+
1017-
local Bump = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.3,0.2),false)
1017+
1018-
MakeForm(Bump,"Ball")
1018+
1019-
CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Bump, CF(0,0,0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1019+
1020-
local BottomLaser = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0.4,0,0.4),false)
1020+
1021-
MakeForm(BottomLaser,"Cyl")
1021+
1022-
CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, BottomLaser, CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1022+
1023-
local Part1 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false)
1023+
1024-
CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part1, CF(0,-0.76,-0.26) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1024+
1025-
local Part2 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false)
1025+
1026-
CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part2, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-25)), CF(0, -0.25, 0))
1026+
1027-
local Part3 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false)
1027+
1028-
CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part3, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-90)), CF(0, -0.26, 0))
1028+
1029-
local Part4 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.56,0.5),false)
1029+
1030-
CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part4, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, -0.26, 0))
1030+
1031-
local Part5 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.56,0.5),false)
1031+
1032-
CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part5, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-125)), CF(0, -0.26, 0))
1032+
1033-
local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.25,0.5),false)
1033+
1034-
CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(25)), CF(0, -0.26/2, 0))
1034+
1035-
local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.3,0.5),false)
1035+
1036-
CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-65)), CF(0, -0.31/2, 0))
1036+
1037-
local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(1.4,0,1.4),false)
1037+
1038-
MakeForm(Part,"Cyl")
1038+
1039-
CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0.035,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1039+
1040-
local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(1.4,0,1.4),false)
1040+
1041-
MakeForm(Part,"Cyl")
1041+
1042-
CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0,-0.035,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0))
1042+
1043-
local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,1.6,0.7),false)
1043+
1044-
MakeForm(Sphere,"Ball")
1044+
1045-
CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.45,0.5,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
1045+
1046
end
1047
1048
	Mouse.Button1Down:connect(function(NEWKEY)
1049
		MouseDown(NEWKEY)
1050
	end)
1051
	Mouse.Button1Up:connect(function(NEWKEY)
1052
		MouseUp(NEWKEY)
1053
	end)
1054
	Mouse.KeyDown:connect(function(NEWKEY)
1055
		KeyDown(NEWKEY)
1056
	end)
1057
	Mouse.KeyUp:connect(function(NEWKEY)
1058
		KeyUp(NEWKEY)
1059
	end)
1060
1061
--//=================================\\
1062
--\\=================================//
1063-
local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
1063+
1064-
local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
1064+
1065-
local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.82, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
1065+
1066-
local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.78, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
1066+
1067-
local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.74, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
1067+
1068-
local SKILL6FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 6 Frame")
1068+
1069
	end
1070-
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 1")
1070+
1071-
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 2")
1071+
1072-
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 3")
1072+
1073-
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 4")
1073+
1074-
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[E]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 5")
1074+
1075-
local SKILL6TEXT = CreateLabel(SKILL6FRAME, "[X]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 6")
1075+
1076
1077
--//=================================\\
1078
--||	WRAP THE WHOLE SCRIPT UP
1079
--\\=================================//
1080
1081
Humanoid.Changed:connect(function(Jump)
1082
	if Jump == "Jump" and (Disable_Jump == true) then
1083
		Humanoid.Jump = false
1084
	end
1085
end)
1086
1087
local sick = IT("Sound")
1088
1089
while true do
1090
	Swait()
1091
	script.Parent = WEAPONGUI
1092
	ANIMATE.Parent = nil
1093
	for _,v in next, Humanoid:GetPlayingAnimationTracks() do
1094
	    v:Stop();
1095
	end
1096
	SINE = SINE + CHANGE
1097-
	KEYHOLD = true
1097+
1098-
	if Key == "z" and ATTACK == false then
1098+
1099-
		Warp()
1099+
1100
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
1101
	if ANIM == "Walk" and TORSOVELOCITY > 1 then
1102
		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)
1103
		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)
1104
		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(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1105
		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(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1106
	elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
1107
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
1108
		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)
1109
		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)
1110
		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)
1111
	end
1112
	if HITFLOOR == nil then
1113
		ANIM = "Midair"
1114
		if ATTACK == false then
1115
			RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
1116
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 1 / Animation_Speed)
1117
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
1118
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
1119
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.2, -0.6) * ANGLES(RAD(15), RAD(70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
1120
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.2, -0.6) * ANGLES(RAD(15), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
1121
		end
1122
	elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
1123
		ANIM = "Idle"
1124
		if ATTACK == false then
1125
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.1 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1126
			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)
1127
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(10 - 15 * COS(SINE / 12))) * ANGLES(RAD(50), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1128
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(-10 + 15 * COS(SINE / 12))) * ANGLES(RAD(30), RAD(45), RAD(180)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1129
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
1130
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
1131
		end
1132
	elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1133
		ANIM = "Walk"
1134
		if ATTACK == false then
1135
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed)
1136
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed)
1137
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * RIGHTSHOULDERC0, 0.8 / Animation_Speed)
1138
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.8 / Animation_Speed)
1139
			RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
1140
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
1141
		end
1142
	end
1143
	sick.SoundId = "rbxassetid://3204772051"
1144
	sick.Looped = true
1145
	sick.Pitch = 1.2
1146
	sick.Volume = 10
1147
	sick.Playing = true
1148
	sick.Parent = Effects
1149
	AntiTimeStop()
1150
	if Rooted == false then
1151
		Disable_Jump = false
1152
		Humanoid.WalkSpeed = Speed
1153
	elseif Rooted == true then
1154
		Disable_Jump = true
1155
		Humanoid.WalkSpeed = 0
1156
	end
1157
end
1158
1159
--//=================================\\
1160
--\\=================================//
1161-
		RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 4))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1161+
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 / 4))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1162+
1163-
		RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.30 * COS(SINE / WALKSPEEDVALUE*4), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.4- 0.4 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1163+
1164-
		LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.25 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.25 * COS(SINE / WALKSPEEDVALUE) +0.4+ 0.4 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.4 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
1164+