View difference between Paste ID: 6qpu2FVM and G1GcWXiw
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do
6
	print("FE Compatibility code V2 by Mokiros")
7
	local RealPlayer = RealPlayer
8
	script.Parent = RealPlayer.Character
9
10
	--Fake event to make stuff like Mouse.KeyDown work
11
	local Disconnect_Function = function(this)
12
		this[1].Functions[this[2]] = nil
13
	end
14
	local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
15
	local FakeEvent_Metatable = {__index={
16
		Connect = function(this,f)
17
			local i = tostring(math.random(0,10000))
18
			while this.Functions[i] do
19
				i = tostring(math.random(0,10000))
20
			end
21
			this.Functions[i] = f
22
			return setmetatable({this,i},Disconnect_Metatable)
23
		end
24
	}}
25
	FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
26
	local function fakeEvent()
27
		return setmetatable({Functions={}},FakeEvent_Metatable)
28
	end
29
30
	--Creating fake input objects with fake variables
31
    local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
32
    FakeMouse.keyUp = FakeMouse.KeyUp
33
    FakeMouse.keyDown = FakeMouse.KeyDown
34
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
35
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
36
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
37
	end}
38
	--Merged 2 functions into one by checking amount of arguments
39
	CAS.UnbindAction = CAS.BindAction
40
41
	--This function will trigger the events that have been :Connect()'ed
42
	local function TriggerEvent(self,ev,...)
43
		for _,f in pairs(self[ev].Functions) do
44
			f(...)
45
		end
46
	end
47
	FakeMouse.TriggerEvent = TriggerEvent
48
	UIS.TriggerEvent = TriggerEvent
49
50
	--Client communication
51
	local Event = Instance.new("RemoteEvent")
52
	Event.Name = "UserInput_Event"
53
	Event.OnServerEvent:Connect(function(plr,io)
54
	    if plr~=RealPlayer then return end
55
		FakeMouse.Target = io.Target
56
		FakeMouse.Hit = io.Hit
57
		if not io.isMouse then
58
			local b = io.UserInputState == Enum.UserInputState.Begin
59
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
60
				return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
61
			end
62
			if io.UserInputType == Enum.UserInputType.MouseButton2 then
63
				return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
64
			end
65
			for _,t in pairs(CAS.Actions) do
66
				for _,k in pairs(t.Keys) do
67
					if k==io.KeyCode then
68
						t.Function(t.Name,io.UserInputState,io)
69
					end
70
				end
71
			end
72
			FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
73
			UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
74
	    end
75
	end)
76
	Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
77
	local Mouse = owner:GetMouse()
78
	local UIS = game:GetService("UserInputService")
79
	local input = function(io,RobloxHandled)
80
		if RobloxHandled then return end
81
		--Since InputObject is a client-side instance, we create and pass table instead
82
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
83
	end
84
	UIS.InputBegan:Connect(input)
85
	UIS.InputEnded:Connect(input)
86
87
	local h,t
88
	--Give the server mouse data every second frame, but only if the values changed
89
	--If player is not moving their mouse, client won't fire events
90
	local HB = game:GetService("RunService").Heartbeat
91
	while true do
92
		if h~=Mouse.Hit or t~=Mouse.Target then
93
			h,t=Mouse.Hit,Mouse.Target
94
			Event:FireServer({isMouse=true,Target=t,Hit=h})
95
		end
96
		--Wait 2 frames
97
		for i=1,2 do
98
			HB:Wait()
99
		end
100
	end]==],script)
101
102
	----Sandboxed game object that allows the usage of client-side methods and services
103
	--Real game object
104
	local RealGame = game
105
106
	--Metatable for fake service
107
	local FakeService_Metatable = {
108
		__index = function(self,k)
109
			local s = rawget(self,"_RealService")
110
			if s then
111
				return typeof(s[k])=="function"
112
				and function(_,...)return s[k](s,...)end or s[k]
113
			end
114
		end,
115
		__newindex = function(self,k,v)
116
			local s = rawget(self,"_RealService")
117
			if s then s[k]=v end
118
		end
119
	}
120
	local function FakeService(t,RealService)
121
		t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
122
		return setmetatable(t,FakeService_Metatable)
123
	end
124
125
	--Fake game object
126
	local FakeGame = {
127
		GetService = function(self,s)
128
			return rawget(self,s) or RealGame:GetService(s)
129
		end,
130
		Players = FakeService({
131
			LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
132
		},"Players"),
133
		UserInputService = FakeService(UIS,"UserInputService"),
134
		ContextActionService = FakeService(CAS,"ContextActionService"),
135
		RunService = FakeService({
136
			_btrs = {},
137
			RenderStepped = RealGame:GetService("RunService").Heartbeat,
138
			BindToRenderStep = function(self,name,_,fun)
139
				self._btrs[name] = self.Heartbeat:Connect(fun)
140
			end,
141
			UnbindFromRenderStep = function(self,name)
142
				self._btrs[name]:Disconnect()
143
			end,
144
		},"RunService")
145
	}
146
	rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
147
	FakeGame.service = FakeGame.GetService
148
	FakeService(FakeGame,game)
149
	--Changing owner to fake player object to support owner:GetMouse()
150
	game,owner = FakeGame,FakeGame.Players.LocalPlayer
151
end
152
153
wait(0.2)
154
155
--//====================================================\\--
156
--||			   CREATED BY SHACKLUSTER
157
--\\====================================================//--
158
159
160
161
wait(0.2)
162
163
164
165
Player = game:GetService("Players").LocalPlayer
166
PlayerGui = Player.PlayerGui
167
Cam = workspace.CurrentCamera
168
Backpack = Player.Backpack
169
Character = Player.Character
170
Humanoid = Character.Humanoid
171
Mouse = Player:GetMouse()
172
RootPart = Character["HumanoidRootPart"]
173
Torso = Character["Torso"]
174
Head = Character["Head"]
175
RightArm = Character["Right Arm"]
176
LeftArm = Character["Left Arm"]
177
RightLeg = Character["Right Leg"]
178
LeftLeg = Character["Left Leg"]
179
RootJoint = RootPart["RootJoint"]
180
Neck = Torso["Neck"]
181
RightShoulder = Torso["Right Shoulder"]
182
LeftShoulder = Torso["Left Shoulder"]
183
RightHip = Torso["Right Hip"]
184
LeftHip = Torso["Left Hip"]
185
local sick = Instance.new("Sound",Torso)
186
sick.SoundId = "rbxassetid://319444224"
187
sick.Looped = true
188
sick.Pitch = 1
189
sick.Volume = 1
190
local succing = {}
191
192
IT = Instance.new
193
CF = CFrame.new
194
VT = Vector3.new
195
RAD = math.rad
196
C3 = Color3.new
197
UD2 = UDim2.new
198
BRICKC = BrickColor.new
199
ANGLES = CFrame.Angles
200
EULER = CFrame.fromEulerAnglesXYZ
201
COS = math.cos
202
ACOS = math.acos
203
SIN = math.sin
204
ASIN = math.asin
205
ABS = math.abs
206
MRANDOM = math.random
207
FLOOR = math.floor
208
209
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
210
	local NEWMESH = IT(MESH)
211
	if MESH == "SpecialMesh" then
212
		NEWMESH.MeshType = MESHTYPE
213
		if MESHID ~= "nil" and MESHID ~= "" then
214
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
215
		end
216
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
217
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
218
		end
219
	end
220
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
221
	NEWMESH.Scale = SCALE
222
	NEWMESH.Parent = PARENT
223
	return NEWMESH
224
end
225
226
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE)
227
	local NEWPART = IT("Part")
228
	NEWPART.formFactor = FORMFACTOR
229
	NEWPART.Reflectance = REFLECTANCE
230
	NEWPART.Transparency = TRANSPARENCY
231
	NEWPART.CanCollide = false
232
	NEWPART.Locked = true
233
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
234
	NEWPART.Name = NAME
235
	NEWPART.Size = SIZE
236
	NEWPART.Position = Torso.Position
237
	NEWPART.Material = MATERIAL
238
	NEWPART:BreakJoints()
239
	NEWPART.Parent = PARENT
240
	return NEWPART
241
end
242
243
244
--//=================================\\
245
--||		  CUSTOMIZATION
246
--\\=================================//
247
248
Class_Name = "Template"
249
Weapon_Name = "Add-ons"
250
251
Custom_Colors = {
252
	Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
253
	Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
254
255
	Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
256
	Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
257
	Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
258
	Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
259
	Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
260
261
	Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
262
	Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
263
	Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
264
	Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
265
	Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
266
}
267
268
269
Player_Size = 1 --Size of the player.
270
Animation_Speed = 3
271
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
272
273
local Speed = 16
274
local Effects2 = {}
275
276
--//=================================\\
277
--|| 	  END OF CUSTOMIZATION
278
--\\=================================//
279
280
	local function weldBetween(a, b)
281
	    local weldd = Instance.new("ManualWeld")
282
	    weldd.Part0 = a
283
	    weldd.Part1 = b
284
	    weldd.C0 = CFrame.new()
285
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
286
	    weldd.Parent = a
287
	    return weldd
288
	end
289
290
function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
291
local acs = Instance.new("Part")
292
acs.CanCollide = false
293
acs.Anchored = false
294
acs.Size = Vector3.new(0,0,0)
295
acs.CFrame = attachmentpart.CFrame
296
acs.Parent = Character
297
acs.BrickColor = color
298
    local meshs = Instance.new("SpecialMesh")
299
    meshs.MeshId = mesh
300
    meshs.TextureId = texture
301
    meshs.Parent = acs
302
    meshs.Scale = scale
303
    meshs.Offset = offset
304
weldBetween(attachmentpart,acs)
305
end
306
307
function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
308
if TYPE == "Gem" then
309
	local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
310
	acs.Anchored = false
311
    acs.CanCollide = false
312
	acs.CFrame = PART.CFrame
313
	local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
314
weldBetween(PART,acs)
315
elseif TYPE == "Skull" then
316
	local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
317
	acs.Anchored = false
318
    acs.CanCollide = false
319
	acs.CFrame = PART.CFrame
320
	local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
321
weldBetween(PART,acs)
322
elseif TYPE == "Eye" then
323
	local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
324
	acs.Anchored = false
325
    acs.CanCollide = false
326
	acs.CFrame = PART.CFrame
327
	local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
328
weldBetween(PART,acs)
329
end
330
end
331
332
--//=================================\\
333
--|| 	      USEFUL VALUES
334
--\\=================================//
335
336
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
337
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
338
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
339
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
340
local CO1 = 0
341
local CO2 = 0
342
local CO3 = 0
343
local CO4 = 0
344
local CHANGEDEFENSE = 0
345
local CHANGEDAMAGE = 0
346
local CHANGEMOVEMENT = 0
347
local ANIM = "Idle"
348
local ATTACK = false
349
local EQUIPPED = false
350
local HOLD = false
351
local COMBO = 1
352
local LASTPOINT = nil
353
local BLCF = nil
354
local SCFR = nil
355
local STAGGERHITANIM = false
356
local STAGGERANIM = false
357
local STUNANIM = false
358
local CRITCHANCENUMBER = 0
359
local IDLENUMBER = 0
360
local DONUMBER = 0
361
local HANDIDLE = false
362
local SINE = 0
363
local CHANGE = 2 / Animation_Speed
364
local WALKINGANIM = false
365
local WALK = 0
366
local DISABLEJUMPING = false
367
local HASBEENBLOCKED = false
368
local STUNDELAYNUMBER = 0
369
local MANADELAYNUMBER = 0
370
local SECONDARYMANADELAYNUMBER = 0
371
local ROBLOXIDLEANIMATION = IT("Animation")
372
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
373
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
374
--ROBLOXIDLEANIMATION.Parent = Humanoid
375
local WEAPONGUI = IT("ScreenGui", nil)
376
WEAPONGUI.Name = "Weapon GUI"
377
local WEAPONTOOL = IT("HopperBin", nil)
378
WEAPONTOOL.Name = Weapon_Name
379
local Weapon = IT("Model")
380
Weapon.Name = Weapon_Name
381
local Effects = IT("Folder", Weapon)
382
Effects.Name = "Effects"
383
local ANIMATOR = Humanoid.Animator
384
local ANIMATE = Character.Animate
385
local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
386
local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
387
local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
388
local HITBLOCKSOUNDS = {"199148933", "199148947"}
389
local UNANCHOR = true
390
local MAGICPARTICLE = "655109389"
391
392
--//=================================\\
393
--\\=================================//
394
395
396
--//=================================\\
397
--|| 	     DEBUFFS / BUFFS
398
--\\=================================//
399
400
local DEFENSECHANGE1 = IT("NumberValue", ChangeStat)
401
DEFENSECHANGE1.Name = "ChangeDefense"
402
DEFENSECHANGE1.Value = 0
403
404
local MOVEMENTCHANGE1 = IT("NumberValue", nil)
405
MOVEMENTCHANGE1.Name = "ChangeMovement"
406
MOVEMENTCHANGE1.Value = 0
407
408
--//=================================\\
409
--\\=================================//
410
411
412
413
414
415
--//=================================\\
416
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
417
--\\=================================//
418
419
ArtificialHB = Instance.new("BindableEvent", script)
420
ArtificialHB.Name = "ArtificialHB"
421
422
script:WaitForChild("ArtificialHB")
423
424
frame = Frame_Speed
425
tf = 0
426
allowframeloss = false
427
tossremainder = false
428
lastframe = tick()
429
script.ArtificialHB:Fire()
430
431
game:GetService("RunService").Heartbeat:connect(function(s, p)
432
	tf = tf + s
433
	if tf >= frame then
434
		if allowframeloss then
435
			script.ArtificialHB:Fire()
436
			lastframe = tick()
437
		else
438
			for i = 1, math.floor(tf / frame) do
439
				script.ArtificialHB:Fire()
440
			end
441
		lastframe = tick()
442
		end
443
		if tossremainder then
444
			tf = 0
445
		else
446
			tf = tf - frame * math.floor(tf / frame)
447
		end
448
	end
449
end)
450
451
--//=================================\\
452
--\\=================================//
453
454
455
456
457
458
--//=================================\\
459
--|| 	      SOME FUNCTIONS
460
--\\=================================//
461
462
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
463
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
464
end
465
466
function PositiveAngle(NUMBER)
467
	if NUMBER >= 0 then
468
		NUMBER = 0
469
	end
470
	return NUMBER
471
end
472
473
function NegativeAngle(NUMBER)
474
	if NUMBER <= 0 then
475
		NUMBER = 0
476
	end
477
	return NUMBER
478
end
479
480
function Swait(NUMBER)
481
	if NUMBER == 0 or NUMBER == nil then
482
		ArtificialHB.Event:wait()
483
	else
484
		for i = 1, NUMBER do
485
			ArtificialHB.Event:wait()
486
		end
487
	end
488
end
489
490
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
491
	local label = IT("TextLabel")
492
	label.BackgroundTransparency = 1
493
	label.Size = UD2(1, 0, 1, 0)
494
	label.Position = UD2(0, 0, 0, 0)
495
	label.TextColor3 = C3(255, 255, 255)
496
	label.TextStrokeTransparency = STROKETRANSPARENCY
497
	label.TextTransparency = TRANSPARENCY
498
	label.FontSize = TEXTFONTSIZE
499
	label.Font = TEXTFONT
500
	label.BorderSizePixel = BORDERSIZEPIXEL
501
	label.TextScaled = true
502
	label.Text = TEXT
503
	label.Name = NAME
504
	label.Parent = PARENT
505
	return label
506
end
507
508
function NoOutlines(PART)
509
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
510
end
511
512
513
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
514
	local NEWWELD = IT(TYPE)
515
	NEWWELD.Part0 = PART0
516
	NEWWELD.Part1 = PART1
517
	NEWWELD.C0 = C0
518
	NEWWELD.C1 = C1
519
	NEWWELD.Parent = PARENT
520
	return NEWWELD
521
end
522
523
function CreateSound(ID, PARENT, VOLUME, PITCH)
524
	local NEWSOUND = nil
525
	coroutine.resume(coroutine.create(function()
526
		NEWSOUND = IT("Sound", PARENT)
527
		NEWSOUND.Volume = VOLUME
528
		NEWSOUND.Pitch = PITCH
529
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
530
		Swait()
531
		NEWSOUND:play()
532
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
533
	end))
534
	return NEWSOUND
535
end
536
537
--//=================================\\
538
--\\=================================//
539
540
541
--//=================================\\
542
--||	     WEAPON CREATION
543
--\\=================================//
544
545
if Player_Size ~= 1 then
546
	for _, v in pairs (Weapon:GetChildren()) do
547
		if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then
548
			local p1 = v.Part1
549
			v.Part1 = nil
550
			local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components()
551
			v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12)
552
			v.Part1 = p1
553
		elseif v.ClassName == "Part" then
554
			for _, b in pairs (v:GetChildren()) do
555
				if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then
556
					b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size)
557
				end
558
			end
559
		end
560
	end
561
end
562
563
for _, c in pairs(Weapon:GetChildren()) do
564
	if c.ClassName == "Part" then
565
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
566
	end
567
end
568
569
Weapon.Parent = Character
570
571
Humanoid.Died:connect(function()
572
	ATTACK = true
573
end)
574
575
print(Class_Name.." loaded.")
576
577
--//=================================\\
578
--\\=================================//
579
580
581
local backpack = IT("Part",Weapon)
582
backpack.Size = VT(0.15,0.15,0.15)
583
local mesh = IT("SpecialMesh",backpack)
584
mesh.MeshId = "rbxassetid://84313478"
585
mesh.TextureId = "http://www.roblox.com/asset/?id=84313638"
586
backpack.CFrame = Torso.CFrame * CF(0,0.2,1)
587
backpack.BrickColor = BRICKC("Black")
588
weldBetween(Torso,backpack)
589
590
local hose = IT("Part",Weapon)
591
hose.Size = VT(0.15,0.15,0.15)
592
local mesh = IT("SpecialMesh",hose)
593
mesh.MeshId = "http://www.roblox.com/asset/?id=84313555"
594
mesh.TextureId = "http://www.roblox.com/asset/?id=84313638"
595
mesh.Scale = VT(2,2,2)
596
mesh.Offset = VT(0, -0.4, -0.7)
597
hose.CFrame = Torso.CFrame * CF(1.5,0.5,0.2) * ANGLES(RAD(90),RAD(35),RAD(180))
598
hose.BrickColor = BRICKC("Black")
599
weldBetween(Torso,hose)
600
601
local succ = IT("Part",Weapon)
602
succ.Size = VT(2,2,2)
603
succ.CanCollide = false
604
succ.CFrame = Torso.CFrame * CF(1.5,1.3,-4) * ANGLES(RAD(90),RAD(0),RAD(180))
605
succ.Transparency = 1
606
succ.BrickColor = BRICKC("Black")
607
weldBetween(Torso,succ)
608
609
for _, c in pairs(Weapon:GetChildren()) do
610
	if c.ClassName == "Part" then
611
		c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
612
	end
613
end
614
615
local EyeSizes={
616
	NumberSequenceKeypoint.new(0,0.5,0),
617
	NumberSequenceKeypoint.new(1,0.2,0)
618
}
619
local EyeTrans={
620
	NumberSequenceKeypoint.new(0,0,0),
621
	NumberSequenceKeypoint.new(1,1,0)
622
}
623
local PE=Instance.new("ParticleEmitter")
624
PE.LightEmission=0.3
625
PE.Size=NumberSequence.new(EyeSizes)
626
PE.Transparency=NumberSequence.new(EyeTrans)
627
PE.Rotation=NumberRange.new(0,360)
628
PE.LockedToPart = false
629
PE.Speed = NumberRange.new(0,0,0)
630
PE.ZOffset = 0.3
631
PE.Rate = 999
632
PE.VelocitySpread = 25
633
PE.Name = "Particles"
634
635
function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
636
	local particle = nil
637
	coroutine.resume(coroutine.create(function(PART)
638
		particle = PE:Clone()
639
		Swait()
640
		particle.Rate = 999
641
		particle.Parent = art
642
		particle.Acceleration = accel
643
		if type == "Fire" then
644
			local EyeSizes={
645
				NumberSequenceKeypoint.new(0,size,size/2),
646
				NumberSequenceKeypoint.new(1,size/4,size/8)
647
			}
648
			particle.Size = NumberSequence.new(EyeSizes)
649
		elseif type == "Smoke" then
650
			local EyeSizes={
651
				NumberSequenceKeypoint.new(0,size/5,0),
652
				NumberSequenceKeypoint.new(1,size*2,0.5)
653
			}
654
			particle.Size = NumberSequence.new(EyeSizes)
655
		elseif type == "Solid" then
656
			local EyeSizes={
657
				NumberSequenceKeypoint.new(0,size,0),
658
				NumberSequenceKeypoint.new(1,size,0)
659
			}
660
			particle.Size = NumberSequence.new(EyeSizes)
661
		end
662
		particle.Lifetime=NumberRange.new(lifetime)
663
		particle.Drag = drag
664
		if locked == true then
665
			particle.LockedToPart = true
666
		end
667
		particle.Speed = NumberRange.new(speed*0.8,speed)
668
		particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
669
		particle.Enabled = isenabledbydefault
670
		particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0))
671
	end))
672
return particle
673
end
674
675
local poop = CreateParticles(succ,VT(0,0,0),5,2,"Smoke",false,false,5,35)
676
local poop2 = CreateParticles(succ,VT(0,0,0),5,1,"Smoke",false,false,2,15)
677
678
--//=================================\\
679
--||			DAMAGING
680
--\\=================================//
681
682
function succnearest(position,range)
683
	for i,v in ipairs(workspace:GetChildren()) do
684
	local body = v:GetChildren()
685
		for part = 1, #body do
686
			if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
687
				if(body[part].Position - position).Magnitude < range then
688
					local bv = Instance.new("BodyVelocity") 
689
					bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
690
					bv.velocity = CF(body[part].Position,succ.Position).lookVector*80
691
					bv.Parent = body[part]
692
					bv.Name = "SUCC"
693
					game:GetService("Debris"):AddItem(bv, 0.1)
694
				end
695
			end
696
		end
697
		if v.ClassName == "Part" then
698
			if v.Anchored == false and (v.Position - position).Magnitude < range then
699
				local bv = Instance.new("BodyVelocity") 
700
				bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
701
				bv.velocity = CF(v.Position,succ.Position).lookVector*80
702
				bv.Parent = v
703
				bv.Name = "SUCC"
704
				game:GetService("Debris"):AddItem(bv, 0.1)
705
			end
706
		end
707
	end
708
end
709
710
function cover(position,range)
711
	for i,v in ipairs(workspace:GetChildren()) do
712
	local body = v:GetChildren()
713
		for part = 1, #body do
714
			if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then
715
				if(body[part].Position - position).Magnitude < range then
716
					CreateParticles(body[part],VT(0,-2,0),5,1,"Smoke",true,false,0.3,0)
717
					if v:FindFirstChild("Humanoid") then
718
						v.Humanoid.PlatformStand = true
719
					end
720
				end
721
			end
722
		end
723
		if v.ClassName == "Part" then
724
			if v.Anchored == false and (v.Position - position).Magnitude < range then
725
				CreateParticles(v,VT(0,-2,0),5,1,"Smoke",true,false,0.3,0)
726
			end
727
		end
728
	end
729
end
730
731
function cough()
732
	CreateSound("328460122", succ, 3, 1)
733
	poop.VelocitySpread = 25
734
	poop:Emit(150)
735
	cover(CF(succ.Position)*CF(0,0,-1).p,15)
736
end
737
738
--//=================================\\
739
--||	ATTACK FUNCTIONS AND STUFF
740
--\\=================================//
741
742
function CheckTableForString(Table, String)
743
	for i, v in pairs(Table) do
744
		if string.find(string.lower(String), string.lower(v)) then
745
			return true
746
		end
747
	end
748
	return false
749
end
750
751
function CheckIntangible(Hit)
752
	local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
753
	if Hit and Hit.Parent then
754
		if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
755
			return true
756
		end
757
	end
758
	return false
759
end
760
761
Debris = game:GetService("Debris")
762
763
function CastRay(StartPos, Vec, Length, Ignore, DelayIfHit)
764
	local Direction = CFrame.new(StartPos, Vec).lookVector
765
	local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
766
	local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
767
	if RayHit and CheckIntangible(RayHit) then
768
		if DelayIfHit then
769
			wait()
770
		end
771
		RayHit, RayPos, RayNormal = CastRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
772
	end
773
	return RayHit, RayPos, RayNormal
774
end
775
776
function turnto(pos,part)
777
	part.CFrame = CF(part.Position,VT(pos.X,RootPart.Position.Y,pos.Z))
778
end
779
780
function vacuum()
781
	sick:Play()
782
	local nado = IT("Part")
783
	local mesh = IT("SpecialMesh",nado)
784
	mesh.MeshId = "http://www.roblox.com/asset/?id=102638417"
785
	nado.Transparency = 0.5
786
	nado.CanCollide = false
787
	nado.Anchored = true
788
	local loop = 0
789
	succing = {}
790
	local harm = succ.Touched:Connect(function(hit)
791
		if hit.Anchored == false then
792
			hit:remove()
793
			CreateSound("261732529", succ, 3, 1)
794
			poop2:Emit(1)
795
		end
796
	end)
797
	repeat
798
		Swait()
799
		loop = loop + 75
800
		nado.Parent = Effects
801
		local RayHit,RayPos = CastRay(succ.Position, Mouse.Hit.p, 1000, Character, false)
802
		local distance = (succ.Position - RayPos).magnitude
803
		mesh.Scale = VT(distance/12,distance/3.2,distance/12)
804
		nado.CFrame = CFrame.new(succ.Position, RayPos) * CFrame.new(0, 0, -distance/2) * ANGLES(RAD(-90),RAD(loop),RAD(0))
805
		turnto(Mouse.Hit.p,RootPart)
806
		succnearest(RayPos,distance/2.5)
807
		if RayHit ~= nil then
808
			if RayHit.Anchored == false then
809
				local bv = Instance.new("BodyVelocity") 
810
				bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
811
				bv.velocity = CF(RayHit.Position,succ.Position).lookVector*80
812
				bv.Parent = RayHit
813
				bv.Name = "SUCC"
814
				game:GetService("Debris"):AddItem(bv, 0.1)
815
			end
816
		end
817
		local TotalSuccs = math.ceil(distance / 65)
818
		local Direction = CFrame.new(RayPos, succ.Position).lookVector
819
		for i = 1, TotalSuccs do
820
			local NewPos = (RayPos + (Direction * (distance * (i / TotalSuccs))))
821
			succnearest(NewPos,distance/(i*2.5))
822
		end
823
	until HOLD == false
824
	if #succing>0 then
825
	for e=1,#succing do
826
	if succing[e]~=nil then
827
	local Thing=succing[e]
828
	Thing:remove()
829
	table.remove(succing,e)
830
	end
831
	end
832
	end
833
	succing = {}
834
	harm:disconnect()
835
	nado:remove()
836
	sick:Stop()
837
end
838
839
--//=================================\\
840
--||	  ASSIGN THINGS TO KEYS
841
--\\=================================//
842
843
Humanoid.Changed:connect(function(Jump)
844
	if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
845
		Humanoid.Jump = false
846
	end
847
end)
848
849
function MouseDown(Mouse)
850
	HOLD = true
851
	vacuum()
852
end
853
854
function MouseUp(Mouse)
855
HOLD = false
856
end
857
858
function KeyDown(Key)
859
	if Key == "t" and ATTACK == false then
860
		CreateSound("743953262", Head, 3, 1)
861
	end
862
	if Key == "e" and ATTACK == false then
863
		cough()
864
	end
865
end
866
867
function KeyUp(Key)
868
end
869
870
	Mouse.Button1Down:connect(function(NEWKEY)
871
		MouseDown(NEWKEY)
872
	end)
873
	Mouse.Button1Up:connect(function(NEWKEY)
874
		MouseUp(NEWKEY)
875
	end)
876
	Mouse.KeyDown:connect(function(NEWKEY)
877
		KeyDown(NEWKEY)
878
	end)
879
	Mouse.KeyUp:connect(function(NEWKEY)
880
		KeyUp(NEWKEY)
881
	end)
882
883
--//=================================\\
884
--\\=================================//
885
886
887
function unanchor()
888
	if UNANCHOR == true then
889
		g = Character:GetChildren()
890
		for i = 1, #g do
891
			if g[i].ClassName == "Part" then
892
				g[i].Anchored = false
893
			end
894
		end
895
	end
896
end
897
898
899
--//=================================\\
900
--||	WRAP THE WHOLE SCRIPT UP
901
--\\=================================//
902
903
Humanoid.Changed:connect(function(Jump)
904
	if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
905
		Humanoid.Jump = false
906
	end
907
end)
908
909
while true do
910
	Swait()
911
if #Effects2>0 then
912
for e=1,#Effects2 do
913
if Effects2[e]~=nil then
914
local Thing=Effects2[e]
915
if Thing~=nil then
916
local Part=Thing[1]
917
local Mode=Thing[2]
918
local Delay=Thing[3]
919
local IncX=Thing[4]
920
local IncY=Thing[5]
921
local IncZ=Thing[6]
922
local Part2=Thing[8]
923
if Thing[1].Transparency<=1 then
924
if Thing[2]=="Block1" then
925
Thing[1].CFrame=Thing[1].CFrame
926
Mesh=Thing[1].Mesh
927
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
928
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
929
elseif Thing[2]=="Cylinder" then
930
Mesh=Thing[1].Mesh
931
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
932
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
933
elseif Thing[2]=="Blood" then
934
Mesh=Thing[7]
935
Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
936
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
937
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
938
elseif Thing[2]=="Elec" then
939
Mesh=Thing[1].Mesh
940
Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
941
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
942
elseif Thing[2]=="Disappear" then
943
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
944
end
945
else
946
Part.Parent=nil
947
table.remove(Effects2,e)
948
end
949
end
950
end
951
end
952
end
953
unanchor()
954
Humanoid.MaxHealth = "inf"
955
Humanoid.Health = "inf"
956
if Rooted == false then
957
	Disable_Jump = false
958
	Humanoid.WalkSpeed = Speed
959
elseif Rooted == true then
960
	Disable_Jump = true
961
	Humanoid.WalkSpeed = 0
962
end
963
if sick == nil then
964
	sick = Instance.new("Sound",Torso)
965
	sick.SoundId = "rbxassetid://319444224"
966
	sick.Looped = true
967
	sick.Pitch = 1
968
	sick.Volume = 1
969
end
970
if #succing>0 then
971
for e=1,#succing do
972
if succing[e]~=nil then
973
local Thing=succing[e]
974
Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*80
975
if HOLD == false then
976
	Thing.velocity = CF(Thing.Parent.Position,succ.Position).lookVector*0
977
	Thing:remove()
978
	table.remove(succing,e)
979
end
980
end
981
end
982
end
983
end
984
985
--//=================================\\
986
--\\=================================//
987
988
989
990
991
992
--//====================================================\\--
993
--||			  		 END OF SCRIPT
994
--\\====================================================//--