View difference between Paste ID: DpHn0qZ9 and LqYZ0ZPs
SHOW: | | - or go back to the newest paste.
1
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
2
local RealPlayer = Player
3
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 warn'Blaster script by youngmacka123, original by JJK83';if owner:IsFriendsWith(673462376) or owner.UserId == 673462376
4-
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 warn'Blaster script by youngmacka123, original by JJK83';if owner:IsFriendsWith(204448429) or owner.UserId == 204448429 then else print'bru' while wait() do error'stuP' end end
4+
then else print'bru' while wait() do error'stuP' end end
5
6
plr = owner
7
char = plr.Character
8
ra = char["Right Arm"]
9
la = char["Left Arm"]
10
hed = char.Head
11
root = char.HumanoidRootPart
12
hum = char.Humanoid
13
mouse = plr:GetMouse()
14
script.Parent = workspace
15
	
16
		NLS([[
17
	
18
	plr = owner
19
	char = plr.Character
20
	ra = char["Right Arm"]
21
	la = char["Left Arm"]
22
	hed = char.Head
23
	root = char.HumanoidRootPart
24
	hum = char.Humanoid
25
	cam = workspace.CurrentCamera
26
	mouse = plr:GetMouse()
27
	
28
	ezweld = function(p, a, b, cf)
29
	    local weld = Instance.new("Weld",p)
30
	    weld.Part0 = a
31
	    weld.Part1 = b
32
	    weld.C0 = cf
33
	    return weld
34
	end
35
	
36
	function wtom(m)
37
		local w = ezweld(char, m.Part0, m.Part1, m.C0)
38
		w.C1 = m.C1
39
		return w
40
	end
41
	
42
	local fake = Instance.new("Model", script)
43
	fake.Name = "FakeArm"
44
	local hum = Instance.new("Humanoid", fake)
45
	local te = char.Torso:Clone()
46
	te.Transparency = 1
47
	te.Name = "aimor"
48
	te:ClearAllChildren()
49
	te.Parent = script
50
	te.CanCollide = false
51
	local arm = la:Clone()
52
	arm.Parent = fake
53
	arm.Name = "Left Arm"
54
	arm.Material = "SmoothPlastic"
55
	arm:ClearAllChildren()
56
	local rs = char.Torso["Left Shoulder"]
57
	rsnor = rs.C0
58
	local tors2 = char.Torso:Clone()
59
	tors2.Transparency = 1
60
	tors2.Name = "aim"
61
	tors2:ClearAllChildren()
62
	tors2.Parent = fake
63
	local poop = ezweld(fake, tors2, te, CFrame.new())
64
	local raw = ezweld(fake, tors2, arm, rsnor)
65
	raw.C1 = rs.C1
66
	raw.Part0 = tors2
67
	raw.Part1 = arm
68
	raw.C0 = rsnor * CFrame.Angles(math.rad(-6), math.rad(-15), math.rad(100))
69
	sine = 0
70
	local b = Instance.new("Part", fake)
71
	b.Name = "Blaster"
72
	b.BrickColor = BrickColor.new("Toothpaste")
73
	b.CanCollide = false
74
	b.Material = "SmoothPlastic"
75
	b.Size = Vector3.new(0.99, 3, 1)
76
	local w = ezweld(fake, b, arm, CFrame.new(0, 2.1, -0.75))
77
	local Torso = b
78
	
79
	local PointLight = Instance.new("PointLight",Torso)
80
	PointLight.Range = 14
81
	PointLight.Shadows = true
82
	PointLight.Brightness = 1
83
	
84
	local SpotLight = Instance.new("SpotLight",Torso)
85
	SpotLight.Range = 60
86
	SpotLight.Shadows = true
87
	SpotLight.Brightness = 1
88
	
89
	local SoundA = Instance.new("Sound",Torso)
90
	SoundA.SoundId = "rbxasset://sounds/Launching rocket.wav"
91
	SoundA.Volume = 1.2
92
	
93
	local A = Instance.new("Attachment",Torso)
94
	A.Position = Vector3.new(0,0,-1.5)
95
	
96
	local BA0 = Instance.new("Attachment",Torso)
97
	BA0.Position = Vector3.new(0,-0.5,0)
98
	
99
	local BA1 = Instance.new("Attachment",Torso)
100
	BA1.Position = Vector3.new(0,0.5,0)
101
	
102
	local ShipTrail = Instance.new("Trail",script)
103
	ShipTrail.Color = ColorSequence.new(Torso.Color)
104
	ShipTrail.Transparency = NumberSequence.new(0,1)
105
	ShipTrail.MinLength = 0.02
106
	ShipTrail.Lifetime = 0.3
107
	ShipTrail.FaceCamera = true
108
	ShipTrail.Attachment0 = BA0
109
	ShipTrail.Attachment1 = BA1
110
	
111
	local Beam = Instance.new("Beam",script)
112
	Beam.Attachment0 = A
113
	Beam.FaceCamera = true
114
115
	for i,v in pairs (char:children()) do
116
		if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("CharacterMesh") then
117
			v:Clone().Parent = fake
118
		end
119
	end
120
	
121
	for i,v in pairs (la:children()) do
122
		if v:IsA("BlockMesh") then
123
			v:Clone().Parent = fake
124
		end
125
	end
126
127
	Tool = fake
128
	Fire = 3
129
	
130
	local HP = owner.Character:FindFirstChildWhichIsA("Humanoid")
131
132
	coroutine.wrap(function()
133
	while Tool do
134
		Fire = Fire - 1
135
		Torso.Material = owner.Character:WaitForChild("ScoopaDoopBlasta").Material
136
		Torso.Color = owner.Character:WaitForChild("ScoopaDoopBlasta").Color
137
		--Tool.ToolTip = "H = "..math.ceil(HP.Health)
138
		if Torso and owner.Neutral == true then
139
			if HP.Health > 80 then
140
				Torso.BrickColor = BrickColor.new("Toothpaste")
141
				if ShipTrail then
142
					ShipTrail.Color = ColorSequence.new(Color3.new(0,1,1))
143
				end
144
			elseif HP.Health > 60 then
145
				Torso.BrickColor = BrickColor.new("Lime green")
146
				if ShipTrail then
147
					ShipTrail.Color = ColorSequence.new(Color3.new(0,1,0))
148
				end
149
			elseif HP.Health > 40 then
150
				Torso.BrickColor = BrickColor.new("New Yeller")
151
				if ShipTrail then
152
					ShipTrail.Color = ColorSequence.new(Color3.new(1,1,0))
153
				end
154
			elseif HP.Health > 20 then
155
				Torso.BrickColor = BrickColor.new("Hot pink")
156
				if ShipTrail then
157
					ShipTrail.Color = ColorSequence.new(Color3.new(1,0,1))
158
				end
159
			else
160
				Torso.BrickColor = BrickColor.new("Really red")
161
				if ShipTrail then
162
					ShipTrail.Color = ColorSequence.new(Color3.new(1,0,0))
163
				end
164
			end
165
		end
166
		if owner and owner.Parent and owner.Neutral == false then
167
			local TeamColor = owner.TeamColor
168
			Torso.BrickColor = TeamColor
169
			ShipTrail.Color = ColorSequence.new(Torso.Color)
170
		end
171
		if Torso and PointLight then
172
			PointLight.Color = Torso.Color
173
		end
174
		if Torso and SpotLight then
175
			if HP.Health <= 40 then
176
				if SpotLight.Brightness == 5 then
177
					SpotLight.Brightness = 3.5
178
				elseif SpotLight.Brightness == 3.5 then
179
					SpotLight.Brightness = 1.5
180
				elseif SpotLight.Brightness == 1.5 then
181
					SpotLight.Brightness = 1
182
				elseif SpotLight.Brightness == 1 then
183
					SpotLight.Brightness = 2.5
184
				elseif SpotLight.Brightness == 2.5 then
185
					SpotLight.Brightness = 4.5
186
				elseif SpotLight.Brightness == 4.5 then
187
					SpotLight.Brightness = 5
188
				end
189
			else
190
				SpotLight.Brightness = 5
191
			end
192
		end
193
		wait(0.04)
194
	end
195
	end)()
196
	
197
	local selected = Instance.new("SelectionBox", char)
198
	selected.Adornee = nil
199
	selected.LineThickness = 0.005
200
	selected.Color3 = Color3.new(0, 0, 0)
201
	
202
	hold = false
203
	attack = false
204
	
205
	Cam = workspace.CurrentCamera 
206
	
207
	game:GetService("RunService").RenderStepped:Connect(function()
208
		for i,v in pairs (fake:children()) do
209
			if v:IsA("Part") and v ~= tors2 then
210
				v.LocalTransparencyModifier = v.Transparency
211
			end
212
		end
213
		if mouse.Target then
214
			selected.Adornee = nil
215
		else
216
			selected.Adornee = nil
217
		end
218
		if (Cam.focus.p - Cam.CoordinateFrame.p).magnitude <= 1 then 
219
		fake.Parent = char
220
    	else
221
    	fake.Parent = nil
222
   	 	end 
223
		sine = sine + 1
224
		arm.CanCollide = false
225
		tors2.CanCollide = false
226
		local TORSOVELOCITY = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
227
		if TORSOVELOCITY < 1 then
228
		if attack == false then
229
		raw.C0 = raw.C0:Lerp(rsnor * CFrame.Angles(math.rad(-6), math.rad(-15), math.rad(100)), 0.3)
230
		te.CFrame = cam.CFrame * CFrame.new(0, -1.65, -1.25) * CFrame.Angles(0, math.rad(180), 0)
231
		poop.C0 = poop.C0:Lerp(CFrame.new(0, 0.05 * math.sin(sine / 31), 0), 0.3)
232
		end
233
		elseif TORSOVELOCITY > 1 then
234
		if attack == false then
235
		raw.C0 = raw.C0:Lerp(rsnor * CFrame.Angles(math.rad(-6), math.rad(-15), math.rad(100)), 0.3)
236
		te.CFrame = cam.CFrame * CFrame.new(0 - 0.045 * math.sin(sine / 8), -1.65 - 0.045 * math.sin(sine / 4), -1.25) * CFrame.Angles(0, math.rad(180), 0)
237
		poop.C0 = poop.C0:Lerp(CFrame.new(0 - 0.045 * math.sin(sine / 8), 0.045 * math.sin(sine / 4), 0) * CFrame.Angles(math.rad(3 * math.sin(sine / 8)), math.rad(0), 0), 0.3)
238
		end
239
		end
240
	end)
241
	
242
]],char)
243
244
clerp = function(toclerp, cf, number)
245
    local joint = toclerp
246
    joint.C0 = joint.C0:Lerp(cf, number)
247
end
248
249
clerp2 = function(toclerp, cf)
250
    local joint = toclerp
251
    joint.C0 = cf
252
end
253
254
clerp3 = function(toclerp, cf, number)
255
    local joint = toclerp
256
    joint.C1 = joint.C1:Lerp(cf, number)
257
end
258
 
259
Swait,swait = function(number)
260
    if number == 0 or number == nil then
261
        game:GetService("RunService").Heartbeat:Wait()
262
    else
263
        for i = 1,number do
264
            game:GetService("RunService").Heartbeat:Wait()
265
        end
266
    end
267
end
268
269
ezweld = function(p, a, b, cf)
270
    local weld = Instance.new("Weld",p)
271
    weld.Part0 = a
272
    weld.Part1 = b
273
    weld.C0 = cf
274
    return weld
275
end
276
277
NewSound = function(p, id, pit, vol, loop)
278
    local Sound = Instance.new("Sound",p)
279
    Sound.Pitch = pit
280
    Sound.Volume = vol
281
    Sound.SoundId = "rbxassetid://" ..id
282
    Sound.Looped = loop
283
    Sound:Play()
284
    return Sound
285
end
286
287
IT = Instance.new
288
Rad = math.rad
289
Cos = math.cos
290
Sin = math.sin
291
BrickC = BrickColor.new
292
C3 = Color3.new
293
VT = Vector3.new
294
295
anim = "Idle"
296
attack = false
297
local RS = char.Torso["Right Shoulder"]
298
local LS = char.Torso["Left Shoulder"]
299
local RH = char.Torso["Right Hip"]
300
local LH = char.Torso["Left Hip"]
301
local neck = char.Torso["Neck"]
302
local root = char.HumanoidRootPart
303
local rootj = root.RootJoint
304
local sine = 0
305
local RSnor = RS.C0
306
local LSnor = LS.C0
307
local RHnor = RH.C0
308
local LHnor = LH.C0
309
local RSnor2 = RS.C1
310
local LSnor2 = LS.C1
311
local RHnor2 = RH.C1
312
local LHnor2 = LH.C1
313
local rootjnor = rootj.C0
314
local necknor = neck.C0
315
local tors = char.Torso
316
mouse = plr:GetMouse()
317
hold = false
318
Debris = game:GetService("Debris")
319
320
fake = char
321
arm = ra
322
323
local SA = Instance.new("Sound",script)
324
SA.SoundId = "rbxasset://sounds/bass.mp3"
325
SA.Volume = 0.35
326
local PartB = Instance.new("Part")
327
local SB = Instance.new("Sound",PartB)
328
SB.SoundId = "rbxasset://sounds/impact_explosion_03.mp3"
329
SB.Volume = 1.4
330
SB.PlayOnRemove = true
331
local PartC = Instance.new("Part")
332
local SC = Instance.new("Sound",PartC)
333
SC.SoundId = "rbxasset://sounds/collide.wav"
334
SC.Volume = 1.4
335
SC.PlayOnRemove = true
336
local PartD = Instance.new("Part")
337
local SD = Instance.new("Sound",PartD)
338
SD.SoundId = "rbxasset://sounds/Rocket shot.wav"
339
SD.Volume = 1.4
340
SD.PlayOnRemove = true
341
PartB.Anchored = true
342
PartC.Anchored = true
343
PartD.Anchored = true
344
function HitSound(pos)
345
	local random = math.random(1,3)
346
	if random == 1 then
347
		if SB and SB.Parent then
348
			SB.PlaybackSpeed = math.random(240,360) / 100
349
		end
350
		if PartB then
351
			PartB.Position = pos
352
			PartB.Parent = script
353
			PartB.Parent = nil
354
		end
355
	elseif random == 2 then
356
		if SC then
357
			SC.PlaybackSpeed = math.random(140,360) / 100
358
		end
359
		if PartC then
360
			PartC.Position = pos
361
			PartC.Parent = script
362
			PartC.Parent = nil
363
		end
364
	elseif random == 3 then
365
		if SD then
366
			SD.PlaybackSpeed = math.random(1600,2000) / 100
367
		end
368
		if PartD then
369
			PartD.Position = pos
370
			PartD.Parent = script
371
			PartD.Parent = nil
372
		end
373
	end
374
end
375
376
function Kaboom(pos)
377
	local random = math.random(1,3)
378
	if random == 1 then
379
		if SB and SB.Parent then
380
			SB.PlaybackSpeed = math.random(80,160) / 100
381
		end
382
		if PartB then
383
			PartB.Position = pos
384
			PartB.Parent = script
385
			PartB.Parent = nil
386
		end
387
	elseif random == 2 then
388
		if SC then
389
			SC.PlaybackSpeed = math.random(60,120) / 100
390
		end
391
		if PartC then
392
			PartC.Position = pos
393
			PartC.Parent = script
394
			PartC.Parent = nil
395
		end
396
	elseif random == 3 then
397
		if SD then
398
			SD.PlaybackSpeed = math.random(120,240) / 100
399
		end
400
		if PartD then
401
			PartD.Position = pos
402
			PartD.Parent = script
403
			PartD.Parent = nil
404
		end
405
	end
406
end
407
408
	local b = Instance.new("Part", fake)
409
	b.Name = "Blaster"
410
	b.BrickColor = BrickColor.new("Toothpaste")
411
	b.CanCollide = false
412
	b.Material = "SmoothPlastic"
413
	b.Size = Vector3.new(0.99, 3, 1)
414
	b.Name = "ScoopaDoopBlasta"
415
	local w = ezweld(fake, b, arm, CFrame.new(0, 2.1, 0.75))
416
	local Torso = b
417
	
418
	local PointLight = Instance.new("PointLight",Torso)
419
	PointLight.Range = 14
420
	PointLight.Shadows = true
421
	PointLight.Brightness = 5
422
	
423
	local SpotLight = Instance.new("SpotLight",Torso)
424
	SpotLight.Range = 60
425
	SpotLight.Shadows = true
426
	SpotLight.Brightness = 5
427
	
428
	local SoundA = Instance.new("Sound",Torso)
429
	SoundA.SoundId = "rbxasset://sounds/Launching rocket.wav"
430
	SoundA.Volume = 1.2
431
	
432
	local A = Instance.new("Attachment",Torso)
433
	A.Position = Vector3.new(0,0,-1.5)
434
	
435
	local BA0 = Instance.new("Attachment",Torso)
436
	BA0.Position = Vector3.new(0,-0.5,0)
437
	
438
	local BA1 = Instance.new("Attachment",Torso)
439
	BA1.Position = Vector3.new(0,0.5,0)
440
	
441
	local ShipTrail = Instance.new("Trail",script)
442
	ShipTrail.Color = ColorSequence.new(Torso.Color)
443
	ShipTrail.Transparency = NumberSequence.new(0,1)
444
	ShipTrail.MinLength = 0.02
445
	ShipTrail.Lifetime = 0.3
446
	ShipTrail.FaceCamera = true
447
	ShipTrail.Attachment0 = BA0
448
	ShipTrail.Attachment1 = BA1
449
	
450
	local Beam = Instance.new("Beam",script)
451
	Beam.Attachment0 = A
452
	Beam.FaceCamera = true
453
454
	local wld1 = ezweld(char, tors, ra, RS.C0)
455
	wld1.C1 = RS.C1 * CFrame.Angles(0, 0, Rad(-90))
456
457
	Tool = fake
458
	Fire = 3
459
	
460
	local HP = owner.Character:FindFirstChildWhichIsA("Humanoid")
461
	
462
function Shoot(C,bc,f,s,b,o)
463
	local P = Instance.new("Part",script)
464
	P.Name = "Laser"
465
	P.Anchored = true
466
	P.Locked = true
467
	P.Size = Vector3.new(1,1,10)
468
	P.Material = Enum.Material.Neon
469
	P.CFrame = C
470
	local At = Instance.new("Attachment",P)
471
	At.Position = Vector3.new(0,0,5)
472
	local A0 = Instance.new("Attachment",P)
473
	A0.Position = Vector3.new(-0.5,0,5)
474
	local A1 = Instance.new("Attachment",P)
475
	A1.Position = Vector3.new(0.5,0,5)
476
	local Trail = Instance.new("Trail",script)
477
	Trail.Color = ColorSequence.new(bc.Color)
478
	Trail.Transparency = NumberSequence.new(0,1)
479
	Trail.MinLength = 0.02
480
	Trail.Lifetime = 0.6
481
	Trail.FaceCamera = true
482
	Trail.Attachment0 = A0
483
	Trail.Attachment1 = A1
484
	if b then
485
		b.Color = ColorSequence.new(bc.Color)
486
		b.Attachment1 = At
487
		delay(0.12,function()
488
			if b then
489
				b.Attachment1 = nil
490
				Fire = 5
491
			end
492
		end)
493
	end
494
	delay(10,function()
495
		if Trail and Trail.Parent then
496
			Trail:Destroy()
497
		end
498
	end)
499
	if f == true and s == true then
500
		--P.CFrame = P.CFrame * CFrame.new(0,0,0,-0.25,0,0,1)
501
	end
502
	P.BrickColor = bc
503
	P.Velocity = P.CFrame.lookVector * 80
504
	local Alternate = false
505
	local LaserHit = false
506
	local TouchConnection = P.Touched:Connect(function(hit)
507
		if hit == nil or (hit and hit.CanCollide) then
508
			LaserHit = true
509
			if hit and hit.Parent then
510
				local Humanoid = hit.Parent:FindFirstChildWhichIsA("Humanoid")
511
				if Humanoid and not (Humanoid:FindFirstChild("creator") and Humanoid:FindFirstChild("creator"):IsA("ObjectValue") and Humanoid.creator.Value == o) then
512
					Humanoid:TakeDamage(35)
513
					if f == true then
514
						Humanoid:TakeDamage(2013)
515
					end
516
					local creator = Instance.new("ObjectValue",Humanoid)
517
					creator.Name = "creator"
518
					if o and o.Parent then
519
						creator.Value = o
520
					end
521
					game:GetService("Debris"):AddItem(creator,0.2)
522
					delay(0,function()
523
						HitSound(P.Position)
524
					end)
525
				end
526
				local Tag2 = hit.Parent:FindFirstChild("FakeHumanoid")
527
				if Tag2 and o and o.Parent then
528
					Tag2.Value = o.Name
529
				end
530
			end
531
		end
532
	end)
533
	for i = 1,32 do
534
		if P and P.Parent then
535
			if Alternate == true and f == true then
536
				P.BrickColor = BrickColor.new("Institutional white")
537
			else
538
				P.BrickColor = bc
539
			end
540
			Alternate = not Alternate
541
			for i = 1,40 do
542
				if LaserHit == false then
543
					P.CFrame = P.CFrame * CFrame.new(0,0,-2)
544
					local T = P:GetTouchingParts()
545
					for i = 1,#T do
546
						if T[i] and T[i].Parent then
547
							if T[i].CanCollide or T[i].Parent:FindFirstChildWhichIsA("Humanoid") then
548
								LaserHit = true
549
								local Humanoid = T[i].Parent:FindFirstChildWhichIsA("Humanoid")
550
								if Humanoid and not (Humanoid:FindFirstChild("creator") and Humanoid:FindFirstChild("creator"):IsA("ObjectValue") and Humanoid.creator.Value == o) then
551
									Humanoid:TakeDamage(35)
552
									if f == true then
553
										Humanoid:TakeDamage(2013)
554
									end
555
									local creator = Instance.new("ObjectValue",Humanoid)
556
									creator.Name = "creator"
557
									if o and o.Parent then
558
										creator.Value = o
559
									end
560
									game:GetService("Debris"):AddItem(creator,0.2)
561
									delay(0,function()
562
										HitSound(P.Position)
563
									end)
564
								end
565
								local Tag2 = T[i].Parent:FindFirstChild("FakeHumanoid")
566
								if Tag2 and o and o.Parent then
567
									Tag2.Value = o.Name
568
								end
569
							end
570
						end
571
					end
572
				end
573
			end
574
			wait(0.02)
575
			if LaserHit == true then
576
				break
577
			end
578
			
579
		end
580
		
581
	end
582
	TouchConnection:Disconnect()
583
	if P and P.Parent then
584
		P.CFrame = P.CFrame * CFrame.new(0,0,-5)
585
		P.Shape = Enum.PartType.Ball
586
		if f == true then
587
			P.BrickColor = bc
588
			P.Size = Vector3.new(42,42,42)
589
			local Attachment = Instance.new("Attachment",P)
590
			local Particles = Instance.new("ParticleEmitter",Attachment)
591
			Particles.LightEmission = 1
592
			Particles.LightInfluence = 0.2
593
			Particles.Drag = 5
594
			Particles.Enabled = false
595
			Particles.Lifetime = NumberRange.new(0.5,1)
596
			Particles.Rate = 100
597
			Particles.Rotation = NumberRange.new(-360,360)
598
			Particles.SpreadAngle = Vector2.new(-360,360)
599
			Particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.8,0),NumberSequenceKeypoint.new(1,1)})
600
			Particles.Color = ColorSequence.new(bc.Color)
601
			Particles.Texture = "rbxasset://textures/particles/smoke_main.dds"
602
			Particles.Speed = NumberRange.new(70,70)
603
			Particles.Size = NumberSequence.new(7,7)
604
			Particles:Emit(500)
605
			local Explosion = Instance.new("Explosion")
606
			Explosion.Position = P.Position
607
			Explosion.BlastRadius = 21
608
			Explosion.BlastPressure = 1000000
609
			Explosion.Visible = false
610
			Explosion.Parent = game.Workspace
611
			local f = Instance.new("ForceField", char)
612
			f.Visible = false
613
			Debris:AddItem(f, 0.3)
614
			local function Hit(part)
615
				if part and part.Parent:FindFirstChildWhichIsA("Humanoid") then
616
					part.Parent:FindFirstChildWhichIsA("Humanoid"):TakeDamage(2048)
617
					local creator = Instance.new("ObjectValue",part.Parent:FindFirstChildWhichIsA("Humanoid"))
618
					creator.Name = "creator"
619
					if o and o.Parent then
620
						creator.Value = o
621
					end
622
					game:GetService("Debris"):AddItem(creator,0.2)
623
				elseif part and part.Parent:FindFirstChild("FakeHumanoid") and part.Parent.FakeHumanoid:IsA("StringValue") and o and o.Parent then
624
					part.Parent.FakeHumanoid.Value = o.Name
625
				end
626
			end
627
			Explosion.Hit:Connect(Hit)
628
			delay(0,function()
629
				Kaboom(P.Position)
630
			end)
631
		else
632
			P.Size = Vector3.new(4,4,4)
633
		end
634
		for i = 1,2 do
635
			local Part = Instance.new("Part",script)
636
			Part.Name = "Debris"
637
			Part.BrickColor = bc
638
			Part.Material = Enum.Material.Neon
639
			Part.Locked = true
640
			Part.Size = Vector3.new(0.5,0.5,0.5)
641
			Part.CFrame = P.CFrame + Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
642
			Part.Velocity = Vector3.new(math.random(-24,24),math.random(-24,24),math.random(-24,24))
643
			local A0 = Instance.new("Attachment",Part)
644
			A0.Position = Vector3.new(-0.25,0,0)
645
			local A1 = Instance.new("Attachment",Part)
646
			A1.Position = Vector3.new(0.25,0,0)
647
			local Trail = Instance.new("Trail",script)
648
			Trail.Color = ColorSequence.new(bc.Color)
649
			Trail.Transparency = NumberSequence.new(0,1)
650
			Trail.MinLength = 0.02
651
			Trail.Lifetime = 0.3
652
			Trail.FaceCamera = true
653
			Trail.Attachment0 = A0
654
			Trail.Attachment1 = A1
655
			game:GetService("Debris"):AddItem(Part,5)
656
		end
657
		if f == true then
658
			for i = 1,7 do
659
				local Part = Instance.new("Part",script)
660
				Part.Name = "Debris"
661
				Part.BrickColor = P.BrickColor
662
				Part.Material = Enum.Material.Neon
663
				Part.Locked = true
664
				Part.Size = Vector3.new(0.5,0.5,0.5)
665
				Part.CFrame = P.CFrame + Vector3.new(math.random(-2,2),math.random(-2,2),math.random(-2,2))
666
				Part.Velocity = Vector3.new(math.random(-24,24),math.random(-24,24),math.random(-24,24))
667
				local A0 = Instance.new("Attachment",Part)
668
				A0.Position = Vector3.new(-0.25,0,0)
669
				local A1 = Instance.new("Attachment",Part)
670
				A1.Position = Vector3.new(0.25,0,0)
671
				local Trail = Instance.new("Trail",script)
672
				Trail.Color = ColorSequence.new(bc.Color)
673
				Trail.Transparency = NumberSequence.new(0,1)
674
				Trail.MinLength = 0.02
675
				Trail.Lifetime = 0.3
676
				Trail.FaceCamera = true
677
				Trail.Attachment0 = A0
678
				Trail.Attachment1 = A1
679
				game:GetService("Debris"):AddItem(Part,5)
680
			end
681
		end
682
		local T = P:GetTouchingParts()
683
		for i = 1,#T do
684
			if T[i] and T[i].Parent and T[i].Parent:FindFirstChildWhichIsA("Humanoid") then
685
				local Humanoid = T[i].Parent:FindFirstChildWhichIsA("Humanoid")
686
				if not (Humanoid:FindFirstChild("creator") and Humanoid:FindFirstChild("creator"):IsA("ObjectValue") and Humanoid.creator.Value == o) then
687
					Humanoid:TakeDamage(35)
688
					if f == true then
689
						Humanoid:TakeDamage(2013)
690
					end
691
					local creator = Instance.new("ObjectValue",Humanoid)
692
					creator.Name = "creator"
693
					if o and o.Parent then
694
						creator.Value = o
695
					end
696
					game:GetService("Debris"):AddItem(creator,0.2)
697
					delay(0,function()
698
						HitSound(P.Position)
699
					end)
700
				end
701
				local Tag2 = T[i].Parent:FindFirstChild("FakeHumanoid")
702
				if Tag2 and o and o.Parent then
703
					Tag2.Value = o.Name
704
				end
705
			end
706
		end
707
		if f == true then
708
			P.Transparency = 0.5
709
			for i = 1,10 do
710
				if P and P.Parent then
711
					P.Transparency = P.Transparency + 0.05
712
				end
713
				wait(0.12)
714
			end
715
			if P and P.Parent then
716
				P:Destroy()
717
			end
718
		else
719
			wait(0.08)
720
			if P and P.Parent then
721
				P:Destroy()
722
			end
723
		end
724
	end
725
	end
726
727
	coroutine.wrap(function()
728
	while Tool and Tool:FindFirstAncestorWhichIsA("DataModel") do
729
		Fire = Fire - 1
730
		if Fire == 0 then
731
			
732
		end
733
		if Torso and (Fire <= -75 or Fire > 0) then
734
			Torso.Material = Enum.Material.Neon
735
		elseif Torso then
736
			Torso.Material = Enum.Material.Metal
737
		end
738
		--Tool.ToolTip = "H = "..math.ceil(HP.Health)
739
		if Torso and owner.Neutral == true then
740
			if HP.Health > 80 then
741
				Torso.BrickColor = BrickColor.new("Toothpaste")
742
				if ShipTrail then
743
					ShipTrail.Color = ColorSequence.new(Color3.new(0,1,1))
744
				end
745
			elseif HP.Health > 60 then
746
				Torso.BrickColor = BrickColor.new("Lime green")
747
				if ShipTrail then
748
					ShipTrail.Color = ColorSequence.new(Color3.new(0,1,0))
749
				end
750
			elseif HP.Health > 40 then
751
				Torso.BrickColor = BrickColor.new("New Yeller")
752
				if ShipTrail then
753
					ShipTrail.Color = ColorSequence.new(Color3.new(1,1,0))
754
				end
755
			elseif HP.Health > 20 then
756
				Torso.BrickColor = BrickColor.new("Hot pink")
757
				if ShipTrail then
758
					ShipTrail.Color = ColorSequence.new(Color3.new(1,0,1))
759
				end
760
			else
761
				Torso.BrickColor = BrickColor.new("Really red")
762
				if ShipTrail then
763
					ShipTrail.Color = ColorSequence.new(Color3.new(1,0,0))
764
				end
765
			end
766
		end
767
		if owner and owner.Parent and owner.Neutral == false then
768
			local TeamColor = owner.TeamColor
769
			Torso.BrickColor = TeamColor
770
			ShipTrail.Color = ColorSequence.new(Torso.Color)
771
		end
772
		if Torso and PointLight then
773
			PointLight.Color = Torso.Color
774
		end
775
		if Torso and SpotLight then
776
			if HP.Health <= 40 then
777
				if SpotLight.Brightness == 5 then
778
					SpotLight.Brightness = 3.5
779
				elseif SpotLight.Brightness == 3.5 then
780
					SpotLight.Brightness = 1.5
781
				elseif SpotLight.Brightness == 1.5 then
782
					SpotLight.Brightness = 1
783
				elseif SpotLight.Brightness == 1 then
784
					SpotLight.Brightness = 2.5
785
				elseif SpotLight.Brightness == 2.5 then
786
					SpotLight.Brightness = 4.5
787
				elseif SpotLight.Brightness == 4.5 then
788
					SpotLight.Brightness = 5
789
				end
790
			else
791
				SpotLight.Brightness = 5
792
			end
793
		end
794
		wait(0.04)
795
	end
796
	end)()
797
798
mouse.Button1Down:connect(function()
799
	if attack == false then
800
		local ExplodingShot = (Fire <= -75)
801
		if SoundA then
802
			SoundA.PlaybackSpeed = 3.6
803
			SoundA:Play()
804
		end
805
		delay(0,function()
806
			Shoot(((Torso.CFrame * CFrame.Angles(math.rad(-90), 0, 0)) * CFrame.new(0,-1,-6)),Torso.BrickColor,ExplodingShot,false,Beam,Player)
807
		end)
808
	end
809
end)
810
811
while true do
812
	Swait()
813
	if attack == false then
814
		dir = root.CFrame:toObjectSpace(mouse.Hit).lookVector
815
		tframe = char.Torso.CFrame
816
		taim = mouse.Hit.p -( tframe.p )
817
		wld1.C0 = wld1.C0:lerp((CFrame.new(Vector3.new(),tframe:vectorToObjectSpace(taim))*CFrame.Angles(0,math.pi/2,0))+Vector3.new( 1, 0.5, 0 ), 0.5)
818
		clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(-math.asin(dir.y/1.25), 0, -math.asin(dir.x/1.25)), 0.3)
819
	end
820
end