View difference between Paste ID: Hr4gLAZV and LM2354PZ
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
3
4-
Me = Players.LocalPlayer
4+
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.Character
9
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = owner
63
	local Event = script:WaitForChild("UserInput_Event")
64
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})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
function giant(p, size)	
87
	local pchar = p.Character
88
	if pchar then
89
		local function scale(chr,scl)
90
		
91
			for _,v in pairs(pchar:GetChildren()) do
92
				if v:IsA("Hat") then
93
					v:Clone()
94
					v.Parent = game.Lighting
95
				end
96
			end
97
				
98
		    local Head = chr['Head']
99
		    local Torso = chr['Torso']
100
		    local LA = chr['Left Arm']
101
		    local RA = chr['Right Arm']
102
		    local LL = chr['Left Leg']
103
		    local RL = chr['Right Leg']
104
		    local HRP = chr['HumanoidRootPart']
105
		
106
		    wait(0.1)
107
		   
108
		    Head.formFactor = 3
109
		    Torso.formFactor = 3
110
		    LA.formFactor = 3
111
		    RA.formFactor = 3
112
		    LL.formFactor = 3
113
		    RL.formFactor = 3
114
		    HRP.formFactor = 3
115
		    
116
		    Head.Size = Vector3.new(scl * 2, scl, scl)
117
		    Torso.Size = Vector3.new(scl * 2, scl * 2, scl)
118
		    LA.Size = Vector3.new(scl, scl * 2, scl)
119
		    RA.Size = Vector3.new(scl, scl * 2, scl)
120
		    LL.Size = Vector3.new(scl, scl * 2, scl)
121
		    RL.Size = Vector3.new(scl, scl * 2, scl)
122
		    HRP.Size = Vector3.new(scl * 2, scl * 2, scl)
123
		    
124
		    local Motor1 = Instance.new('Motor6D', Torso)
125
		    Motor1.Part0 = Torso
126
		    Motor1.Part1 = Head
127
	    	Motor1.C0 = CFrame.new(0, 1 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
128
	    	Motor1.C1 = CFrame.new(0, -0.5 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
129
	    	Motor1.Name = "Neck"
130
				    
131
	    	local Motor2 = Instance.new('Motor6D', Torso)
132
	    	Motor2.Part0 = Torso
133
	    	Motor2.Part1 = LA
134
	    	Motor2.C0 = CFrame.new(-1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
135
	    	Motor2.C1 = CFrame.new(0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
136
	    	Motor2.Name = "Left Shoulder"
137
	    	
138
	    	local Motor3 = Instance.new('Motor6D', Torso)
139
	   		Motor3.Part0 = Torso
140
	    	Motor3.Part1 = RA
141
	    	Motor3.C0 = CFrame.new(1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
142
	    	Motor3.C1 = CFrame.new(-0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
143
	    	Motor3.Name = "Right Shoulder"
144
	    	
145
	    	local Motor4 = Instance.new('Motor6D', Torso)
146
	    	Motor4.Part0 = Torso
147
	    	Motor4.Part1 = LL
148
	    	Motor4.C0 = CFrame.new(-1 * scl, -1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
149
	    	Motor4.C1 = CFrame.new(-0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
150
	    	Motor4.Name = "Left Hip"
151
	    	
152
	    	local Motor5 = Instance.new('Motor6D', Torso)
153
	    	Motor5.Part0 = Torso
154
	    	Motor5.Part1 = RL
155
	    	Motor5.C0 = CFrame.new(1 * scl, -1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
156
	    	Motor5.C1 = CFrame.new(0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
157
	    	Motor5.Name = "Right Hip"
158
	    	
159
	    	local Motor6 = Instance.new('Motor6D', HRP)
160
	    	Motor6.Part0 = HRP
161
	    	Motor6.Part1 = Torso
162
	    	Motor6.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
163
	    	Motor6.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
164
	    	    
165
		end
166
		
167
		scale(pchar, size)
168
		pchar.Humanoid.WalkSpeed = 15 * size
169
	
170
		for _,v in pairs(game.Lighting:GetChildren()) do
171
			if v:IsA("Hat") then
172
				v.Parent = pchar
173
			end
174
		end
175
	end
176
end
177
178
local plr = owner
179
giant(plr,1)
180
181
182
local csize = 1
183
184
local sgui = owner
185
local base = Instance.new("Frame", sgui)
186
base.BackgroundTransparency = 1
187
base.Size = UDim2.new(0, 110, 0, 200)
188
base.Position = UDim2.new(1, -120, 1, -180)
189
local indicator = Instance.new("TextLabel", base)
190
indicator.Size = UDim2.new(1, 0, 0, 25)
191
indicator.TextColor3 = Color3.new(1, 1, 1)
192
indicator.BackgroundTransparency = 0
193
indicator.FontSize = Enum.FontSize.Size18
194
indicator.Font = Enum.Font.SourceSans
195
indicator.Text = "Current Size: 3"
196
local PlusOne = Instance.new("TextButton", base)
197
PlusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
198
PlusOne.Position = UDim2.new(0, 0, 0, 40)
199
PlusOne.Size = UDim2.new(1, 0, 0.5, -50)
200
PlusOne.BorderSizePixel = 2
201
PlusOne.Font = Enum.Font.SourceSansBold
202
PlusOne.FontSize = Enum.FontSize.Size24
203
PlusOne.Text = "+.1 Size"
204
local MinusOne = Instance.new("TextButton", base)
205
MinusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
206
MinusOne.Position = UDim2.new(0, 0, 0.5, 10)
207
MinusOne.Size = UDim2.new(1, 0, 0.5, -50)
208
MinusOne.Text = "-.1 Size"
209
MinusOne.BorderSizePixel = 2
210
MinusOne.Font = Enum.Font.SourceSansBold
211
MinusOne.FontSize = Enum.FontSize.Size24
212
213
PlusOne.MouseButton1Down:connect(function()
214
	csize = csize + .1
215
	giant(plr, csize)
216
	indicator.Text = "Current Size: "..tostring(csize)
217
end)
218
219
MinusOne.MouseButton1Down:connect(function()
220
	csize = csize - .1
221
	giant(plr, csize)
222
	indicator.Text = "Current Size: "..tostring(csize)
223
end)
224
--MADE BY OneLegend (NOT THE SCRIPT) Thanks to CyberFromLU for letting me Publish! LOCAL SCRIPT: JUST RUN!
225
-------------------------------------------------------------------------------------
226
Players = game:GetService("Players")
227
Me = owner
228
Char = Me.Character
229
necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) 
230
ShootColors = {"Bright yellow", "New Yeller", "Bright orange", "Neon orange", "Really red", "Bright red"}
231
PlaceId = game.PlaceId
232
233
Selected = false
234
Attacking = false
235
Accuracy = 5
236
Debounce = true
237
Hurt = false
238
Damage = {15,42}
239
240
ContentProvider = game:GetService("ContentProvider")
241
242
V3 = Vector3.new
243
C3 = Color3.new
244
BN = BrickColor.new
245
CN = CFrame.new
246
CA = CFrame.Angles
247
MR = math.rad
248
MRA = math.random
249
MP = math.pi
250
MH = math.huge
251
UD = UDim2.new
252
253
function RC(Pos, Dir, Max, Ignore)
254
	return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
255
end
256
257
function RayC(Start, En, MaxDist, Ignore)
258
	return RC(Start, (En - Start), MaxDist, Ignore)
259
end
260
261
function ComputePos(pos1, pos2)
262
	return CN(pos1, V3(pos2.x, pos1.y, pos2.z))
263
end
264
265
function DetectSurface(pos, part)
266
	local surface = nil
267
	local pospos = part.CFrame
268
	local pos2 = pospos:pointToObjectSpace(pos)
269
	local siz = part.Size
270
	local shaep = part.Shape
271
	if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
272
		surface = {"Anything", CN(pospos.p, pos)*CN(0, 0, -(pospos.p - pos).magnitude)*CA(MR(-90), 0, 0)}
273
	else
274
		if pos2.Y > ((siz.Y/2)-0.04) then
275
			surface = {"Top", CA(0, 0, 0)}
276
		elseif pos2.Y < -((siz.Y/2)-0.04) then
277
			surface = {"Bottom", CA(-MP, 0, 0)}
278
		elseif pos2.X > ((siz.X/2)-0.04) then
279
			surface = {"Right", CA(0, 0, MR(-90))}
280
		elseif pos2.X < -((siz.X/2)-0.04) then
281
			surface = {"Left", CA(0, 0, MR(90))}
282
		elseif pos2.Z > ((siz.Z/2)-0.04) then
283
			surface = {"Back", CA(MR(90), 0, 0)}
284
		elseif pos2.Z < -((siz.Z/2)-0.04) then
285
			surface = {"Front", CA(MR(-90), 0, 0)}
286
		end
287
	end
288
	return surface
289
end
290
291
function Compute(pos1, pos2)
292
	local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
293
	return CN(pos1, pos3)
294
end
295
296
function waitChild(n, p)
297
	local c = p:findFirstChild(n)
298
	if c then return c end
299
	while true do
300
		c = p.ChildAdded:wait()
301
		if c.Name == n then return c end
302
	end
303
end
304
305
function Notime(func)
306
	coroutine.resume(coroutine.create(function()
307
		func()
308
	end))
309
end
310
311
Torso = waitChild("Torso", Char)
312
Head = waitChild("Head", Char)
313
Rarm = waitChild("Right Arm", Char)
314
Larm = waitChild("Left Arm", Char)
315
Rleg = waitChild("Right Leg", Char)
316
Lleg = waitChild("Left Leg", Char)
317
Neck = waitChild("Neck", Torso)
318
Hum = waitChild("Humanoid", Char)
319
320
RSH = waitChild("Right Shoulder", Torso)
321
LSH = waitChild("Left Shoulder", Torso)
322
RH = waitChild("Right Hip", Torso)
323
LH = waitChild("Left Hip", Torso)
324
325
RSH.Part0 = Torso
326
LSH.Part0 = Torso
327
RH.Part0 = Torso
328
LH.Part0 = Torso
329
330
Add = {
331
	Mesh = function(P, ID, Scale, Tex)
332
		local m = Instance.new("SpecialMesh")
333
		m.MeshType = "FileMesh"
334
		m.MeshId = ID or ""
335
		m.Scale = Scale or V3(1, 1, 1)
336
		m.TextureId = Tex or ""
337
		m.Parent = P
338
		return m
339
	end,
340
	Sphere = function(P, Scale)
341
		local m = Instance.new("SpecialMesh")
342
		m.MeshType = "Sphere"
343
		m.Scale = Scale or V3(1, 1, 1)
344
		m.Parent = P
345
		return m
346
	end
347
}
348
349
Sounds = {
350
	Shoot = {Id = "http://www.roblox.com/asset/?id=2697431", Pitch = 0.3, Volume = 0.5},
351
	Boom = {Id = "http://www.roblox.com/asset/?id=2692806", Pitch = 0.55, Volume = 0.4},
352
	Slash = {Id = "rbxasset://sounds//swordslash.wav", Pitch = 0.5, Volume = 0.5},
353
	Hit = {Id = "http://www.roblox.com/asset/?id=2801263", Pitch = 0.85, Volume = 0.35},
354
	Reload = {Id = "rbxasset://sounds\\metal.ogg", Pitch = 1, Volume = 0.45},
355
}
356
357
for _,v in pairs(Sounds) do
358
	ContentProvider:Preload(v.Id)
359
end
360
361
function PlaySound(Sound, bool)
362
	local s = Instance.new("Sound")
363
	s.Looped = false
364
	s.Volume = Sound.Volume
365
	s.SoundId = Sound.Id
366
	if bool then
367
		s.Pitch = MRA((Sound.Pitch*0.75)*1000, (Sound.Pitch*1.15)*1000)/1000
368
	else
369
		s.Pitch = Sound.Pitch
370
	end
371
	s.PlayOnRemove = true
372
	s.Parent = Torso
373
	Notime(function()
374
		wait()
375
		s.Parent = nil
376
	end)
377
end
378
379
function GetParts(pos, dist)
380
	local parts = {}
381
	local function o(p)
382
		for _,v in pairs(p:children()) do
383
			if v:IsA("BasePart") then
384
				if (pos - v.Position).magnitude <= dist then
385
					table.insert(parts, {v, (pos - v.Position).magnitude, v.Anchored})
386
				end
387
			end
388
			o(v)
389
		end
390
	end
391
	o(workspace)
392
	return parts
393
end
394
395
function GetHum(P)
396
	for _,v in pairs(P:children()) do
397
		if v:IsA("Humanoid") then
398
			if v.Health > 0 then
399
				return v
400
			end
401
		end
402
	end
403
end
404
405
function GetGroup(Pos, Distance, Hit)
406
	local tab = {}
407
	for _,v in pairs(workspace:children()) do
408
		local h = GetHum(v)
409
		local t = v:findFirstChild("Torso")
410
		if h and t and v ~= Hit.Parent then
411
			if (t.Position - Pos).magnitude <= Distance then
412
				table.insert(tab, {h, v, (t.Position - Pos).magnitude})
413
			end
414
		end
415
	end
416
	if Hit then
417
		local h = GetHum(Hit.Parent)
418
		if h then
419
			table.insert(tab, {h, Hit.Parent, 0})
420
		end
421
	end
422
	return tab
423
end
424
425
function Tag(hum)
426
	if PlaceId == 48513881 then
427
		local tag = Instance.new("ObjectValue")
428
		tag.Name = "creator"
429
		tag.Value = Me
430
		tag.Parent = hum
431
	end
432
end
433
434
function Part(Par, Anc, Colli, Tran, Ref, Col, Siz)
435
	local p = Instance.new("Part")
436
	p.formFactor = "Custom"
437
	p.TopSurface = 0
438
	p.BottomSurface = 0
439
	p.Transparency = Tran
440
	p.Reflectance = Ref
441
	p.Anchored = Anc
442
	p.CanCollide = Colli
443
	p.BrickColor = Col
444
	p.Size = Siz
445
	p.Locked = true
446
	p.Parent = Par
447
	p:BreakJoints()
448
	return p
449
end
450
451
function Weld(P0, P1, C0, C1)
452
	local w = Instance.new("Weld")
453
	w.Part0 = P0
454
	w.Part1 = P1
455
	if C0 then
456
		w.C0 = C0
457
	end
458
	if C1 then
459
		w.C1 = C1
460
	end
461
	w.Parent = P0
462
	return w
463
end
464
465
for _,v in pairs(Char:children()) do
466
	if v.Name == "Hand Cannon" then
467
		v:remove()
468
	end
469
end
470
471
Model = Instance.new("Model")
472
Model.Name = "Hand Cannon"
473
474
FTorso = Part(Model, false, false, 1, 0, Torso.BrickColor, V3(2, 2, 1))
475
FW = Weld(Torso, FTorso)
476
477
RAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
478
LAB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
479
RLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
480
LLB = Part(Model, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
481
482
RABW = Weld(Torso, RAB, CN(), CN(-1.5, -0.5, 0))
483
LABW = Weld(Torso, LAB, CN(), CN(1.5, -0.5, 0))
484
RLBW = Weld(Torso, RLB, CN(), CN(-0.5, 1, 0))
485
LLBW = Weld(Torso, LLB, CN(), CN(0.5, 1, 0))
486
487
RAW = Weld(RAB, nil, CN(), CN(0, 0.5, 0))
488
LAW = Weld(LAB, nil, CN(), CN(0, 0.5, 0))
489
RLW = Weld(RLB, nil, CN(), CN(0, 1, 0))
490
LLW = Weld(LLB, nil, CN(), CN(0, 1, 0))
491
492
TW = Weld(Torso, nil, CN(0.7, 0.8, 1.2), CA(0, MR(180), MR(55)))
493
494
Weapon = Instance.new("Model")
495
Weapon.Name = "Cannon"
496
497
HB = Part(Weapon, false, false, 1, 0, BN("White"), V3(0.2, 0.2, 0.2))
498
HBW = Weld(Rarm, HB, CN(0, -0.7, 0), CA(0, MR(90), MR(90)))
499
HW = Weld(HB, nil)
500
501
Handle = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.5, 0.5, 0.3))
502
Add.Mesh(Handle, "http://www.roblox.com/asset/?id=3270017", V3(1, 0.7, 2.2), "")
503
TW.Part1 = Handle
504
505
Main = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(1.5, 1.5, 2.5))
506
Add.Mesh(Main, "http://www.roblox.com/asset/?id=3270017", V3(1.6, 1.6, 15), "")
507
Weld(Handle, Main, CA(0, MR(90), MR(90)), CN(1, 0, 0.2))
508
509
Main2 = Part(Weapon, false, false, 0, 0, BN("Gun metallic"), V3(1, 1, 1.5))
510
Add.Mesh(Main2, "http://www.roblox.com/asset/?id=3270017", V3(1.2, 1.2, 8), "")
511
Weld(Main, Main2, CN(), CN(0, 0, 1.7))
512
513
Handle2 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(0.5, 0.5, 0.3))
514
Add.Mesh(Handle2, "http://www.roblox.com/asset/?id=3270017", V3(0.7, 0.8, 2.2), "")
515
Weld(Main2, Handle2, CA(0, MR(90), MR(90)), CN(-0.65, 0, 0))
516
517
Tip = Part(Weapon, false, false, 0, 0, BN("Earth yellow"), V3(1.6, 1.6, 0.6))
518
Add.Sphere(Tip, V3(1.05, 1.05, 1))
519
Weld(Main, Tip, CN(), CN(0, 0, -1.15))
520
521
Tip4 = Part(Weapon, false, false, 0, 0, BN("Black"), V3(1.2, 1.2, 0.3))
522
Add.Mesh(Tip4, "http://www.roblox.com/asset/?id=3270017", V3(1.7, 1.7, 10), "")
523
Weld(Main, Tip4, CN(), CN(0, 0, -0.15))
524
525
for i = 1.3, 1.45, 0.1 do
526
	local Tip3 = Part(Weapon, false, false, 0, 0, BN("Dark grey"), V3(1.2, 1.2, 0.3))
527
	Add.Mesh(Tip3, "http://www.roblox.com/asset/?id=3270017", V3(i, i, 2), "")
528
	Weld(Main2, Tip3, CN(), CN(0, 0, 0.6))
529
end
530
531
for i = -0.95, 0.66, 1.55 do
532
	local Tip3 = Part(Weapon, false, false, 0, 0, BN("Dark Curry"), V3(1.2, 1.2, 0.3))
533
	Add.Mesh(Tip3, "http://www.roblox.com/asset/?id=3270017", V3(1.65, 1.65, 3), "")
534
	Weld(Main, Tip3, CN(), CN(0, 0, i))
535
end
536
537
for i = 1.3, 1.5, 0.1 do
538
	local Tip2 = Part(Weapon, false, false, 0, 0, BN("Earth yellow"), V3(1.6, 1.6, 0.6))
539
	Add.Mesh(Tip2, "http://www.roblox.com/asset/?id=3270017", V3(i, i, 2), "")
540
	Weld(Main, Tip2, CN(), CN(0, 0, 1.1))
541
end
542
543
for i = -0.3, 1, 0.15 do
544
	local p = Part(Weapon, false, false, 0.7, 0, BN("Black"), V3(0.2, 0.2, 0.2))
545
	Add.Sphere(p, V3(6, 6, 2))
546
	Weld(Main2, p, CN(0, 0, i))
547
end
548
549
function Show_Damage(P, D)
550
	local mo = Instance.new("Model")
551
	mo.Name = "- "..D
552
	local p = Part(mo, false, false, 0, 0, BN("Bright red"), V3(0.2, 0.2, 0.2))
553
	p.Name = "Head"
554
	local m = Instance.new("SpecialMesh")
555
	m.MeshType = "Brick"
556
	m.Scale = Vector3.new(4.5, 2.3, 4.5)
557
	m.Parent = p
558
	local bp = Instance.new("BodyPosition", p)
559
	bp.maxForce = V3(MH, MH, MH)
560
	bp.P = 9001
561
	bp.position = CN(P) * CN(0, 1.5, 0).p
562
	local h = Instance.new("Humanoid")
563
	h.Health = 0
564
	h.MaxHealth = 0
565
	h.Name = "asd"
566
	h.Parent = mo
567
	local nah = true
568
	mo.Parent = workspace
569
	p.CFrame = CN(P) 
570
	Notime(function()
571
		wait(1.5)
572
		for i = 0, 1, 0.05 do
573
			p.Transparency = i
574
			if nah then mo.Name = "" nah = false else mo.Name = "- "..D nah = true end
575
			wait()
576
		end
577
		mo:remove()
578
	end)
579
end
580
581
function Kill(hit)
582
	if Debounce and Hurt then
583
		local Hu = GetHum(hit.Parent)
584
		if Hu then
585
			Debounce = false
586
			local Dmg = MRA(Damage[1], Damage[2])
587
			Hu.Health = Hu.Health - Dmg
588
			Show_Damage(Tip.Position, Dmg)
589
			PlaySound(Sounds.Hit, true)
590
			Tag(Hu)
591
			local chance = MRA(1, 10)
592
			if chance >=5 then
593
				Hu.PlatformStand = true
594
				wait(0.15)
595
				hit.Velocity = (CN(Torso.CFrame * CN(0, 0.5, 0).p, hit.Position).lookVector * 45)
596
				hit.RotVelocity = V3(MRA(-10, 10), MRA(-10, 10), MRA(-10, 10))
597
				wait(0.3)
598
				Hu.PlatformStand = false
599
			end
600
		end
601
	end
602
end
603
604
Main.Touched:connect(Kill)
605
606
Weapon.Parent = Model
607
Model.Parent = Char
608
609
if script.Parent.className ~= "HopperBin" then
610
	h = Instance.new("HopperBin", Me.Backpack)
611
	h.Name = "Hand Cannon"
612
	script.Parent = h
613
end
614
615
bin = script.Parent
616
617
function Attach(t)
618
	RSH.Part0 = t
619
	LSH.Part0 = t
620
	RH.Part0 = t
621
	LH.Part0 = t
622
	RABW.Part0 = t
623
	LABW.Part0 = t
624
	LLBW.Part0 = t
625
	RLBW.Part0 = t
626
	if t == Torso then
627
		FTorso.Transparency = 1
628
	else
629
		Torso.Transparency = 1
630
	end
631
	t.Transparency = 0
632
end
633
634
function SelectAnim()
635
	RAW.Part1 = Rarm
636
	for i = 0.25, 1, 0.25 do
637
		RAW.C0 = CA(MR(-10*i), 0, MR(-5*i))
638
		wait()
639
	end
640
	for i = 0.1, 1, 0.1 do
641
		RAW.C0 = CA(MR(-10-90*i), 0, MR(-5-30*i))
642
		wait()
643
	end
644
	for i = 0.5, 1, 0.5 do
645
		RAW.C0 = CA(MR(-100-5*i), 0, MR(-35))
646
		wait()
647
	end
648
	HW.Part1 = Handle
649
	HW.C0 = CA(MR(50), 0, MR(-37))
650
	TW.Part1 = nil
651
	Attach(FTorso)
652
	LAW.Part1 = Larm
653
	for i = 0.25, 1, 0.25 do
654
		RAW.C0 = CA(MR(-105+10*i), 0, MR(-35+5*i))
655
		LAW.C0 = CA(MR(15*i), 0, MR(5*i))
656
		FW.C0 = CA(0, MR(-5*i), 0)
657
		HW.C0 = CA(MR(50-5*i), 0, MR(-37))
658
		wait()
659
	end
660
	for i = 0.06, 1, 0.06 do
661
		RAW.C0 = CA(MR(-95+95*i), MR(35*i), MR(-30+50*i))
662
		LAW.C0 = CA(MR(15+25*i), 0, MR(5+15*i)) * CN(0, -0.4*i, 0)
663
		FW.C0 = CA(0, MR(-5-30*i), 0)
664
		HW.C0 = CA(MR(45), 0, MR(-37+15*i))
665
		wait()
666
	end
667
	Hum.WalkSpeed = 10
668
	for i = 0.1, 1, 0.1 do
669
		RAW.C0 = CA(MR(15*i), MR(35+10*i), MR(20+8*i))
670
		LAW.C0 = CA(MR(40+7*i), 0, MR(20+6*i)) * CN(0, -0.4-0.2*i, 0)
671
		FW.C0 = CA(0, MR(-35-10*i), 0)
672
		HW.C0 = CA(MR(45-11*i), 0, MR(-22+15*i))
673
		wait()
674
	end
675
	for i = 0.25, 1, 0.25 do
676
		RAW.C0 = CA(MR(15+5*i), MR(45+5*i), MR(28+2*i))
677
		LAW.C0 = CA(MR(47+3*i), 0, MR(26+4*i)) * CN(0, -0.6, 0)
678
		FW.C0 = CA(0, MR(-45-5*i), 0)
679
		HW.C0 = CA(MR(34-4*i), 0, MR(-7+7*i))
680
		wait()
681
	end
682
end
683
684
function DeselAnim()
685
	for i = 0.25, 1, 0.25 do
686
		RAW.C0 = CA(MR(20-5*i), MR(50-5*i), MR(30-5*i))
687
		LAW.C0 = CA(MR(50-5*i), 0, MR(30-5*i)) * CN(0, -0.6+0.1*i, 0)
688
		FW.C0 = CA(0, MR(-50+5*i), 0)
689
		HW.C0 = CA(MR(30+5*i), 0, MR(-10*i))
690
		wait()
691
	end
692
	for i = 0.15, 1, 0.15 do
693
		RAW.C0 = CA(MR(15-30*i), MR(45-10*i), MR(25-5*i))
694
		LAW.C0 = CA(MR(45-20*i), 0, MR(25-15*i)) * CN(0, -0.5+0.2*i, 0)
695
		FW.C0 = CA(0, MR(-45+10*i), 0)
696
		HW.C0 = CA(MR(35+10*i), 0, MR(-10-15*i))
697
		wait()
698
	end
699
	for i = 0.12, 1, 0.12 do
700
		RAW.C0 = CA(MR(-15-70*i), MR(35-30*i), MR(20-30*i))
701
		LAW.C0 = CA(MR(25-25*i), 0, MR(10-10*i)) * CN(0, -0.3+0.3*i, 0)
702
		FW.C0 = CA(0, MR(-35+20*i), 0)
703
		HW.C0 = CA(MR(45+5*i), 0, MR(-25-12*i))
704
		wait()
705
	end
706
	LAW.Part1 = nil
707
	HW.C0 = CA(MR(50), 0, MR(-37))
708
	for i = 0.25, 1, 0.25 do
709
		RAW.C0 = CA(MR(-85-20*i), MR(5-5*i), MR(-10-25*i))
710
		FW.C0 = CA(0, MR(-15+15*i), 0)
711
		wait()
712
	end
713
	Attach(Torso)
714
	HW.Part1 = nil
715
	TW.Part1 = Handle
716
	Hum.WalkSpeed = 16
717
	for i = 0.15, 1, 0.15 do
718
		RAW.C0 = CA(MR(-105+95*i), 0, MR(-35+30*i))
719
		wait()
720
	end
721
	for i = 0.33, 1, 0.33 do
722
		RAW.C0 = CA(MR(-10+10*i), 0, MR(-5+5*i))
723
		wait()
724
	end
725
	RAW.Part1 = nil
726
end
727
728
--Norms:
729
--RAW.C0 = CA(MR(20), MR(50), MR(30))
730
--LAW.C0 = CA(MR(50), 0, MR(30)) * CN(0, -0.6, 0)
731
--FW.C0 = CA(0, MR(-50), 0)
732
--HW.C0 = CA(MR(30), 0, 0)
733
--
734
--
735
736
function Explode(Par, Pos, surface)
737
	Notime(function()
738
		local cf = CN(Pos) * CA(Par.CFrame:toEulerAnglesXYZ()) * surface[2] * CN(0, 1, 0)
739
		if surface[1] == "Anything" then
740
			cf = surface[2]
741
		end
742
		local col = Par.BrickColor.Color
743
		local r, g, b = col.r, col.g, col.b
744
		local col1, col2, col3 = C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100), C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100), C3(MRA(r*60, r*100)/100, MRA(g*60, g*100)/100, MRA(b*60, b*100)/100)
745
		local p = Part(workspace, true, false, 0, 0, BN(col1.r, col1.g, col1.b), V3(0.2, 0.2, 0.2))
746
		local p2 = Part(workspace, true, false, 0, 0, BN(col2.r, col2.g, col2.b), V3(0.2, 0.2, 0.2))
747
		local p3 = Part(workspace, true, false, 0, 0, BN(col3.r, col3.g, col3.b), V3(0.2, 0.2, 0.2))
748
		p.CFrame = cf
749
		p2.CFrame = cf
750
		p3.CFrame = cf
751
		local m = Add.Mesh(p, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
752
		local m2 = Add.Mesh(p2, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
753
		local m3 = Add.Mesh(p3, "http://www.roblox.com/asset/?id=20329976", V3(1, 1, 1))
754
		for i = -0.2, 1, 0.12 do
755
			p2.Transparency = i+0.1
756
			p.Transparency = i
757
			p3.Transparency = i+0.2
758
			m.Scale = V3(1+2.5*i, 1.4+1*i, 1+2.5*i)
759
			m2.Scale = V3(0.8+2*i, 1.2+1*i, 0.8+2*i)
760
			m3.Scale = V3(0.5+1*i, 1+1*i, 0.5+1*i)
761
			wait()
762
		end
763
		p2:remove()
764
		p3:remove()
765
		p:remove()
766
	end)
767
end
768
769
function Shoot(Pos)
770
	coroutine.resume(coroutine.create(function()
771
	local acc = Accuracy*100
772
	local Start = Main2.CFrame * CN(0, 0, -0.5).p
773
	local Face = CN(Start, Pos) * CA(MR(MRA(-acc, acc))/100, MR(MRA(-acc, acc))/100, MR(MRA(-acc, acc))/100)
774
	local Cannonball = Part(Model, true, false, 0, 0, BN("Black"), V3(1.3, 1.3, 1.3))
775
	Add.Sphere(Cannonball)
776
	Cannonball.CFrame = Face
777
	local Go = 3
778
	local Drop = 0.55/(Go*3)
779
	local Dist = 500
780
	local lastP = Start
781
	local omg = 0
782
	for i = Go, Dist, Go do
783
		Drop = Drop + 1/(Go*3)
784
		omg = omg + Drop
785
		local dropping = CA(MR(-Drop), 0, 0)
786
		if omg > 130 then
787
			dropping = CN()
788
		end
789
		Face = Face * dropping * CN(0, 0, -Go)
790
		Cannonball.CFrame = Face
791
		local Magn = (Face.p - lastP).magnitude
792
		local T = Part(Model, true, false, 0.1, 0, BN("Mid gray"), V3(0.2, 1, 0.2))
793
		local M = Instance.new("SpecialMesh",T)
794
		M.MeshType = "Head"
795
		M.Scale = V3(5, Magn, 5)
796
		T.CFrame = CN(lastP, Face.p) * CA(MR(-90), 0, 0) * CN(0, Magn/2, 0)
797
		Notime(function()
798
			wait(0.1)
799
			for i = 0.1, 1, 0.1 do
800
				T.Transparency = i+0.1
801
				M.Scale = V3(5-5*i, Magn+0.5, 5-5*i)
802
				wait()
803
			end
804
			T:remove()
805
		end)
806
		local Hit, Hitpos = RayC(lastP, Face.p, Go*2, Char)
807
		lastP = Face.p
808
		if Hit then
809
			PlaySound(Sounds.Boom, true)
810
			local s = DetectSurface(Hitpos, Hit)
811
			Explode(Hit, Hitpos, s)
812
			Cannonball.CFrame = CN(Hitpos)
813
			local hu = GetHum(Hit.Parent)
814
			if hu == nil and Hit.Parent.className ~= "Hat" and Hit.Anchored then
815
				coroutine.resume(coroutine.create(function()
816
					wait(10)
817
					for i = 0, 1, 0.04 do
818
						Cannonball.Transparency = i
819
						wait()
820
					end
821
					Cannonball:remove()
822
				end))
823
			else
824
				Cannonball:remove()
825
			end
826
			local Noobs = GetGroup(Hitpos, 5, Hit)
827
			for _,v in pairs(Noobs) do
828
				local dm = 60/((v[3]+3)/3)
829
				dm = MRA(dm*0.9, dm*1.04)
830
				v[1].Health = v[1].Health - dm
831
				local t = v[2]:findFirstChild("Head")
832
				if t then
833
					Show_Damage(t.Position, dm)
834
				end
835
				pcall(function()
836
				Tag(v[1])
837
				end)
838
			end
839
			local Parts = GetParts(Hitpos, 7)
840
			for _,v in pairs(Parts) do
841
				if v[3] == false then
842
					Notime(function()
843
						if v[1].Name == "Brick wall" then
844
							v[1]:BreakJoints()
845
							v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (110/((v[2]+2)/3)))
846
							wait(0.1)
847
							v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (110/((v[2]+2)/3)))
848
						else
849
							v[1].Velocity = (CN(Hitpos, v[1].Position).lookVector * (80/((v[2]+2)/3)))
850
						end
851
					end)
852
				end
853
			end
854
			break
855
		end
856
		wait()
857
	end
858
	end))
859
end
860
861
function ShootAnim(pos)
862
	RLW.Part1 = Rleg
863
	LLW.Part1 = Lleg
864
	local cf = ComputePos(Torso.Position, pos)
865
	local bp = Instance.new("BodyPosition",Torso)
866
	bp.maxForce = V3(MH, 0, MH)
867
	bp.P = 10000
868
	PlaySound(Sounds.Shoot, true)
869
	local effect = Part(Model, false, false, 0, 0, BN(ShootColors[MRA(1,#ShootColors)]), V3(0.2, 0.2, 0.2))
870
	local effect2 = Part(Model, false, false, 0, 0, BN(ShootColors[MRA(1,#ShootColors)]), V3(0.2, 0.2, 0.2))
871
	local m1 = Add.Mesh(effect, "http://www.roblox.com/asset/?id=20329976", V3(1,1,1))
872
	local m2 = Add.Mesh(effect2, "http://www.roblox.com/asset/?id=20329976", V3(1,1,1))
873
	local w1 = Weld(Main2, effect, CA(MR(-90), 0, 0), CN(0, -1, 0))
874
	local w2 = Weld(Main2, effect2, CA(MR(-90), 0, 0), CN(0, -1, 0))
875
	for i = 0, 1, 0.5 do
876
		RAW.C0 = CA(MR(20-50*i), MR(50-25*i), MR(30+45*i))
877
		LAW.C0 = CA(MR(50-10*i), 0, MR(30+20*i)) * CN(0, -0.6-0.3*i, 0)
878
		RLW.C0 = CA(MR(30*i), 0, MR(-15*i))
879
		LLW.C0 = CA(MR(10*i), 0, MR(-35*i))
880
		FW.C0 = CA(MR(5*i), MR(-50-15*i), 0)
881
		HW.C0 = CA(MR(30), MR(35*i), MR(-25*i))
882
		Neck.C0 = necko * CA(MR(10*i), 0, 0)
883
		bp.position = cf * CN(0, 0, 3*i).p
884
		m1.Scale = V3(0.5+0.6*i, 0.4+0.2*i, 0.5+0.6*i)
885
		m2.Scale = V3(0.3+0.5*i, 0.5+1*i, 0.3+0.5*i)
886
		w1.C1 = CN(0, -1-0.2*i, 0)
887
		w2.C1 = CN(0, -1-0.5*i, 0)
888
		effect.Transparency = 0.2*i
889
		effect2.Transparency = 0.2*i
890
		wait()
891
	end
892
	for i = 0.2, 1, 0.2 do
893
		RAW.C0 = CA(MR(-30-10*i), MR(25-5*i), MR(75+5*i))
894
		LAW.C0 = CA(MR(40-5*i), 0, MR(50+5*i)) * CN(0, -0.9-0.05*i, 0)
895
		RLW.C0 = CA(MR(30+5*i), 0, MR(-15))
896
		LLW.C0 = CA(MR(10+5*i), 0, MR(-35-5*i))
897
		FW.C0 = CA(MR(5+5*i), MR(-65-5*i), 0)
898
		HW.C0 = CA(MR(30), MR(35+5*i), MR(-25-5*i))
899
		Neck.C0 = necko * CA(MR(10+5*i), 0, 0)
900
		bp.position = cf * CN(0, 0, 3+1*i).p
901
		m1.Scale = V3(1+1*i, 0.7+0.9*i, 1+1*i)
902
		m2.Scale = V3(0.8+0.6*i, 1.5+1.6*i, 0.8+0.6*i)
903
		w1.C1 = CN(0, -1.2-0.6*i, 0)
904
		w2.C1 = CN(0, -1.5-1.8*i, 0)
905
		effect.Transparency = 0.2+0.9*i
906
		effect2.Transparency = 0.2+0.9*i
907
		wait()
908
	end
909
	effect:remove()
910
	effect2:remove()
911
	for i = 0.2, 1, 0.2 do
912
		bp.position = cf * CN(0, 0, 4+0.8*i).p
913
		wait()
914
	end
915
	for i = 0.08, 1, 0.06 do
916
		RAW.C0 = CA(MR(-40+50*i), MR(20+15*i), MR(80-35*i))
917
		LAW.C0 = CA(MR(35-30*i), 0, MR(55-45*i)) * CN(0, -0.95+0.5*i, 0)
918
		RLW.C0 = CA(MR(35-35*i), 0, MR(-15+25*i))
919
		LLW.C0 = CA(MR(15-15*i), 0, MR(-40+30*i))
920
		FW.C0 = CA(MR(10-7*i), MR(-70+40*i), 0)
921
		HW.C0 = CA(MR(30), MR(40-40*i), MR(-30-10*i))
922
		Neck.C0 = necko * CA(MR(15+5*i), 0, MR(20*i))
923
		bp.position = cf * CN(0, 0, 4.8+0.8*i).p
924
		wait()
925
	end
926
	bp:remove()
927
	for i = 0.33, 1, 0.33 do
928
		RAW.C0 = CA(MR(10+10*i), MR(35+5*i), MR(45-5*i))
929
		LAW.C0 = CA(MR(5), 0, MR(10)) * CN(0, -0.45+0.1*i, 0)
930
		FW.C0 = CA(MR(3-3*i), MR(-30+5*i), 0)
931
		HW.C0 = CA(MR(30), 0, MR(-40-10*i))
932
		wait()
933
	end
934
	for i = 0.12, 1, 0.12 do
935
		RAW.C0 = CA(MR(20+5*i), MR(40+5*i), MR(40+5*i))
936
		LAW.C0 = CA(MR(5), 0, MR(10)) * CN(0, -0.35-0.3*i, 0)
937
		FW.C0 = CA(0, MR(-25+5*i), 0)
938
		HW.C0 = CA(MR(30), 0, MR(-50-5*i))
939
		wait()
940
	end
941
	local b = Part(Model, false, false, 0, 0, BN("Black"), V3(1.1, 1.1, 1.1))
942
	local m = Add.Sphere(b)
943
	local w = Weld(Larm, b, CN(), CN(0, 1.4, 0))
944
	for i = 0.16, 1, 0.16 do
945
		LAW.C0 = CA(MR(5+30*i), 0, MR(10+10*i)) * CN(0, -0.65+0.65*i, 0)
946
		RAW.C0 = CA(MR(25), MR(45+3*i), MR(40))
947
		m.Scale = V3(0.5+0.5*i, 0.5+0.5*i, 0.5+0.5*i)
948
		Neck.C0 = necko * CA(MR(20-10*i), 0, MR(20-15*i))
949
		wait()
950
	end
951
	for i = 0.1, 1, 0.1 do
952
		LAW.C0 = CA(MR(35+105*i), 0, MR(20+20*i)) * CN(0, -0.9*i, 0)
953
		RAW.C0 = CA(MR(25), MR(48+6*i), MR(40))
954
		Neck.C0 = necko * CA(MR(10-10*i), 0, MR(5-35*i))
955
		wait()
956
	end
957
	for i = 0.16, 1, 0.16 do
958
		LAW.C0 = CA(MR(140-10*i), 0, MR(40-15*i)) * CN(0, -0.9-0.2*i, 0)
959
		RAW.C0 = CA(MR(25), MR(54), MR(40))
960
		Neck.C0 = necko * CA(MR(5*i), 0, MR(-30))
961
		w.C0 = CN(1.5*i, 0.55*i, 1.1*i)
962
		wait()
963
	end
964
	PlaySound(Sounds.Reload, true)
965
	b:remove()
966
	w:remove()
967
	for i = 0.2, 1, 0.2 do
968
		LAW.C0 = CA(MR(130-10*i), 0, MR(25-15*i)) * CN(0, -1.1+0.2*i, 0)
969
		RAW.C0 = CA(MR(25-10*i), MR(54), MR(40))
970
		Neck.C0 = necko * CA(MR(5-3*i), 0, MR(-30+5*i))
971
		HW.C0 = CA(MR(30), 0, MR(-55+10*i))
972
		FW.C0 = CA(0, MR(-20-5*i), 0)
973
		wait()
974
	end
975
	for i = 0.11, 1, 0.11 do
976
		LAW.C0 = CA(MR(120-60*i), 0, MR(10+15*i)) * CN(0, -0.9+0.3*i, 0)
977
		RAW.C0 = CA(MR(15+5*i), MR(54-4*i), MR(40-10*i))
978
		Neck.C0 = necko * CA(MR(2-2*i), 0, MR(-25+25*i))
979
		HW.C0 = CA(MR(30), 0, MR(-45+45*i))
980
		FW.C0 = CA(0, MR(-25-20*i), 0)
981
		RLW.C0 = CA(0, 0, MR(10-8*i))
982
		LLW.C0 = CA(0, 0, MR(-10+8*i))
983
		wait()
984
	end
985
	Neck.C0 = necko
986
	for i = 0.25, 1, 0.25 do
987
		LAW.C0 = CA(MR(60-10*i), 0, MR(25+5*i)) * CN(0, -0.6, 0)
988
		RAW.C0 = CA(MR(20), MR(50), MR(30))
989
		HW.C0 = CA(MR(30), 0, 0)
990
		FW.C0 = CA(0, MR(-45-5*i), 0)
991
		RLW.C0 = CA(0, 0, MR(2-2*i))
992
		LLW.C0 = CA(0, 0, MR(-2+2*i))
993
		wait()
994
	end
995
	RLW.Part1 = nil
996
	LLW.Part1 = nil
997
	RAW.C0 = CA(MR(20), MR(50), MR(30))
998
	LAW.C0 = CA(MR(50), 0, MR(30)) * CN(0, -0.6, 0)
999
	FW.C0 = CA(0, MR(-50), 0)
1000
	HW.C0 = CA(MR(30), 0, 0)
1001
	Neck.C0 = necko
1002
end
1003
1004
function Melee()
1005
	PlaySound(Sounds.Slash, true)
1006
	for i = 0.25, 1, 0.25 do
1007
		RAW.C0 = CA(MR(20+5*i), MR(50-5*i), MR(30+3*i))
1008
		LAW.C0 = CA(MR(50), 0, MR(30+4*i)) * CN(0, -0.6-0.05*i, 0)
1009
		HW.C0 = CA(MR(30), MR(5*i), 0)
1010
		FW.C0 = CA(0, MR(-50-5*i), 0)
1011
		wait()
1012
	end
1013
	for i = 0.12, 1, 0.12 do
1014
		RAW.C0 = CA(MR(25+25*i), MR(45-30*i), MR(33+7*i))
1015
		LAW.C0 = CA(MR(50), 0, MR(34+11*i)) * CN(0, -0.65-0.25*i, 0)
1016
		HW.C0 = CA(MR(30), MR(5+25*i), 0)
1017
		FW.C0 = CA(0, MR(-55-25*i), 0)
1018
		wait()
1019
	end
1020
	for i = 0.33, 1, 0.33 do
1021
		RAW.C0 = CA(MR(50+15*i), MR(15-5*i), MR(40-10*i)) * CN(0, -0.2*i, 0)
1022
		LAW.C0 = CA(MR(50+10*i), 0, MR(45-5*i)) * CN(0, -0.9+0.15*i, 0)
1023
		HW.C0 = CA(MR(30+2*i), MR(30+5*i), 0)
1024
		FW.C0 = CA(0, MR(-80+10*i), MR(-5*i))
1025
		wait()
1026
	end
1027
	Hurt = true
1028
	Debounce = true
1029
	for i = 0.07, 1, 0.07 do
1030
		RAW.C0 = CA(MR(65+55*i), MR(10), MR(30-70*i)) * CN(0, -0.2-1.1*i, 0)
1031
		LAW.C0 = CA(MR(60+120*i), 0, MR(40-70*i)) * CN(0, -0.75+0.7*i, 0)
1032
		HW.C0 = CA(MR(32+6*i), MR(35+20*i), MR(-4*i))
1033
		FW.C0 = CA(0, MR(-70+110*i), 0)
1034
		wait()
1035
	end
1036
	for i = 0.16, 1, 0.16 do
1037
		RAW.C0 = CA(MR(120+10*i), MR(10), MR(-40-5*i)) * CN(0, -1.3-0.1*i, 0)
1038
		LAW.C0 = CA(MR(180+15*i), 0, MR(-30-20*i)) * CN(0, -0.05+0.1*i, 0)
1039
		HW.C0 = CA(MR(38+2*i), MR(55-6*i), MR(-4-1*i))
1040
		FW.C0 = CA(0, MR(40+10*i), 0)
1041
		wait()
1042
	end
1043
	Hurt = false
1044
	for i = 0.2, 1, 0.2 do
1045
		RAW.C0 = CA(MR(130+5*i), MR(10), MR(-45-2*i)) * CN(0, -1.4-0.05*i, 0)
1046
		LAW.C0 = CA(MR(195+5*i), 0, MR(-50-8*i)) * CN(0, 0.05+0.05*i, 0)
1047
		HW.C0 = CA(MR(40), MR(49-2*i), MR(-5))
1048
		FW.C0 = CA(0, MR(50+3*i), 0)
1049
		wait()
1050
	end
1051
	wait(0.2)
1052
	for i = 0.2, 1, 0.2 do
1053
		RAW.C0 = CA(MR(135-10*i), MR(10+5*i), MR(-47+10*i)) * CN(0, -1.45+0.25*i, 0)
1054
		LAW.C0 = CA(MR(200-10*i), 0, MR(-58+10*i)) * CN(0, 0.1-0.1*i, 0)
1055
		HW.C0 = CA(MR(40), MR(47-5*i), MR(-5+5*i))
1056
		FW.C0 = CA(0, MR(53-10*i), 0)
1057
		wait()
1058
	end
1059
	for i = 0.08, 1, 0.08 do
1060
		RAW.C0 = CA(MR(125-90*i), MR(15+30*i), MR(-37+57*i)) * CN(0, -1.2+1.1*i, 0)
1061
		LAW.C0 = CA(MR(190-125*i), 0, MR(-48+68*i)) * CN(0, -0.5*i, 0)
1062
		HW.C0 = CA(MR(40-7*i), MR(42-37*i), 0)
1063
		FW.C0 = CA(0, MR(43-82*i), 0)
1064
		wait()
1065
	end
1066
	for i = 0.2, 1, 0.2 do
1067
		RAW.C0 = CA(MR(35-15*i), MR(45+5*i), MR(20+10*i)) * CN(0, -0.1+0.1*i, 0)
1068
		LAW.C0 = CA(MR(65-15*i), 0, MR(20+10*i)) * CN(0, -0.5-0.1*i, 0)
1069
		HW.C0 = CA(MR(33-3*i), MR(5-5*i), 0)
1070
		FW.C0 = CA(0, MR(-41-9*i), 0)
1071
		wait()
1072
	end
1073
	RLW.Part1 = nil
1074
	LLW.Part1 = nil
1075
	RAW.C0 = CA(MR(20), MR(50), MR(30))
1076
	LAW.C0 = CA(MR(50), 0, MR(30)) * CN(0, -0.6, 0)
1077
	FW.C0 = CA(0, MR(-50), 0)
1078
	HW.C0 = CA(MR(30), 0, 0)
1079
	Neck.C0 = necko
1080
end
1081
1082
function onSelected(mouse)
1083
	SelectAnim()
1084
	Selected = true
1085
	mouse.Button1Down:connect(function()
1086
		if Attacking == false then
1087
			Attacking = true
1088
			mouse.Button1Up:wait()
1089
			Shoot(mouse.Hit.p)
1090
			ShootAnim(mouse.Hit.p)
1091
			Attacking = false
1092
		end
1093
	end)
1094
	mouse.KeyDown:connect(function(key)
1095
		key = key:lower()
1096
		if key == "q" then
1097
			if Attacking == false then
1098
				Attacking = true
1099
				Melee()
1100
				Attacking = false
1101
			end
1102
		end
1103
	end)
1104
end
1105
1106
function onDeselected(mouse)
1107
	Selected = false
1108
	DeselAnim()
1109
end
1110
1111
bin.Selected:connect(onSelected)
1112
bin.Deselected:connect(onDeselected)