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