View difference between Paste ID: wshbizDL and hmAwDjLw
SHOW: | | - or go back to the newest paste.
1
-- This script has been converted to FE by iPxter
2
3
4-
Player=game:GetService("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-
local rs = game:GetService("RunService").RenderStepped
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-
mouse = Player:GetMouse()
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 = game:GetService("Players").LocalPlayer
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-
game:service'RunService'.RenderStepped:connect(function()
80+
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82-
    accuracyFrame.Position = UDim2.new(0, Player:GetMouse().X-accuracyFrame.Size.X.Offset/2, 0, Player:GetMouse().Y-accuracyFrame.Size.Y.Offset/2)
82+
83
	end]==],Player.Character)
84
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
--[[ FPS M1911 by KillerDarkness0105/Codex#6685]]--
87
88
89
Player= owner
90
Character=Player.Character
91
PlayerGui=Player.PlayerGui
92
Backpack=Player.Backpack
93
Torso=Character.Torso
94
Head=Character.Head
95
Humanoid=Character.Humanoid
96
LeftArm=Character["Left Arm"]
97
LeftLeg=Character["Left Leg"]
98
RightArm=Character["Right Arm"]
99
RightLeg=Character["Right Leg"]
100
LS=Torso["Left Shoulder"]
101
LH=Torso["Left Hip"]
102
RS=Torso["Right Shoulder"]
103
RH=Torso["Right Hip"]
104
Face = Head.face
105
Neck=Torso.Neck
106
it=Instance.new
107
attacktype=1
108
attacktype2=1
109
vt=Vector3.new
110
it=Instance.new
111
cf=CFrame.new
112
cn=CFrame.new
113
euler=CFrame.fromEulerAnglesXYZ
114
angles=CFrame.Angles
115
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
116
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
117
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
118
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
119
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
120
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
121
RootPart=Character.HumanoidRootPart
122
RootJoint=RootPart.RootJoint
123
RootCF=euler(-1.57,0,3.14)
124
attack = false
125
local Effects = {}
126
 attackspeed = 0.14 
127
 df = false
128
 Swing = 1
129
local sine = 0
130
local change = 1
131
local val = 0
132
local speed = 0
133
cam = workspace.CurrentCamera
134
local RbxUtility = LoadLibrary("RbxUtility")
135
local Create = RbxUtility.Create
136
deb = game:GetService("Debris")
137
Player.CameraMode = 1
138
local aim = false
139
			local lerp = function(a, b, t)
140
			    	return a * (1 - t) + b * t
141
 end
142
 
143
 
144
 
145
 
146
 
147
 
148
 
149
 
150
 
151
 
152
 	         local accuracymain = Instance.new("ScreenGui", Player.PlayerGui)
153
154
accuracymain.Name = 'GunAccuracyFrame'
155
156
local accuracyFrame = Instance.new("Frame", accuracymain)
157
158
accuracyFrame.Size = UDim2.new(0, 30, 0, 30)
159
160
accuracyFrame.BackgroundTransparency = 1
161
162
163
end)
164
165
local accuracy1 = Instance.new("Frame", accuracyFrame)
166
167
accuracy1.BackgroundColor = BrickColor.new("White")
168
169
accuracy1.Size = UDim2.new(0, 8, 0, 2)
170
171
accuracy1.Position = UDim2.new(0, 0, .5, -1)
172
173
local accuracy2 = Instance.new("Frame", accuracyFrame)
174
175
accuracy2.BackgroundColor = BrickColor.new("White")
176
177
accuracy2.Size = UDim2.new(0, 8, 0, 2)
178
179
accuracy2.Position = UDim2.new(1, -8, .5, -1)
180
181
local accuracy3 = Instance.new("Frame", accuracyFrame)
182
183
accuracy3.BackgroundColor = BrickColor.new("White")
184
185
accuracy3.Size = UDim2.new(0, 2, 0, 8)
186
187
accuracy3.Position = UDim2.new(.5, -1, 0, 0)
188
189
local accuracy4 = Instance.new("Frame", accuracyFrame)
190
191
accuracy4.BackgroundColor = BrickColor.new("White")
192
193
accuracy4.Size = UDim2.new(0, 2, 0, 8)
194
195
accuracy4.Position = UDim2.new(.5, -1, 1, -8)
196
197
accuracyFrame.Visible = true
198
199
	         
200
    mouse.Icon = "http://www.roblox.com/asset?id=75216962"
201
		
202
 
203
 
204
 
205
 
206
	
207
208
New = function(Object, Parent, Name, Data)
209
	local Object = Instance.new(Object)
210
	for Index, Value in pairs(Data or {}) do
211
		Object[Index] = Value
212
	end
213
	Object.Parent = Parent
214
	Object.Name = Name
215
	return Object
216
end
217
K1911 = New("Model",Character,"K1911",{})
218
Handle = New("Part",K1911,"Handle",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.530000031, 1.11000001, 0.269999951),CFrame = CFrame.new(-34.6798782, 2.69211316, -16, 0.994522989, 0.104528531, 0, -0.104528464, 0.994521201, 0, 0, 0, 1.00000072),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
219
Triggermesh = New("Part",K1911,"Triggermesh",{BrickColor = BrickColor.new("Dark stone grey"),Reflectance = 0.10000000149012,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.179999992, 0.25999999, 0.0599999726),CFrame = CFrame.new(-34.2399559, 3.03731799, -15.9999371, 0.390543848, 0.920583785, -0.00219476013, 0.920583367, -0.390543371, 0.000196098365, -0.000676624477, -0.00209704484, -0.999998927),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
220
Mesh = New("SpecialMesh",Triggermesh,"Mesh",{Scale = Vector3.new(0.333333343, 0.466666669, 0.666666687),MeshId = "http://www.roblox.com/asset/?id=3270017",MeshType = Enum.MeshType.FileMesh,})
221
mot = New("Motor",Triggermesh,"mot",{Part0 = Triggermesh,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.390543371, 0.920584202, -0.000676623837, 0.920582354, -0.39054364, -0.00209704298, -0.00219475664, 0.00019609835, -0.999997973),C1 = CFrame.new(0.401428223, 0.389298439, 6.29425049e-05, 0.994522274, -0.104528472, 0, 0.104528494, 0.994521677, 0, 0, 0, 1.00000024),})
222
bullethole = New("Part",K1911,"bullethole",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.809999943, 0.189999968, 0.189999968),CFrame = CFrame.new(-33.333004, 3.3820014, -16, 1.00000179, -9.68575478e-08, 0, -1.11758709e-07, 0.999998868, 0, 0, 0, 1.00000119),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
223
mot = New("Motor",bullethole,"mot",{Part0 = bullethole,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000036, -2.98023224e-08, 0, -1.49011612e-08, 0.999999762, 0, 0, 0, 1.00000024),C1 = CFrame.new(1.26737976, 0.826895952, 0, 0.994522274, -0.104528472, 0, 0.104528494, 0.994521677, 0, 0, 0, 1.00000024),})
224
Part = New("Part",K1911,"Part",{Material = Enum.Material.SmoothPlastic,Reflectance = 0.11999999731779,Size = Vector3.new(1.98999989, 0.370000035, 0.289999992),CFrame = CFrame.new(-33.9300079, 3.37500191, -16, 1.00000036, -1.49011612e-08, 0, -2.23517418e-08, 0.999999762, 0, 0, 0, 1.00000024),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
225
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000036, -2.23517418e-08, 0, -1.49011612e-08, 0.999999762, 0, 0, 0, 1.00000024),C1 = CFrame.new(0.674381256, 0.757531166, 0, 0.994522274, -0.104528472, 0, 0.104528494, 0.994521677, 0, 0, 0, 1.00000024),})
226
Part = New("Part",K1911,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(1.05999994, 0.179999977, 0.249999985),CFrame = CFrame.new(-33.8850136, 3.13003469, -16, 1.00000322, -1.71363354e-07, 0, -1.86264515e-07, 0.999997973, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
227
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -6.70552254e-08, 0, -5.21540642e-08, 0.999999344, 0, 0, 0, 1.00000072),C1 = CFrame.new(0.744735718, 0.518609047, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
228
Part = New("Part",K1911,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.620000005, 0.229999989, 0.229999989),CFrame = CFrame.new(-33.2650108, 3.1581521, -16, 1.00000322, -1.71363354e-07, 0, -1.86264515e-07, 0.999997973, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
229
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -6.70552254e-08, 0, -5.21540642e-08, 0.999999344, 0, 0, 0, 1.00000072),C1 = CFrame.new(1.35840225, 0.611380339, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
230
Part = New("Part",K1911,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.530000031, 1.07000005, 0.189999953),CFrame = CFrame.new(-34.611969, 2.67222261, -16, 0.994525135, 0.104528643, 0, -0.104528435, 0.99451983, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
231
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),C1 = CFrame.new(0.0696144104, -0.0126833916, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
232
Clip = New("Part",K1911,"Clip",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.420000017, 1.07000005, 0.189999953),CFrame = CFrame.new(-34.6671104, 2.66717649, -16, 0.994525135, 0.104528643, 0, -0.104528435, 0.99451983, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
233
mot = New("Motor",Clip,"mot",{Part0 = Clip,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),C1 = CFrame.new(0.0153045654, -0.023465395, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
234
bhole = New("Part",K1911,"bhole",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(1.66999996, 0.169999972, 0.169999972),CFrame = CFrame.new(-33.7600136, 3.38231826, -16, 1.00000322, -1.71363354e-07, 0, -1.86264515e-07, 0.999997973, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
235
mot = New("Motor",bhole,"mot",{Part0 = bhole,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -6.70552254e-08, 0, -5.21540642e-08, 0.999999344, 0, 0, 0, 1.00000072),C1 = CFrame.new(0.84267807, 0.782576561, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
236
Part = New("Part",K1911,"Part",{BrickColor = BrickColor.new("Burnt Sienna"),Material = Enum.Material.Wood,Size = Vector3.new(0.370000064, 0.920000076, 0.280000001),CFrame = CFrame.new(-34.6795921, 2.66959429, -16, 0.994525135, 0.104528643, 0, -0.104528435, 0.99451983, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.415686, 0.223529, 0.0352941),})
237
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),C1 = CFrame.new(0.00263977051, -0.0223655701, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
238
Part = New("Part",K1911,"Part",{Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.289999962, 0.160000041, 0.160000041),CFrame = CFrame.new(-34.7095528, 2.37562132, -16, 1.09896426e-07, -1.71363354e-07, -1.00000322, -2.04281037e-14, 0.999997914, 1.86264515e-07, 1.00000215, 0, 1.09896298e-07),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
239
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.09896185e-07, -7.10542736e-15, 1.00000072, -5.21540642e-08, 0.999999285, 0, -1.00000107, 6.70552254e-08, 1.09896142e-07),C1 = CFrame.new(0.00357055664, -0.317860126, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
240
Part = New("Part",K1911,"Part",{Material = Enum.Material.SmoothPlastic,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.289999962, 0.160000026, 0.160000026),CFrame = CFrame.new(-34.6395531, 2.95001388, -16, 1.09896426e-07, -1.71363354e-07, -1.00000322, -2.04281037e-14, 0.999997795, 1.86264515e-07, 1.00000215, 0, 1.09896298e-07),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
241
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.09896185e-07, -7.10542736e-15, 1.00000072, -5.21540642e-08, 0.999999166, 0, -1.00000107, 6.70552254e-08, 1.09896142e-07),C1 = CFrame.new(0.0131454468, 0.260703087, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
242
Part = New("Part",K1911,"Part",{BrickColor = BrickColor.new("Really black"),Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.189999953, 0.119999975, 0.119999975),CFrame = CFrame.new(-33.0400124, 3.15800071, -16, 1.00000322, -1.78813934e-07, 0, -1.86264515e-07, 0.999997735, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
243
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -6.70552254e-08, 0, -5.96046448e-08, 0.999999106, 0, 0, 0, 1.00000072),C1 = CFrame.new(1.58218384, 0.634748459, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
244
Part = New("Part",K1911,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(0.110000029, 0.109999999, 0.200000003),CFrame = CFrame.new(-34.8181458, 3.55000734, -15.9967442, 1.00000322, -1.86264515e-07, 0, -1.86264515e-07, 0.999997735, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
245
mot = New("Motor",Part,"mot",{Part0 = Part,C1 = CFrame.new(-0.0431270599, 0.729999065, -0.00174999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
246
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -6.70552254e-08, 0, -6.70552254e-08, 0.999999106, 0, 0, 0, 1.00000072),C1 = CFrame.new(-0.227184296, 0.838742256, 0.00325584412, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
247
Part = New("Part",K1911,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(0.110000029, 0.0500000007, 0.0500000082),CFrame = CFrame.new(-34.8181458, 3.63000631, -16.0717449, 1.00000322, -1.86264515e-07, 0, -1.86264515e-07, 0.999997735, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
248
mot = New("Motor",Part,"mot",{Part0 = Part,C1 = CFrame.new(-0.0431270599, 0.729999065, -0.00174999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
249
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -6.70552254e-08, 0, -6.70552254e-08, 0.999999106, 0, 0, 0, 1.00000072),C1 = CFrame.new(-0.235546112, 0.918303013, -0.0717449188, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
250
Part = New("Part",K1911,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(0.110000029, 0.0500000007, 0.0500000007),CFrame = CFrame.new(-34.8181419, 3.62999988, -15.9217443, 1.00000322, -1.86264515e-07, 0, -1.86264515e-07, 0.999997735, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
251
mot = New("Motor",Part,"mot",{Part0 = Part,C1 = CFrame.new(-0.0431270599, 0.729999065, -0.00174999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
252
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -6.70552254e-08, 0, -6.70552254e-08, 0.999999106, 0, 0, 0, 1.00000072),C1 = CFrame.new(-0.235542297, 0.918297052, 0.0782556534, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
253
Part = New("Part",K1911,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.10999997, 0.179999977, 0.0500000007),CFrame = CFrame.new(-34.220005, 3.02002287, -16, 0.981630385, -0.190809816, 0, 0.190808371, 0.981624961, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
254
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.981628299, 0.190808743, 0, -0.19080928, 0.981626272, 0, 0, 0, 1.00000072),C1 = CFrame.new(0.42307663, 0.374183416, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
255
Part = New("Part",K1911,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(0.100000069, 0.139999986, 0.0800000057),CFrame = CFrame.new(-33.0113029, 3.55999947, -16, 1.00000322, -1.78813934e-07, 0, -2.01165676e-07, 0.999997735, 0, 0, 0, 1.00000215),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
256
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000107, -8.19563866e-08, 0, -5.96046448e-08, 0.999999106, 0, 0, 0, 1.00000072),C1 = CFrame.new(1.56871414, 1.03754616, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
257
Part = New("Part",K1911,"Part",{Material = Enum.Material.Metal,Shape = Enum.PartType.Cylinder,Size = Vector3.new(0.080000028, 0.119999945, 0.119999945),CFrame = CFrame.new(-34.9629974, 3.43419743, -16, 0, -1.86264515e-07, 1.00000334, 0, 0.999997735, -1.93715096e-07, -1.00000226, 0, 0),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
258
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0, 0, -1.00000083, -6.70552254e-08, 0.999999106, 0, 1.00000119, -7.4505806e-08, 0),C1 = CFrame.new(-0.359138489, 0.708425283, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
259
Part = New("Part",K1911,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(0.120000049, 0.160000026, 0.0800000727),CFrame = CFrame.new(-34.9034996, 3.41254854, -16, 0.777148902, 0.62932241, 0, -0.629318953, 0.777144134, 0, 0, 0, 1.00000238),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
260
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.777147114, -0.629319727, 0, 0.629321098, 0.777145267, 0, 0, 0, 1.00000095),C1 = CFrame.new(-0.297702789, 0.693114519, 0, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
261
Part = New("Part",K1911,"Part",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.459999889, 0.24000001, 0.179999948),CFrame = CFrame.new(-33.6749954, 3.41999912, -15.9449997, 1.00000358, -1.93715096e-07, 0, -2.01165676e-07, 0.999997735, 0, 0, 0, 1.00000238),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
262
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 1.00000143, -8.19563866e-08, 0, -7.4505806e-08, 0.999999106, 0, 0, 0, 1.00000095),C1 = CFrame.new(0.923290253, 0.828937769, 0.0550003052, 0.994522989, -0.104528464, 0, 0.104528531, 0.994521201, 0, 0, 0, 1.00000072),})
263
264
				 local NewInstance = function(instance,parent,properties)
265
		    local inst = Instance.new(instance,parent)
266
		    if(properties)then
267
		        for i,v in next, properties do
268
		            pcall(function() inst[i] = v end)
269
		        end
270
		    end
271
		    return inst;
272
		end
273
		
274
		
275
		local HW = NewInstance('Weld',Character,{Part0=RightArm,Part1=Handle,C0 = CFrame.new(0,-0.72,-0.14)*CFrame.Angles(math.rad(-95),math.rad(90),math.rad(0))})
276
		
277
		
278
		
279
				
280
				       so = function(id,par,vol,pit)
281
		coroutine.resume(coroutine.create(function()
282
		local sou = Instance.new("Sound",par or workspace)
283
		sou.Volume=vol
284
		sou.Pitch=pit or 1
285
		sou.SoundId=id
286
		sou:play()
287
		game:GetService("Debris"):AddItem(sou,8)
288
		end))
289
		end
290
		
291-
		    mouse=Player:GetMouse()
291+
292
	function clerp(a,b,t)
293
		local qa = {QuaternionFromCFrame(a)}
294
		local qb = {QuaternionFromCFrame(b)}
295
		local ax, ay, az = a.x, a.y, a.z
296
		local bx, by, bz = b.x, b.y, b.z
297
		local _t = 1-t
298
		return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
299
		end
300
		 
301
		function QuaternionFromCFrame(cf)
302
		local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
303
		local trace = m00 + m11 + m22
304
		if trace > 0 then
305
		local s = math.sqrt(1 + trace)
306
		local recip = 0.5/s
307
		return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
308
		else
309
		local i = 0
310
		if m11 > m00 then
311
		i = 1
312
		end
313
		if m22 > (i == 0 and m00 or m11) then
314
		i = 2
315
		end
316
		if i == 0 then
317
		local s = math.sqrt(m00-m11-m22+1)
318
		local recip = 0.5/s
319
		return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
320
		elseif i == 1 then
321
		local s = math.sqrt(m11-m22-m00+1)
322
		local recip = 0.5/s
323
		return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
324
		elseif i == 2 then
325
		local s = math.sqrt(m22-m00-m11+1)
326
		local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
327
		end
328
		end
329
		end
330
		
331
332
		
333
		function QuaternionToCFrame(px, py, pz, x, y, z, w)
334
		local xs, ys, zs = x + x, y + y, z + z
335
		local wx, wy, wz = w*xs, w*ys, w*zs
336
		local xx = x*xs
337
		local xy = x*ys
338
		local xz = x*zs
339
		local yy = y*ys
340
		local yz = y*zs
341
		local zz = z*zs
342
		return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
343
		end
344
		function QuaternionSlerp(a, b, t)
345
		local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
346
		local startInterp, finishInterp;
347
		if cosTheta >= 0.0001 then
348
		if (1 - cosTheta) > 0.0001 then
349
		local theta = math.acos(cosTheta)
350
		local invSinTheta = 1/math.sin(theta)
351
		startInterp = math.sin((1-t)*theta)*invSinTheta
352
		finishInterp = math.sin(t*theta)*invSinTheta  
353
		else
354
		startInterp = 1-t
355
		finishInterp = t
356
		end
357
		else
358
		if (1+cosTheta) > 0.0001 then
359
		local theta = math.acos(-cosTheta)
360
		local invSinTheta = 1/math.sin(theta)
361
		startInterp = math.sin((t-1)*theta)*invSinTheta
362
		finishInterp = math.sin(t*theta)*invSinTheta
363
		else
364
		startInterp = t-1
365
		finishInterp = t
366
		end
367
		end
368
		return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
369
		end
370
--save shoulders
371
		RSH, LSH=nil, nil
372
		--welds
373
		RW, LW=Instance.new("Weld"), Instance.new("Weld")
374
		RW.Name="Right Shoulder" LW.Name="Left Shoulder"
375
		LH=Torso["Left Hip"]
376
		RH=Torso["Right Hip"]
377
		TorsoColor=Torso.BrickColor
378
		function NoOutline(Part)
379
		Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
380
		end
381
		player=Player
382
		ch=Character
383
		RSH=ch.Torso["Right Shoulder"]
384
		LSH=ch.Torso["Left Shoulder"]
385
		--
386
		RSH.Parent=nil
387
		LSH.Parent=nil
388
		--
389
		RW.Name="Right Shoulder"
390
		RW.Part0=ch.Torso
391
		RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
392
		RW.C1=cf(0, 0.5, 0)
393
		RW.Part1=ch["Right Arm"]
394
		RW.Parent=ch.Torso
395
		--
396
		LW.Name="Left Shoulder"
397
		LW.Part0=ch.Torso
398
		LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
399
		LW.C1=cf(0, 0.5, 0)
400
		LW.Part1=ch["Left Arm"]
401
		LW.Parent=ch.Torso
402
		
403
				    ArtificialHB = Instance.new("BindableEvent", script)
404
		ArtificialHB.Name = "Heartbeat"
405
		 
406
		script:WaitForChild("Heartbeat")
407
		 
408
		frame = 1 / 80
409
		tf = 0
410
		allowframeloss = false
411
		tossremainder = false
412
		lastframe = tick()
413
		script.Heartbeat:Fire()
414
		game:GetService("RunService").Heartbeat:connect(function(s, p)
415
		    tf = tf + s
416
		    if tf >= frame then
417
		        if allowframeloss then
418
		            script.Heartbeat:Fire()
419
		            lastframe = tick()
420
		        else
421
		            for i = 1, math.floor(tf / frame) do
422
		                script.Heartbeat:Fire()
423
		            end
424
		            lastframe = tick()
425
		        end
426
		        if tossremainder then
427
		            tf = 0
428
		        else
429
		            tf = tf - frame * math.floor(tf / frame)
430
		        end
431
		    end
432
		end)
433
		 
434
--[[]
435
		function swait(num)
436
		    if num == 0 or num == nil then
437
		        ArtificialHB.Event:wait()
438
		    else
439
		        for i = 0, num do
440
		            ArtificialHB.Event:wait()
441
		        end
442
		    end
443
	end
444
445
	]]
446
	
447
448
	function swait(num)
449
	if num == 0 or num == nil then
450
		game:service("RunService").Stepped:wait()
451
	else
452
		for i = 0, num do
453
			game:service("RunService").Stepped:wait()
454
		end
455
	end
456
end
457
458
459
game:GetService("UserInputService").MouseIconEnabled = false
460
461
462
463
464
465
466
467
468
 
469
470
471
472
473
474
		function RemoveOutlines(part)
475
		    part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
476
		end
477
		   
478
479
480
481
482
483
484
485
486
487
		F1 = Instance.new("Folder", Character)
488
		F1.Name = "Effects Folder"
489
		F2 = Instance.new("Folder", F1)
490
		F2.Name = "Effects"
491
		Triangle = function(a, b, c)
492
		end
493
		
494
MagicBlock = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, parent)
495
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
496
  prt.Anchored = true
497
  prt.CFrame = cframe
498
  msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
499
  game:GetService("Debris"):AddItem(prt, 10)
500
  if Type == 1 or Type == nil then
501
    table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh})
502
  else
503
    if Type == 2 then
504
      table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh})
505
    else
506
      if Type == 3 then
507
        table.insert(Effects, {prt, "Block3", delay, x3, y3, z3, msh, prt.CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 0})
508
      end
509
    end
510
  end
511
end
512
MagicSkull = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
513
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
514
  prt.Anchored = true
515
  prt.CFrame = cframe
516
  msh = mesh("SpecialMesh", prt, "FileMesh", "14028428", vt(0, 0, 0), vt(x1, y1, z1))
517
  game:GetService("Debris"):AddItem(prt, 10)
518
  table.insert(Effects, {prt, "Skull", delay, x3, y3, z3, msh, goe})
519
end
520
MagicCircle = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
521
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
522
  prt.Anchored = true
523
  prt.CFrame = cframe
524
  local msh = mesh("SpecialMesh", prt, "Sphere", "nil", vt(0, 0, 0), vt(x1, y1, z1))
525
  game:GetService("Debris"):AddItem(prt, 10)
526
  table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
527
end
528
MagicRing = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
529
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
530
  prt.Anchored = true
531
  prt.CFrame = cframe * cf(x2, y2, z2)
532
  local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1))
533
  game:GetService("Debris"):AddItem(prt, 10)
534
  table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
535
end
536
MagicCircle2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, push)
537
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
538
  prt.Anchored = true
539
  prt.CFrame = cframe
540
  local msh = mesh("SpecialMesh", prt, "Sphere", "nil", vt(0, 0, 0), vt(x1, y1, z1))
541
  game:GetService("Debris"):AddItem(prt, 10)
542
  table.insert(Effects, {prt, "Blood", delay, x3, y3, z3, msh, push})
543
end
544
MagicCylinder = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
545
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
546
  prt.Anchored = true
547
  prt.CFrame = cframe
548
  local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
549
  game:GetService("Debris"):AddItem(prt, 10)
550
  table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
551
end
552
MagicCylinder2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
553
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
554
  prt.Anchored = true
555
  prt.CFrame = cframe
556
  local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
557
  game:GetService("Debris"):AddItem(prt, 10)
558
  table.insert(Effects, {prt, "Cylinder2", delay, x3, y3, z3, msh, goe})
559
end
560
MagicHead = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
561
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
562
  prt.Anchored = true
563
  prt.CFrame = cframe
564
  local msh = mesh("SpecialMesh", prt, "Head", "nil", vt(0, 0, 0), vt(x1, y1, z1))
565
  game:GetService("Debris"):AddItem(prt, 10)
566
  table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
567
end
568
ClangEffect = function(brickcolor, cframe, duration, decrease, size, power)
569
  local prt = part(3, workspace, 0, 1, brickcolor, "Effect", vt())
570
  prt.Anchored = true
571
  prt.CFrame = cframe
572
  local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(5, 5, 5))
573
  game:GetService("Debris"):AddItem(prt, 10)
574
  table.insert(Effects, {prt, "CylinderClang", duration, decrease, size, power, prt.CFrame, nil})
575
end
576
MagicWave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
577
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
578
  prt.Anchored = true
579
  prt.CFrame = cframe
580
  local msh = mesh("SpecialMesh", prt, "FileMesh", "20329976", vt(0, 0, 0), vt(x1, y1, z1))
581
  game:GetService("Debris"):AddItem(prt, 10)
582
  table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
583
end
584
MagicFire = function(brickcolor, cframe, x1, y1, z1, delay)
585
  local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
586
  prt.Anchored = true
587
  prt.CFrame = cframe
588
  msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
589
  game:GetService("Debris"):AddItem(prt, 10)
590
  table.insert(Effects, {prt, "Fire", delay, 1, 1, 1, msh})
591
end
592
MagicFireWave = function(brickcolor, cframe, x1, y1, z1)
593
  local prt = part(3, workspace, 0, 1, brickcolor, "Effect", vt())
594
  prt.Anchored = true
595
  prt.CFrame = cframe
596
  msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
597
  d = Instance.new("Decal")
598
  d.Parent = prt
599
  d.Texture = "http://www.roblox.com/asset/?id=26356434"
600
  d.Face = "Top"
601
  d = Instance.new("Decal")
602
  d.Parent = prt
603
  d.Texture = "http://www.roblox.com/asset/?id=26356434"
604
  d.Face = "Bottom"
605
  game:GetService("Debris"):AddItem(prt, 10)
606
  table.insert(Effects, {prt, "FireWave", 1, 30, math.random(400, 600) / 100, msh})
607
end
608
ElecEffect = function(cff, x, y, z)
609
  local prt = part(3, workspace, 0, 0, BrickColor.new("White"), "Part", vt(1, 1, 1))
610
  prt.Anchored = true
611
  prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
612
  prt.CFrame = cf(prt.Position)
613
  game:GetService("Debris"):AddItem(prt, 10)
614
  xval = math.random() / 3
615
  yval = math.random() / 3
616
  zval = math.random() / 3
617
  msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
618
  Effects[#Effects + 1] = {prt, "Elec", 0.2, x, y, z, xval, yval, zval, msh}
619
end
620
		
621
		function FindNearestTorso(Position, Distance, SinglePlayer)
622
			if SinglePlayer then
623
				return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance
624
			end
625
			local List = {}
626
			for i, v in pairs(workspace:GetChildren()) do
627
				if v:IsA("Model") then
628
					if v:findFirstChild("Torso") then
629
						if v ~= Character then
630
							if (v.Torso.Position - Position).magnitude <= Distance then
631
								table.insert(List, v)
632
							end 
633
						end 
634
					end 
635
				end 
636
			end
637
			return List
638
		end
639
		
640
		
641
		function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
642
	local Part = Create("Part"){
643
		Parent = Parent,
644
		Reflectance = Reflectance,
645
		Transparency = Transparency,
646
		CanCollide = false,
647
		Locked = true,
648
		BrickColor = BrickColor.new(tostring(BColor)),
649
		Name = Name,
650
		Size = Size,
651
		Material = Material,
652
	}
653
	RemoveOutlines(Part)
654
	return Part
655
end
656
	
657
function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
658
	local Msh = Create(Mesh){
659
		Parent = Part,
660
		Offset = OffSet,
661
		Scale = Scale,
662
	}
663
	if Mesh == "SpecialMesh" then
664
		Msh.MeshType = MeshType
665
		Msh.MeshId = MeshId
666
	end
667
	return Msh
668
end
669
		
670
		
671
		
672
function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
673
	local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
674
	prt.Anchored = true
675
	prt.CFrame = cframe
676
	local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
677
	game:GetService("Debris"):AddItem(prt, 10)
678
	if Type == 1 or Type == nil then
679
		table.insert(Effects, {
680
			prt,
681
			"Block1",
682
			delay,
683
			x3,
684
			y3,
685
			z3,
686
			msh
687
		})
688
	elseif Type == 2 then
689
		table.insert(Effects, {
690
			prt,
691
			"Block2",
692
			delay,
693
			x3,
694
			y3,
695
			z3,
696
			msh
697
		})
698
	end
699
end
700
701
function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
702
	local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
703
	prt.Anchored = true
704
	prt.CFrame = cframe
705
	prt.Name = "prt"
706
	local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
707
	game:GetService("Debris"):AddItem(prt, 10)
708
	table.insert(Effects, {
709
		prt,
710
		"Cylinder",
711
		delay,
712
		x3,
713
		y3,
714
		z3,
715
		msh
716
	})
717
end
718
719
function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
720
local prt=CreatePart(workspace,"Neon",0,0,brickcolor,"Effect",vt(.5,.5,.5))--part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
721
prt.Anchored=true
722
prt.CFrame=cframe
723
msh=CreateMesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
724
game:GetService("Debris"):AddItem(prt,2)
725
coroutine.resume(coroutine.create(function(Part,Mesh,num) 
726
for i=0,1,delay do
727
swait()
728
Part.Transparency=i
729
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
730
end
731
Part.Parent=nil
732
end),prt,msh,(math.random(0,1)+math.random())/5)
733
end
734
735
function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
736
	local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
737
	prt.Anchored = true
738
	prt.CFrame = cframe
739
	local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
740
	game:GetService("Debris"):AddItem(prt, 10)
741
	table.insert(Effects, {
742
		prt,
743
		"Cylinder",
744
		delay,
745
		x3,
746
		y3,
747
		z3,
748
		msh
749
	})
750
end
751
752
function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
753
	local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
754
	prt.Anchored = true
755
	prt.CFrame = cframe
756
	local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
757
	game:GetService("Debris"):AddItem(prt, 10)
758
	table.insert(Effects, {
759
		prt,
760
		"Cylinder",
761
		delay,
762
		x3,
763
		y3,
764
		z3,
765
		msh
766
	})
767
end
768
769
function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
770
	local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
771
	prt.Anchored = true
772
	prt.CFrame = cframe
773
	local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
774
	game:GetService("Debris"):AddItem(prt, 10)
775
	table.insert(Effects, {
776
		prt,
777
		"Cylinder",
778
		delay,
779
		x3,
780
		y3,
781
		z3,
782
		msh
783
	})
784
end
785
786
787
function MoonEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
788
	local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
789
	prt.Anchored = true
790
	prt.CFrame = cframe
791
	local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://259403370", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
792
	game:GetService("Debris"):AddItem(prt, 10)
793
	table.insert(Effects, {
794
		prt,
795
		"Cylinder",
796
		delay,
797
		x3,
798
		y3,
799
		z3,
800
		msh
801
	})
802
end
803
804
function HeadEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
805
	local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
806
	prt.Anchored = true
807
	prt.CFrame = cframe
808
	local msh = CreateMesh("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
809
	game:GetService("Debris"):AddItem(prt, 10)
810
	table.insert(Effects, {
811
		prt,
812
		"Cylinder",
813
		delay,
814
		x3,
815
		y3,
816
		z3,
817
		msh
818
	})
819
end
820
821
function BreakEffect(brickcolor, cframe, x1, y1, z1)
822
	local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
823
	prt.Anchored = true
824
	prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
825
	local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
826
	local num = math.random(10, 50) / 1000
827
	game:GetService("Debris"):AddItem(prt, 10)
828
	table.insert(Effects, {
829
		prt,
830
		"Shatter",
831
		num,
832
		prt.CFrame,
833
		math.random() - math.random(),
834
		0,
835
		math.random(50, 100) / 100
836
	})
837
end
838
		
839
function FindNearestHead(Position, Distance, SinglePlayer)
840
	if SinglePlayer then
841
		return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
842
	end
843
	local List = {}
844
	for i, v in pairs(workspace:GetChildren()) do
845
		if v:IsA("Model") and v:findFirstChild("Head") and v ~= Character and Distance >= (v.Head.Position - Position).magnitude then
846
			table.insert(List, v)
847
		end
848
	end
849
	return List
850
end
851
		
852
853
854
function Bullets(thinggy,place,size,color,velocity,damage,bounce,collide,rotation)
855
    swait()
856
	   local Bullet = Instance.new("Part",Workspace)
857
	Bullet.Locked = true
858
	Bullet.Name = "Bullet"
859
	Bullet.Anchored = bounce
860
	Bullet.CanCollide = collide
861
	Bullet.Transparency = 0.24
862
	Bullet.BrickColor = BrickColor.new(color)
863
	Bullet.Size = Vector3.new(0.2,0.2,5)
864
	Bullet.Material = "Neon"
865
	Bullet.Orientation = vt(0,0,0)
866
		local Bulletforce = Instance.new("BodyForce")
867
	Bulletforce.force = Vector3.new(0,Bullet:GetMass()*166.2,0)
868
	Bulletforce.Parent = Bullet
869
	Bullet.CFrame = thinggy.CFrame*CFrame.new(0.75,0.74,0)
870
	local bv = Instance.new("BodyVelocity",Bullet)
871
	bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
872
    Bullet.CFrame = CFrame.new(Bullet.Position,mouse.Hit.p)
873
		bv.velocity = Bullet.CFrame.lookVector*velocity
874
		deb:AddItem(bv,0.4)
875
deb:AddItem(Bullet,30)
876
			
877
			Bullet.Touched:connect(function(hit)
878
879
	if (hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "prt" and hit.Name ~= "Effect" and hit.Name ~= "Bullet" and Bullet.Anchored == false and hit.Name ~= "block" and hit.Name ~= "Shell") then
880
	    	    local hitsound = Instance.new("Sound", Bullet)
881
    hitsound.Volume = 3
882
    hitsound.PlayOnRemove = true
883
    hitsound.SoundId = "http://roblox.com/asset/?id=578289949"
884
    hitsound.Pitch = 1
885
    hitsound:Destroy()
886
    deb:AddItem(hitsound, 4)
887
	Bullet.Anchored = true
888
	Bullet.Transparency = 1
889
	deb:AddItem(Bullet, 4)
890
	if hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
891
	    	    	    local bullethitsound = Instance.new("Sound", Bullet)
892
    bullethitsound.Volume = 4
893
    bullethitsound.PlayOnRemove = true
894
    bullethitsound.SoundId = "http://roblox.com/asset/?id=1452522753"
895
    bullethitsound.Pitch = 1
896
    bullethitsound:Destroy()
897
    deb:AddItem(bullethitsound, 4)
898
    hit.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(math.random(23,42))
899
    blood(12,Bullet.CFrame)
900
end
901
if hit.Parent:FindFirstChildOfClass("Humanoid") == nil then
902
        for i = 1,math.random(2,7) do
903
    local block = Instance.new("Part",Workspace)
904
    block.BrickColor = hit.BrickColor
905
    block.CFrame = Bullet.CFrame*CFrame.new(math.random(-4,6),math.random(1,3),math.random(-7,8))
906
    block.Size = vt(0.3,0.4,0.3)
907
    block.Name = "block"
908
    block.Material = hit.Material
909
    block.Velocity = vt(math.random(-22,33),math.random(-20,40),math.random(-10,20))
910
    	deb:AddItem(block,8)
911
end
912
end
913
coroutine.resume(coroutine.create(function()
914
BlockEffect(BrickColor.new("New Yeller"), CFrame.new(Bullet.Position), 2, 2, 2, 1.5, 1.5, 1.5, 0.06)
915
	   
916
	        end))
917
		end
918
	end)
919
coroutine.resume(coroutine.create(function()
920
    wait(0.5)
921
    while true do
922
        swait()
923
        Bullet.Velocity = Bullet.Velocity - Vector3.new(0, 14.81*.2, 0)
924
end
925
end))
926
927
		end
928
	
929
930
931
	function blood(amount,pp)
932
	    
933
		              		               	for i = 1,amount do
934
	local bloodpart = Instance.new("Part",Workspace)
935
	bloodpart.Color = Color3.fromRGB(64,0,0)
936
	bloodpart.Size = vt(0.2,0.08,0.2)
937
	bloodpart.Archivable = true
938
	bloodpart.CFrame = pp
939
	bloodpart:BreakJoints()
940
	bloodpart.Velocity = (pp * CFrame.Angles(math.rad(math.random(20,30)*8), -math.rad(-40), math.rad(-20))).lookVector * 23
941
	deb:AddItem(bloodpart,8)
942
end
943
	 end
944
945
946
947
948
949
950
local ammo = 8
951
  function reload()
952
        
953
    attack = true
954
		    RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) *angles(0,0,0),1)
955
LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * angles(0,0,0),1)
956
Torso.Neck.C1 = clerp(Torso.Neck.C1,necko2 *angles(0,0,0),1)
957
    			   for i = 0,1.6,0.1 do
958
			       swait()
959
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(0)),.1)
960
RW.C0 = clerp(RW.C0, CFrame.new(0.7, 0.5, -0.3) * angles(math.rad(90), math.rad(0), math.rad(-23)),.2)
961
LW.C0 = clerp(LW.C0, CFrame.new(-.75, 0.5, -.9) * angles(math.rad(70), math.rad(-12), math.rad(47)),.2)
962
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0)),0.15)
963
end
964
   local Clip2 = Instance.new("Part")
965
Clip2.Parent = Workspace
966
Clip2.Size = Vector3.new(.2,.7,.2)
967
Clip2.Archivable = true
968
Clip2.Transparency = 0
969
Clip2.CanCollide = true
970
Clip2.Anchored = true
971
Clip2.BrickColor = BrickColor.New("Black")
972
Clip2.Material = "Metal"
973
Clip2.CFrame = LeftArm.CFrame
974
so("rbxassetid://1042833810",Handle,1,1)
975
Clip.Transparency = 1
976
Clip2:BreakJoints()
977
Clip2.Anchored = false
978
Clip2.Velocity = (LeftArm.CFrame * CFrame.Angles(math.rad(math.random(20,30)*8), -math.rad(-40), math.rad(-20))).lookVector * 42
979
game:service'Debris':AddItem(Clip2,10)
980
981
    			   for i = 0,1.6,0.1 do
982
			       swait()
983
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(23)),.15)
984
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(108), math.rad(0), math.rad(63)),.1)
985
LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, 0) * angles(math.rad(87), math.rad(32), math.rad(-47-6*i)),.34)
986
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.34)*CFrame.Angles(math.rad(-70),math.rad(90),math.rad(0)),0.15)
987
end
988
989
990
    			   for i = 0,1.8,0.1 do
991
			       swait()
992
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(18),math.rad(0),math.rad(27)),.15)
993
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(100), math.rad(0), math.rad(63)),.2)
994
LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, 0) * angles(math.rad(-17), math.rad(0), math.rad(4)),.2)
995
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.34)*CFrame.Angles(math.rad(-70),math.rad(90),math.rad(0)),0.15)
996
end
997
998
999
1000
1001
1002
1003
local Clip3 = Instance.new("Part")
1004
Clip3.Parent = Workspace
1005
Clip3.Size = Vector3.new(.2,.7,.2)
1006
Clip3.Archivable = true
1007
Clip3.Transparency = 0
1008
Clip3.CanCollide = false
1009
Clip3.BrickColor = BrickColor.new("Black")
1010
Clip3.Material = "Metal"
1011
local Clip3weld = Instance.new("Weld")
1012
Clip3weld.Parent = Clip3
1013
Clip3weld.Part0 = LeftArm
1014
Clip3weld.Part1 = Clip3
1015
Clip3weld.C1 = CFrame.new(-0.12, .65, -0.7)*CFrame.Angles(math.rad(-80),math.rad(0),math.rad(0))
1016
		Clip3weld.Part0 = LeftArm
1017
		
1018
		
1019
so("rbxassetid://1042833484",Handle,1,1)
1020
    			   for i = 0,1.7,0.1 do
1021
			       swait()
1022
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(0)),.1)
1023
RW.C0 = clerp(RW.C0, CFrame.new(0.7, 0.5, -0.3) * angles(math.rad(90), math.rad(0), math.rad(-23)),.2)
1024
LW.C0 = clerp(LW.C0, CFrame.new(-.87, 0.5, -.9) * angles(math.rad(60), math.rad(-12), math.rad(62)),.25)
1025
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0)),0.15)
1026
end
1027
1028
Clip3:Destroy()
1029
Clip.Transparency = 0
1030
so("rbxassetid://170160994",Handle,1,1)
1031
1032
1033
1034
1035
    			   for i = 0,1.6,0.1 do
1036
			       swait()
1037
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(14),math.rad(0),math.rad(-14)),.1)
1038
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-33)),.2)
1039
LW.C0 = clerp(LW.C0, CFrame.new(-.75, 0.7, -.8) * angles(math.rad(60), math.rad(-12), math.rad(57)),.13)
1040
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-100),math.rad(90),math.rad(0)),0.15)
1041
end
1042
1043
1044
1045
so("rbxassetid://170160964",Handle  ,1,1)
1046
1047
1048
    			   for i = 0,1.6,0.1 do
1049
			       swait()
1050
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(14),math.rad(0),math.rad(-8)),.1)
1051
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-33)),.2)
1052
LW.C0 = clerp(LW.C0, CFrame.new(-.75, 0.7, -1) * angles(math.rad(60), math.rad(-12), math.rad(37)),.2)
1053
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-100),math.rad(90),math.rad(0)),0.15)
1054
end
1055
ammo = 8
1056
attack = false
1057
    end
1058
    
1059
    local recoil = 0
1060
    local maxrecoil = 0
1061
    
1062
    
1063
    function shoot()
1064
        recoil = recoil + .6
1065
        ammo = ammo - 1
1066
        local Shell = Instance.new("Part")
1067
Shell.Parent = Workspace
1068
Shell.Size = Vector3.new(.1,.3,.1)
1069
Shell.Archivable = true
1070
Shell.Transparency = 0
1071
Shell.Name = "Shell"
1072
Shell.CanCollide = true
1073
Shell.BrickColor = BrickColor.new("New Yeller")
1074
Shell.Material = "Neon"
1075
Shell.CFrame = bhole.CFrame*CFrame.new(-0.2,0.5,0)
1076
Shell.Velocity = (bhole.CFrame * CFrame.Angles(math.rad(math.random(20,30)*8), -math.rad(-40), math.rad(-20))).lookVector * 42
1077
1078
1079
            local SLight = Instance.new('PointLight', bullethole)
1080
            SLight.Range = 12
1081
            SLight.Color = Color3.new(1,.6,.1)
1082
            SLight.Brightness = 3
1083
            game:service'Debris':AddItem(SLight, .05)
1084
1085
1086
1087
game:service'Debris':AddItem(Shell,7)
1088
1089
so("rbxassetid://966405773",bullethole,1,1)
1090
Bullets(bullethole,0,0,"New Yeller",300,25.5,false,false)      
1091
1092
    
1093
            accuracy1.Position = UDim2.new(0, -recoil*10, .5, -1)
1094
1095
            accuracy2.Position = UDim2.new(1, -8 + recoil*10, .5, -1)
1096
1097
            accuracy3.Position = UDim2.new(.5, -1, 0, -recoil*10)
1098
1099
            accuracy4.Position = UDim2.new(.5, -1, 1, -8 + recoil*10)
1100
            
1101
 Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.rad(math.random(-26.35*1.8,26.35*1.8)*recoil),math.rad(math.random(-26.35*1.8,26.35*1.8)*recoil),0.35*1.8*recoil),0.14)
1102
            
1103
            
1104
RW.C0 = clerp(RW.C0, CFrame.new(0, 0.67, -0.25) * angles(math.rad(114), math.rad(0), math.rad(0)),.2)
1105
LW.C0 = clerp(LW.C0,  CFrame.new(-.35, 0.67, -0.66) *  angles(math.rad(104), math.rad(0), math.rad(37)),.4)
1106
HW.C0 = clerp(HW.C0, CFrame.new(0,-0.92,-0.24)*CFrame.Angles(math.rad(-25),math.rad(90),math.rad(0)),0.6)
1107
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-12),math.rad(0),math.rad(0)),.4)
1108
	       attack = false
1109
        
1110
    end
1111
1112
1113
			   	     		 mouse.KeyDown:connect(function(key)
1114
			   	     		     
1115
		     if key == 'r' and attack == false  then
1116
		         reload()
1117
	         end
1118
         end)
1119
1120
1121
	     		 mouse.Button1Down:connect(function()
1122
		     if attack == false and ammo > 0 then
1123
		         if Swing == 2 then
1124
		             Humanoid.WalkSpeed = 16
1125
		             end
1126
		         shoot()
1127
	         end
1128
	         end)
1129
		 
1130
		
1131
		
1132
	     		 mouse.Button2Down:connect(function()
1133
		         aim = true
1134
		         Character.Humanoid.WalkSpeed = 16
1135
		         accuracyFrame.Visible = false
1136
	         end)
1137
		 
1138
		 
1139
		 	     		 mouse.Button2Up:connect(function()
1140
		         aim = false
1141
		         accuracyFrame.Visible = true
1142
	         end)
1143
	         
1144
	         
1145
	         
1146
1147
		
1148
		
1149
								 mouse.KeyDown:connect(function(key)
1150
    if string.byte(key) == 48 then
1151
		Swing = 2
1152
		aim = false
1153
Humanoid.WalkSpeed = 32
1154
end
1155
1156
end)
1157
1158
mouse.KeyUp:connect(function(key)
1159
    if string.byte(key) == 48 then
1160
		Swing = 1
1161
Humanoid.WalkSpeed = 16
1162
1163
end
1164
end)
1165
local look = 0
1166
1167
1168
		
1169
		while true do
1170
		    swait()
1171
		    sine = sine + change
1172
		    local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
1173
local velderp=RootPart.Velocity.y
1174
		    RightArm.LocalTransparencyModifier = 0
1175
		    LeftArm.LocalTransparencyModifier = 0
1176
for _,v in pairs(K1911:GetChildren()) do
1177
        v.LocalTransparencyModifier = 0
1178
end
1179
1180
1181
1182
    if recoil > 0 then
1183
               recoil =  recoil - .025
1184
            accuracy1.Position = UDim2.new(0, -recoil*10, .5, -1)
1185
1186
            accuracy2.Position = UDim2.new(1, -8 + recoil*10, .5, -1)
1187
1188
            accuracy3.Position = UDim2.new(.5, -1, 0, -recoil*10)
1189
1190
            accuracy4.Position = UDim2.new(.5, -1, 1, -8 + recoil*10)
1191
    
1192
    end
1193
    
1194
1195
if attack == false then
1196
    
1197
    HW.C0 = clerp(HW.C0, CFrame.new(0,-0.72,-0.14)*CFrame.Angles(math.rad(-95),math.rad(90),math.rad(0)),0.15)
1198
		    RW.C1 = clerp(RW.C1, CFrame.new(0, 0.5, 0) * angles(-math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0),.25)
1199
LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * angles(-math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0),.25)
1200
Torso.Neck.C1 = clerp(Torso.Neck.C1,necko2 *angles(math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0),.25)
1201
 Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.08)
1202
if aim == false and torvel <1 then
1203
     cam.FieldOfView = lerp(cam.FieldOfView, 90, 0.076)
1204
    		    RW.C0 = clerp(RW.C0, CFrame.new(0.95, 0.3, -0.2) * angles(math.rad(90), math.rad(0), math.rad(0)+RootPart.RotVelocity.Y / 16),.2)
1205
LW.C0 = clerp(LW.C0, CFrame.new(-.15, 0.3, -.65) * angles(math.rad(80), math.rad(0), math.rad(53)- RootPart.RotVelocity.Y / 32),.2)
1206
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.25)
1207
end
1208
if aim == false and torvel>1 and torvel<28 then
1209
 cam.FieldOfView = lerp(cam.FieldOfView, 100, 0.076)
1210
 Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0+0.57*math.cos(sine/8),0+0.34*math.sin(sine/4),0),0.15)
1211
 		    RW.C0 = clerp(RW.C0, CFrame.new(0.95, 0.3, -0.2) * angles(math.rad(90), math.rad(0), math.rad(0)+RootPart.RotVelocity.Y / 16),.2)
1212
LW.C0 = clerp(LW.C0, CFrame.new(-.15, 0.3, -.65) * angles(math.rad(80), math.rad(0), math.rad(53)- RootPart.RotVelocity.Y / 32),.2)
1213
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(0)),.25)
1214
end
1215
1216
if aim == false and torvel>28 then
1217
 cam.FieldOfView = lerp(cam.FieldOfView, 120, 0.076)
1218
      Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0+0.67*math.cos(sine/6),0+0.44*math.sin(sine/3),0),0.15)
1219
		    RW.C0 = clerp(RW.C0, CFrame.new(0.95, 0.4, -0.2) * angles(math.rad(60), math.rad(0), math.rad(0)+RootPart.RotVelocity.Y / 16),.2)
1220
LW.C0 = clerp(LW.C0, CFrame.new(-.15, 0.3, -.65) * angles(math.rad(30), math.rad(0), math.rad(53)- RootPart.RotVelocity.Y / 32),.2)
1221
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(12),math.rad(0),math.rad(-16)),.25)
1222
end
1223
1224
if aim == true then
1225
     cam.FieldOfView = lerp(cam.FieldOfView, 80, 0.076)
1226
     
1227
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(17),math.rad(14),math.rad(0)),.34)
1228
RW.C0 = clerp(RW.C0, CFrame.new(0, 0.33, -0.7) * angles(math.rad(90), math.rad(0), math.rad(0)+RootPart.RotVelocity.Y / 16),.34)
1229
LW.C0 = clerp(LW.C0, CFrame.new(-.65, 0.33, -1.15) * angles(math.rad(80), math.rad(0), math.rad(37)- RootPart.RotVelocity.Y / 32),.34)
1230
end
1231
1232
if aim == true and torvel>1 then
1233
     Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0+0.17*math.cos(sine/8),0+0.14*math.sin(sine/4),0),0.15)
1234
     Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(17),math.rad(14),math.rad(0)),.34)
1235
RW.C0 = clerp(RW.C0, CFrame.new(0, 0.33, -0.7) * angles(math.rad(90), math.rad(0), math.rad(0)+RootPart.RotVelocity.Y / 16),.34)
1236
LW.C0 = clerp(LW.C0, CFrame.new(-.65, 0.33, -1.15) * angles(math.rad(80), math.rad(0), math.rad(37)- RootPart.RotVelocity.Y / 32),.34)
1237
end
1238
end
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
    if 0 < #Effects then
1256
        for e = 1, #Effects do
1257
          if Effects[e] ~= nil then
1258
            local Thing = Effects[e]
1259
            if Thing ~= nil then
1260
              local Part = Thing[1]
1261
              local Mode = Thing[2]
1262
              local Delay = Thing[3]
1263
              local IncX = Thing[4]
1264
              local IncY = Thing[5]
1265
              local IncZ = Thing[6]
1266
              if Thing[2] == "CylinderClang" then
1267
                if Thing[3] <= 1 then
1268
                  Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 2.5 * Thing[5], 0) * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
1269
                  Thing[7] = Thing[1].CFrame
1270
                  effect("New Yeller", 0, Thing[8], Thing[7])
1271
                  Thing[8] = Thing[7]
1272
                  Thing[3] = Thing[3] + Thing[4]
1273
                else
1274
                  Part.Parent = nil
1275
                  table.remove(Effects, e)
1276
                end
1277
              end
1278
              if Thing[2] == "showDamage" then
1279
                if Thing[6] < Thing[5] then
1280
                  Thing[6] = Thing[6] + 1
1281
                else
1282
                  if Thing[6] < Thing[7] then
1283
                    Thing[4].position = Thing[4].position + vt(0, -0.2, 0)
1284
                    Thing[6] = Thing[6] + 1
1285
                  else
1286
                    if Thing[6] < Thing[8] then
1287
                      Thing[6] = Thing[6] + 1
1288
                    else
1289
                      if Thing[6] < Thing[9] then
1290
                        Thing[6] = Thing[6] + 1
1291
                        Thing[4].position = Thing[4].position + vt(0, 0.2, 0)
1292
                        Thing[3].TextStrokeTransparency = Thing[3].TextStrokeTransparency + 0.1
1293
                        Thing[3].TextTransparency = Thing[3].TextTransparency + 0.1
1294
                      else
1295
                        Thing[1].Parent = nil
1296
                        table.remove(Effects, e)
1297
                      end
1298
                    end
1299
                  end
1300
                end
1301
              end
1302
              if Thing[2] == "PartiEmi" then
1303
                Thing[3] = Thing[3] - 1
1304
                if Thing[3] <= 0 then
1305
                  Thing[1].Enabled = false
1306
                  table.remove(Effects, e)
1307
                end
1308
              end
1309
              if Thing[2] == "AdjuEff" then
1310
                if 0 < Thing[3] then
1311
                  Thing[3] = Thing[3] - 1
1312
                  Thing[1].Size = Thing[1].Size + UDim2.new(0.2, 0, 0.2, 0)
1313
                  Thing[1].StudsOffset = Thing[1].StudsOffset + vt(0, -0.2, 0)
1314
                  Thing[4].ImageTransparency = Thing[4].ImageTransparency + 0.1
1315
                else
1316
                  Thing[1].Parent = nil
1317
                  table.remove(Effects, e)
1318
                end
1319
              end
1320
              if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" and Thing[2] ~= "showDamage" and Thing[2] ~= "PartiEmi" and Thing[2] ~= "AdjuEff" then
1321
                if Thing[1].Transparency <= 1 then
1322
                  if Thing[2] == "Block1" then
1323
                    Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1324
                    Mesh = Thing[7]
1325
                    Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
1326
                    Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1327
                  else
1328
                    if Thing[2] == "Block2" then
1329
                      Thing[1].CFrame = Thing[1].CFrame
1330
                      Mesh = Thing[7]
1331
                      Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
1332
                      Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1333
                    else
1334
                      if Thing[2] == "Block3" then
1335
                        Thing[9] = Thing[9] + 0.5
1336
                        Thing[1].CFrame = Thing[8] * cf(0, Thing[9], 0)
1337
                        Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
1338
                        Mesh = Thing[7]
1339
                        Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
1340
                        Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1341
                      else
1342
                        if Thing[2] == "Skull" then
1343
                          Thing[1].CFrame = Thing[1].CFrame * cf(0, Thing[8] / 2, -Thing[8])
1344
                          Mesh = Thing[7]
1345
                          Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
1346
                          Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1347
                        else
1348
                          if Thing[2] == "Cylinder" then
1349
                            Mesh = Thing[7]
1350
                            Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
1351
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1352
                          else
1353
                            if Thing[2] == "Cylinder2" then
1354
                              Thing[1].CFrame = Thing[1].CFrame * cf(0, Thing[8], 0)
1355
                              Mesh = Thing[7]
1356
                              Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
1357
                              Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1358
                            else
1359
                              if Thing[2] == "Blood" then
1360
                                Mesh = Thing[7]
1361
                                Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
1362
                                Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
1363
                                Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1364
                              else
1365
                                if Thing[2] == "Elec" then
1366
                                  Mesh = Thing[10]
1367
                                  Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
1368
                                  Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1369
                                else
1370
                                  if Thing[2] == "Disappear" then
1371
                                    Thing[1].Transparency = Thing[1].Transparency + Thing[3]
1372
                                  end
1373
                                end
1374
                              end
1375
                            end
1376
                          end
1377
                        end
1378
                      end
1379
                    end
1380
                  end
1381
                else
1382
                  Part.Parent = nil
1383
                  table.remove(Effects, e)
1384
        end
1385
        end
1386
          end
1387
        end
1388
      end
1389
    end
1390
1391
1392
end