SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end | |
2 | print("FE Compatibility code by Mokiros") | |
3 | InternalData = {} | |
4 | do | |
5 | script.Parent = owner.Character | |
6 | local Event = Instance.new("RemoteEvent") | |
7 | Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect | |
10 | return Fake | |
11 | end | |
12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
17 | local function TriggerEvent(self,Event,...) | |
18 | local Trigger = Mouse[Event] | |
19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
20 | Trigger.Function(...) | |
21 | end | |
22 | end | |
23 | Mouse.TrigEvent = TriggerEvent | |
24 | UserInputService.TrigEvent = TriggerEvent | |
25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
26 | if FiredBy.Name ~= owner.Name then end | |
27 | if Input.MouseEvent then | |
28 | Mouse.Target = Input.Target | |
29 | Mouse.Hit = Input.Hit | |
30 | else | |
31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
34 | end | |
35 | for _,Action in pairs(ContextActionService.Actions) do | |
36 | for _,Key in pairs(Action.Keys) do | |
37 | if Key==Input.KeyCode then | |
38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
39 | end | |
40 | end | |
41 | end | |
42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
44 | end | |
45 | end) | |
46 | InternalData["Mouse"] = Mouse | |
47 | InternalData["ContextActionService"] = ContextActionService | |
48 | InternalData["UserInputService"] = UserInputService | |
49 | Event.Parent = NLS([[ | |
50 | local Player = owner | |
51 | local Event = script:WaitForChild("UserInput") | |
52 | local UserInputService = game:GetService("UserInputService") | |
53 | local Mouse = Player:GetMouse() | |
54 | local Input = function(Input,gameProcessedEvent) | |
55 | if gameProcessedEvent then return end | |
56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
57 | end | |
58 | UserInputService.InputBegan:Connect(Input) | |
59 | UserInputService.InputEnded:Connect(Input) | |
60 | local Hit,Target | |
61 | while wait(1/30) do | |
62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
63 | Hit,Target = Mouse.Hit,Mouse.Target | |
64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self) | |
80 | return InternalData["Mouse"] | |
81 | end | |
82 | end | |
83 | return function (self,...) | |
84 | return RealPlayer[Index](RealPlayer,...) | |
85 | end | |
86 | else | |
87 | if Index == "PlrObj" then | |
88 | return RealPlayer | |
89 | end | |
90 | return RealPlayer[Index] | |
91 | end | |
92 | end; | |
93 | __tostring = function(self) | |
94 | return RealPlayer.Name | |
95 | end | |
96 | }) | |
97 | end | |
98 | end | |
99 | if RealGame[Index] then | |
100 | local Type = type(RealGame[Index]) | |
101 | if Type == "function" then | |
102 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
103 | return function (self,Service) | |
104 | if Service:lower() == "players" then | |
105 | return setmetatable({},{ | |
106 | __index = function (self2,Index2) | |
107 | local RealService = RealGame:GetService(Service) | |
108 | local Type2 = type(Index2) | |
109 | if Type2 == "function" then | |
110 | return function (self,...) | |
111 | return RealService[Index2](RealService,...) | |
112 | end | |
113 | else | |
114 | if Index2:lower() == "localplayer" then | |
115 | return Sandbox(owner) | |
116 | end | |
117 | return RealService[Index2] | |
118 | end | |
119 | end; | |
120 | __tostring = function(self) | |
121 | return RealGame:GetService(Service).Name | |
122 | end | |
123 | }) | |
124 | elseif Service:lower() == "contextactionservice" then | |
125 | return InternalData["ContextActionService"] | |
126 | elseif Service:lower() == "contextactionservice" then | |
127 | return InternalData["UserInputService"] | |
128 | elseif Service:lower() == "runservice" then | |
129 | return setmetatable({},{ | |
130 | __index = function(self2,Index2) | |
131 | local RealService = RealGame:GetService(Service) | |
132 | local Type2 = type(Index2) | |
133 | if Type2 == "function" then | |
134 | return function (self,...) | |
135 | return RealService[Index2](RealService,...) | |
136 | end | |
137 | else | |
138 | if Index2:lower() == "bindtorenderstep" then | |
139 | return function (self,Name,Priority,Function) | |
140 | return RealGame:GetService("RunService").Stepped:Connect(Function) | |
141 | end | |
142 | end | |
143 | if Index2:lower() == "renderstepped" then | |
144 | return RealService["Stepped"] | |
145 | end | |
146 | return RealService[Index2] | |
147 | end | |
148 | end | |
149 | }) | |
150 | else | |
151 | return RealGame:GetService(Service) | |
152 | end | |
153 | end | |
154 | end | |
155 | return function (self,...) | |
156 | return RealGame[Index](RealGame,...) | |
157 | end | |
158 | else | |
159 | if game:GetService(Index) then | |
160 | return game:GetService(Index) | |
161 | end | |
162 | return RealGame[Index] | |
163 | end | |
164 | else | |
165 | return nil | |
166 | end | |
167 | end | |
168 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = {} | |
169 | print("Complete! Running...") | |
170 | ||
171 | ||
172 | --//Paste script below this line. | |
173 | ||
174 | - | Player = game:GetService("Players").SonicSydney |
174 | + | Player = game:GetService("Players").silver22352 |
175 | Character = Player.Character | |
176 | PlayerGui = Player.PlayerGui | |
177 | Backpack = Player.Backpack | |
178 | Torso = Character.Torso | |
179 | Head = Character.Head | |
180 | Humanoid = Character.Humanoid | |
181 | LeftArm = Character["Left Arm"] | |
182 | LeftLeg = Character["Left Leg"] | |
183 | RightArm = Character["Right Arm"] | |
184 | RightLeg = Character["Right Leg"] | |
185 | LS = Torso["Left Shoulder"] | |
186 | LH = Torso["Left Hip"] | |
187 | RS = Torso["Right Shoulder"] | |
188 | RH = Torso["Right Hip"] | |
189 | Neck = Torso.Neck | |
190 | it=Instance.new | |
191 | vt=Vector3.new | |
192 | cf=CFrame.new | |
193 | euler=CFrame.fromEulerAnglesXYZ | |
194 | angles=CFrame.Angles | |
195 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
196 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
197 | attack = false | |
198 | attacktype = 1 | |
199 | attackdebounce = false | |
200 | MMouse=nil | |
201 | combo=0 | |
202 | Mode="Choose" | |
203 | Aiming=false | |
204 | DroneTarget=Torso.Position | |
205 | Drone1=nil | |
206 | Drone2=nil | |
207 | Drone3=nil | |
208 | Bullets=10 | |
209 | BowAim=false | |
210 | SnipAim=false | |
211 | --player | |
212 | player = nil | |
213 | --save shoulders | |
214 | RSH, LSH = nil, nil | |
215 | --welds | |
216 | RW, LW = Instance.new("Weld"), Instance.new("Weld") | |
217 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
218 | ||
219 | ||
220 | if Character:findFirstChild("Techno Gauntlet",true) ~= nil then | |
221 | Character:findFirstChild("Techno Gauntlet",true).Parent = nil | |
222 | end | |
223 | ||
224 | ||
225 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
226 | local fp = it("Part") | |
227 | fp.formFactor = formfactor | |
228 | fp.Parent = parent | |
229 | fp.Reflectance = reflectance | |
230 | fp.Transparency = transparency | |
231 | fp.CanCollide = false | |
232 | fp.Locked=true | |
233 | fp.BrickColor = brickcolor | |
234 | fp.Name = name | |
235 | fp.Size = size | |
236 | fp.Position = Torso.Position | |
237 | fp.BottomSurface="Smooth" | |
238 | fp.TopSurface="Smooth" | |
239 | fp:BreakJoints() | |
240 | return fp | |
241 | end | |
242 | ||
243 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
244 | local mesh = it(Mesh) | |
245 | mesh.Parent = part | |
246 | if Mesh=="SpecialMesh" then | |
247 | mesh.MeshType = meshtype | |
248 | mesh.MeshId = meshid | |
249 | end | |
250 | mesh.Offset=offset | |
251 | mesh.Scale=scale | |
252 | return mesh | |
253 | end | |
254 | ||
255 | function weld(parent,part0,part1,c0) | |
256 | local weld = it("Weld") | |
257 | weld.Parent = parent | |
258 | weld.Part0 = part0 | |
259 | weld.Part1 = part1 | |
260 | weld.C0 = c0 | |
261 | return weld | |
262 | end | |
263 | ||
264 | local cone=part(3,modelzorz,0,1,BrickColor.new("Bright red"),"Cone",vt(1,1,1)) | |
265 | local conemsh=mesh("SpecialMesh",cone,"FileMesh","http://www.roblox.com/asset/?id=1778999",vt(0,0,0),vt(0.5,0.5,0.5)) | |
266 | local screen1=part(3,modelzorz,0,1,BrickColor.new("Bright red"),"Screen1",vt(1,1,1)) | |
267 | local screen1msh=mesh("BlockMesh",screen1,"","",vt(0,0,0),vt(0.1,0.8,0.9)) | |
268 | local screen2=part(3,modelzorz,0,1,BrickColor.new("Bright red"),"Screen2",vt(1,1,1)) | |
269 | local screen2msh=mesh("BlockMesh",screen2,"","",vt(0,0,0),vt(0.1,0.8,0.9)) | |
270 | local screen3=part(3,modelzorz,0,1,BrickColor.new("Bright red"),"Screen3",vt(1,1,1)) | |
271 | local screen3msh=mesh("BlockMesh",screen3,"","",vt(0,0,0),vt(0.1,0.8,0.9)) | |
272 | light1=Instance.new("PointLight") | |
273 | light1.Brightness=.8 | |
274 | light1.Color=Color3.new(.0,.0,255) | |
275 | light1.Range=10 | |
276 | light1.Parent=screen1 | |
277 | light2=light1:Clone() | |
278 | light2.Parent=screen2 | |
279 | light3=light1:Clone() | |
280 | light3.Parent=screen3 | |
281 | ||
282 | if Character:findFirstChild("Drone",true) ~= nil then | |
283 | Character:findFirstChild("Drone",true).Parent = nil | |
284 | end | |
285 | ||
286 | local modelzorz = Instance.new("Model") | |
287 | modelzorz.Parent = Character | |
288 | modelzorz.Name = "Techno Gauntlet" | |
289 | ||
290 | local prt1=part(3,modelzorz,0,0,BrickColor.new("Black"),"Part1",vt(1,1,1)) | |
291 | local prt2=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part2",vt(1,1,1)) | |
292 | local prt3=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part3",vt(1,1,1)) | |
293 | local prt4=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part4",vt(1,1,1)) | |
294 | local prt5=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part5",vt(1,1,1)) | |
295 | local prt6=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part6",vt(1,1,1)) | |
296 | local prt7=part(3,modelzorz,0,0,Torso.BrickColor,"Part7",vt(1,1,1)) | |
297 | local prt8=part(3,modelzorz,0,0,BrickColor.new("Dark stone grey"),"Part8",vt(1,1,1)) | |
298 | local prt9=part(3,modelzorz,0,0,BrickColor.new("Medium stone grey"),"Part9",vt(1,1,1)) | |
299 | local prt10=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Part10",vt(1,1,1)) | |
300 | ||
301 | msh1=mesh("BlockMesh",prt1,"","",vt(0,0,0),vt(1.1,0.6,1.1)) | |
302 | msh2=mesh("BlockMesh",prt2,"","",vt(0,0,0),vt(0.2,0.7,1.05)) | |
303 | msh3=mesh("BlockMesh",prt3,"","",vt(0,0,0),vt(1.05,0.7,0.2)) | |
304 | msh4=mesh("BlockMesh",prt4,"","",vt(0,0,0),vt(1.4,1.6,0.2)) | |
305 | msh5=mesh("BlockMesh",prt5,"","",vt(0,0,0),vt(1.4,1.6,0.2)) | |
306 | msh6=mesh("BlockMesh",prt6,"","",vt(0,0,0),vt(0.6,0.1,0.6)) | |
307 | msh7=mesh("SpecialMesh",prt7,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5)) | |
308 | msh8=mesh("CylinderMesh",prt8,"","",vt(0,0,0),vt(0.6,0.1,0.6)) | |
309 | msh9=mesh("CylinderMesh",prt9,"","",vt(0,0,0),vt(0.3,0.1,0.3)) | |
310 | msh10=mesh("CylinderMesh",prt10,"","",vt(0,0,0),vt(0.2,0.1,0.2)) | |
311 | ||
312 | local wld1=weld(prt1,prt1,RightArm,euler(0,0,0)*cf(0,0.3,0)) | |
313 | local wld2=weld(prt2,prt2,prt1,euler(0,0,0)*cf(0,0.4,0)) | |
314 | local wld3=weld(prt3,prt3,prt1,euler(0,0,0)*cf(0,0.4,0)) | |
315 | local wld4=weld(prt4,prt4,prt1,euler(0,0.785,0)*cf(0,-0.51,0)) | |
316 | local wld5=weld(prt5,prt5,prt1,euler(0,-0.785,0)*cf(0,-0.51,0)) | |
317 | local wld6=weld(prt6,prt6,prt1,euler(0,0,0)*cf(0,-1.3,0)) | |
318 | local wld7=weld(prt7,prt7,prt6,euler(0,0,0)*cf(0,0,0)) | |
319 | local wld8=weld(prt8,prt8,prt1,euler(0,0,-1.57)*cf(-0.55,0,0)) | |
320 | local wld9=weld(prt9,prt9,prt8,euler(0,0,0)*cf(0,0.05,0)) | |
321 | local wld10=weld(prt10,prt10,prt9,euler(0,0,0)*cf(0,0.01,0)) | |
322 | ||
323 | numb2=0 | |
324 | for i=1,4 do | |
325 | numb=0.3 | |
326 | for i=1,3 do | |
327 | local prtclaw=part(3,modelzorz,0,0,BrickColor.new("Bright red"),"Partclaw",vt(1,1,1)) | |
328 | mshclaw=mesh("SpecialMesh",prtclaw,"Wedge","",vt(0,0,0),vt(0.1,0.3,0.1)) | |
329 | local wldclaw=weld(prtclaw,prtclaw,prt1,euler(1.57,-1.57,-1.57)*cf(-0.55,0.3,numb)*euler(0,numb2,0)) | |
330 | numb=numb-0.3 | |
331 | end | |
332 | numb2=numb2+1.57 | |
333 | end | |
334 | ||
335 | numb=0 | |
336 | for i=1,5 do | |
337 | local prtgear=part(3,modelzorz,0,0,BrickColor.new("Mid Grey"),"Partgear",vt(1,1,1)) | |
338 | mshgear=mesh("BlockMesh",prtgear,"","",vt(0,0,0),vt(0.4,0.09,0.07)) | |
339 | local wldgear=weld(prtgear,prtgear,prt9,euler(0,numb,0)*cf(0,0,0)) | |
340 | numb=numb+0.628 | |
341 | end | |
342 | ||
343 | local gun = Instance.new("Model") | |
344 | gun.Parent = modelzorz | |
345 | gun.Name = "Blitz" | |
346 | gun.Parent=nil | |
347 | ||
348 | local gprt1=part(3,gun,0,0,BrickColor.new("Dark stone grey"),"Part1",vt(1,1,1)) | |
349 | local gprt2=part(3,gun,0,0,BrickColor.new("Black"),"Part2",vt(1,1,1)) | |
350 | local gprt3=part(3,gun,0,0,BrickColor.new("Black"),"Part3",vt(1,1,1)) | |
351 | local gprt4=part(3,gun,0,0,BrickColor.new("Black"),"Part4",vt(1,1,1)) | |
352 | local gprt5=part(3,gun,0,0,BrickColor.new("Black"),"Part5",vt(1,1,1)) | |
353 | local gprt6=part(3,gun,0,0,BrickColor.new("Dark stone grey"),"Part6",vt(1,1,1)) | |
354 | local gprt7=part(3,gun,0,0,BrickColor.new("Medium stone grey"),"Part7",vt(1,1,1)) | |
355 | local gprt8=part(3,gun,0,0,BrickColor.new("Bright red"),"Part8",vt(1,1,1)) | |
356 | local gprt9=part(3,gun,0,0,BrickColor.new("Dark stone grey"),"Part9",vt(1,1,1)) | |
357 | local gprt10=part(3,gun,0,0,BrickColor.new("Bright red"),"Part10",vt(1,1,1)) | |
358 | local gprt11=part(3,gun,0,0,BrickColor.new("Black"),"Part11",vt(1,1,1)) | |
359 | local gprt12=part(3,gun,0,0,BrickColor.new("Black"),"Part12",vt(1,1,1)) | |
360 | local gprt13=part(3,gun,0,0,BrickColor.new("Bright red"),"Part13",vt(1,1,1)) | |
361 | local gprt14=part(3,gun,0,0,BrickColor.new("Black"),"Part14",vt(1,1,1)) | |
362 | local gprt15=part(3,gun,0,0,BrickColor.new("Dark stone grey"),"Part15",vt(1,1,1)) | |
363 | local gprt16=part(3,gun,0,0,BrickColor.new("Dark stone grey"),"Part16",vt(1,1,1)) | |
364 | local gprt17=part(3,gun,0,0,BrickColor.new("Bright red"),"Part17",vt(1,1,1)) | |
365 | local gprt18=part(3,gun,0,0,BrickColor.new("Bright red"),"Part18",vt(1,1,1)) | |
366 | local gprt19=part(3,gun,0,0,BrickColor.new("Bright red"),"Part19",vt(1,1,1)) | |
367 | local gprt20=part(3,gun,0,0,BrickColor.new("Medium stone grey"),"Part20",vt(1,1,1)) | |
368 | local gprt21=part(3,gun,0,0,BrickColor.new("Medium stone grey"),"Part21",vt(1,1,1)) | |
369 | local gprt22=part(3,gun,0,0,BrickColor.new("Medium stone grey"),"Part22",vt(1,1,1)) | |
370 | ||
371 | gmsh1=mesh("BlockMesh",gprt1,"","",vt(0,0,0),vt(0.2,0.7,0.2)) | |
372 | gmsh2=mesh("BlockMesh",gprt2,"","",vt(0,0,0),vt(0.25,0.2,0.25)) | |
373 | gmsh3=mesh("BlockMesh",gprt3,"","",vt(0,0,0),vt(0.25,0.2,0.25)) | |
374 | gmsh4=mesh("BlockMesh",gprt4,"","",vt(0,0,0),vt(0.5,0.5,0.7)) | |
375 | gmsh5=mesh("CylinderMesh",gprt5,"","",vt(0,0,0),vt(0.5,0.49,0.5)) | |
376 | gmsh6=mesh("CylinderMesh",gprt6,"","",vt(0,0,0),vt(0.1,0.5,0.1)) | |
377 | gmsh7=mesh("BlockMesh",gprt7,"","",vt(0,0,0),vt(0.55,0.3,0.3)) | |
378 | gmsh8=mesh("CylinderMesh",gprt8,"","",vt(0,0,0),vt(0.7,0.7,0.7)) | |
379 | gmsh9=mesh("CylinderMesh",gprt9,"","",vt(0,0,0),vt(0.4,0.71,0.4)) | |
380 | gmsh10=mesh("BlockMesh",gprt10,"","",vt(0,0,0),vt(0.3,0.4,0.3)) | |
381 | gmsh11=mesh("BlockMesh",gprt11,"","",vt(0,0,0),vt(0.2,2.5,0.5)) | |
382 | gmsh12=mesh("CylinderMesh",gprt12,"","",vt(0,0,0),vt(0.3,0.51,0.3)) | |
383 | gmsh13=mesh("BlockMesh",gprt13,"","",vt(0,0,0),vt(0.2,0.3,0.5)) | |
384 | gmsh14=mesh("CylinderMesh",gprt14,"","",vt(0,0,0),vt(0.3,0.2,0.3)) | |
385 | gmsh15=mesh("CylinderMesh",gprt15,"","",vt(0,0,0),vt(0.2,0.35,0.2)) | |
386 | gmsh16=mesh("CylinderMesh",gprt16,"","",vt(0,0,0),vt(0.2,0.21,0.2)) | |
387 | gmsh17=mesh("CylinderMesh",gprt17,"","",vt(0,0,0),vt(0.15,0.22,0.15)) | |
388 | gmsh18=mesh("CylinderMesh",gprt18,"","",vt(0,0,0),vt(0.6,0.2,0.6)) | |
389 | gmsh19=mesh("CylinderMesh",gprt19,"","",vt(0,0,0),vt(0.7,0.2,0.7)) | |
390 | gmsh20=mesh("CylinderMesh",gprt20,"","",vt(0,0,0),vt(0.6,1.5,0.6)) | |
391 | gmsh21=mesh("CylinderMesh",gprt21,"","",vt(0,0,0),vt(0.69,0.5,0.69)) | |
392 | gmsh22=mesh("CylinderMesh",gprt22,"","",vt(0,0,0),vt(0.69,0.31,0.69)) | |
393 | ||
394 | local GunWelds={} | |
395 | local gwld1=weld(gprt1,gprt1,Torso,euler(0.5,1.57,0)*cf(1,-0.5,1.8)) | |
396 | local gwld2=weld(gprt2,gprt2,gprt1,euler(0,0,0)*cf(0,0.3,0)) | |
397 | local gwld3=weld(gprt3,gprt3,gprt1,euler(0,0,0)*cf(0,-0.3,0)) | |
398 | local gwld4=weld(gprt4,gprt4,gprt3,euler(-0.5,0,0)*cf(0,-0.1,-0.1)) | |
399 | local gwld5=weld(gprt5,gprt5,gprt4,euler(0,0,1.57)*cf(0,0,-0.35)) | |
400 | local gwld6=weld(gprt6,gprt6,gprt5,cf(0,0,-0.1)) | |
401 | local gwld7=weld(gprt7,gprt7,gprt4,cf(0,0,-0.1)) | |
402 | local gwld8=weld(gprt8,gprt8,gprt4,euler(0,0,1.57)*cf(0,0,0.4)) | |
403 | local gwld9=weld(gprt9,gprt9,gprt8,cf(0,0,0)) | |
404 | local gwld10=weld(gprt10,gprt10,gprt8,euler(1.57,0,0)*cf(0,0,0.4)*euler(0,0.7,0)) | |
405 | local gwld11=weld(gprt11,gprt11,gprt8,euler(1.57,0,0)*cf(0.3,0,0.9)) | |
406 | local gwld12=weld(gprt12,gprt12,gprt11,euler(-1.57,0,0)*cf(0,-1.3,0)) | |
407 | local gwld13=weld(gprt13,gprt13,gprt12,cf(0,0,0.3)*euler(0,1.57,0)) | |
408 | local gwld14=weld(gprt14,gprt14,gprt13,cf(0.05,0,0.25)) | |
409 | local gwld15=weld(gprt15,gprt15,gprt14,cf(0,0,0)) | |
410 | local gwld16=weld(gprt16,gprt16,gprt13,euler(0,0,1.57)*cf(0,0,-0.1)) | |
411 | local gwld17=weld(gprt17,gprt17,gprt16,cf(0,0,0)) | |
412 | local gwld18=weld(gprt18,gprt18,gprt8,euler(1.57,0,0)*cf(-0.1,0,0.4)) | |
413 | local gwld19=weld(gprt19,gprt19,gprt18,cf(-0.05,-0.15,0)) | |
414 | local gwld20=weld(gprt20,gprt20,gprt19,cf(0,-0.8,0)) | |
415 | local gwld21=weld(gprt21,gprt21,gprt20,cf(0,0.5,0)) | |
416 | local gwld22=weld(gprt22,gprt22,gprt20,cf(0,-0.6,0)) | |
417 | table.insert(GunWelds,gwld1) | |
418 | table.insert(GunWelds,gwld2) | |
419 | table.insert(GunWelds,gwld3) | |
420 | table.insert(GunWelds,gwld4) | |
421 | table.insert(GunWelds,gwld5) | |
422 | table.insert(GunWelds,gwld6) | |
423 | table.insert(GunWelds,gwld7) | |
424 | table.insert(GunWelds,gwld8) | |
425 | table.insert(GunWelds,gwld9) | |
426 | table.insert(GunWelds,gwld10) | |
427 | table.insert(GunWelds,gwld11) | |
428 | table.insert(GunWelds,gwld12) | |
429 | table.insert(GunWelds,gwld13) | |
430 | table.insert(GunWelds,gwld14) | |
431 | table.insert(GunWelds,gwld15) | |
432 | table.insert(GunWelds,gwld16) | |
433 | table.insert(GunWelds,gwld17) | |
434 | table.insert(GunWelds,gwld18) | |
435 | table.insert(GunWelds,gwld19) | |
436 | table.insert(GunWelds,gwld20) | |
437 | table.insert(GunWelds,gwld21) | |
438 | table.insert(GunWelds,gwld22) | |
439 | ||
440 | numb=1.57 | |
441 | for i=1,10 do | |
442 | local gprt23=part(3,gun,0,0,BrickColor.new("Medium stone grey"),"Part23",vt(1,1,1)) | |
443 | gmsh23=mesh("CylinderMesh",gprt23,"","",vt(0,0,0),vt(0.15,0.7,0.15)) | |
444 | local gwld23=weld(gprt23,gprt23,gprt20,cf(0,-0.1,-0.25)*euler(0,numb,0)) | |
445 | table.insert(GunWelds,gwld23) | |
446 | local gprt24=part(3,gun,0,0,BrickColor.new("Really black"),"Part24",vt(1,1,1)) | |
447 | gmsh24=mesh("CylinderMesh",gprt24,"","",vt(0,0,0),vt(0.14,1.52,0.14)) | |
448 | local gwld24=weld(gprt24,gprt24,gprt20,cf(0,0,-0.25)*euler(0,numb,0)) | |
449 | table.insert(GunWelds,gwld24) | |
450 | numb=numb+0.628 | |
451 | end | |
452 | ||
453 | local sword=Instance.new("Model") | |
454 | sword.Parent=modelzorz | |
455 | sword.Name="Daku" | |
456 | sword.Parent=nil | |
457 | ||
458 | local sprt1=part(3,sword,0,0,BrickColor.new("Dark stone grey"),"Part1",vt(1,1,1)) | |
459 | local sprt2=part(3,sword,0,0,BrickColor.new("Medium stone grey"),"Part2",vt(1,1,1)) | |
460 | local sprt3=part(3,sword,0,0,BrickColor.new("Dark stone grey"),"Part3",vt(1,1,1)) | |
461 | local sprt4=part(3,sword,0,0,BrickColor.new("Bright red"),"Part4",vt(1,1,1)) | |
462 | local sprt5=part(3,sword,0,0,BrickColor.new("Bright red"),"Part5",vt(1,1,1)) | |
463 | local sprt6=part(3,sword,0,0,BrickColor.new("Medium stone grey"),"Part6",vt(1,1,1)) | |
464 | local sprt7=part(3,sword,0,0,BrickColor.new("Medium stone grey"),"Part7",vt(1,1,1)) | |
465 | local sprt8=part(3,sword,0,0,BrickColor.new("Light stone grey"),"Part8",vt(1,1,1)) | |
466 | local sprt9=part(3,sword,0,0,BrickColor.new("Medium stone grey"),"Part9",vt(1,1,1)) | |
467 | local sprt10=part(3,sword,0,0,BrickColor.new("Dark stone grey"),"Part10",vt(1,1,1)) | |
468 | local sprt11=part(3,sword,0,0,BrickColor.new("Medium stone grey"),"Part11",vt(1,1,1)) | |
469 | local sprt12=part(3,sword,0,0,BrickColor.new("Light stone grey"),"Part12",vt(1,1,1)) | |
470 | local sprt13=part(3,sword,0,0,BrickColor.new("Medium stone grey"),"Part13",vt(1,1,1)) | |
471 | local sprt14=part(3,sword,0,0,BrickColor.new("Medium stone grey"),"Part14",vt(1,1,1)) | |
472 | local sprt15=part(3,sword,0,0,BrickColor.new("Light stone grey"),"Part15",vt(1,1,1)) | |
473 | local sprt16=part(3,sword,0,1,BrickColor.new("Black"),"Hitbox",vt(1,7,1.5)) | |
474 | local sprt17=part(3,sword,0,0,BrickColor.new("Bright yellow"),"Top",vt(1,1,1)) | |
475 | local sprt18=part(3,sword,0,1,BrickColor.new("Black"),"Mid",vt(0.1,0.1,0.1)) | |
476 | local sprt19=part(3,sword,0,0,BrickColor.new("Bright yellow"),"Bottom",vt(1,1,1)) | |
477 | ||
478 | smsh1=mesh("BlockMesh",sprt1,"","",vt(0,0,0),vt(0.2,1,0.2)) | |
479 | smsh2=mesh("SpecialMesh",sprt2,"Head","",vt(0,0,0),vt(0.4,0.3,0.4)) | |
480 | smsh3=mesh("BlockMesh",sprt3,"","",vt(0,0,0),vt(0.25,0.5,0.25)) | |
481 | smsh4=mesh("SpecialMesh",sprt4,"Head","",vt(0,0,0),vt(0.5,0.3,0.5)) | |
482 | smsh5=mesh("CylinderMesh",sprt5,"","",vt(0,0,0),vt(0.5,0.2,0.5)) | |
483 | smsh6=mesh("BlockMesh",sprt6,"","",vt(0,0,0),vt(0.5,0.2,0.35)) | |
484 | smsh7=mesh("BlockMesh",sprt7,"","",vt(0,0,0),vt(0.2,0.19,0.2)) | |
485 | smsh8=mesh("BlockMesh",sprt8,"","",vt(0,0,0),vt(0.8,0.15,0.5)) | |
486 | smsh9=mesh("SpecialMesh",sprt9,"Head","",vt(0,0,0),vt(0.4,0.3,0.4)) | |
487 | smsh10=mesh("BlockMesh",sprt10,"","",vt(0,0,0),vt(0.25,0.5,0.25)) | |
488 | smsh11=mesh("SpecialMesh",sprt11,"Head","",vt(0,0,0),vt(0.5,0.3,0.5)) | |
489 | smsh12=mesh("CylinderMesh",sprt12,"","",vt(0,0,0),vt(0.5,0.2,0.5)) | |
490 | smsh13=mesh("BlockMesh",sprt13,"","",vt(0,0,0),vt(0.5,0.2,0.35)) | |
491 | smsh14=mesh("BlockMesh",sprt14,"","",vt(0,0,0),vt(0.2,0.19,0.2)) | |
492 | smsh15=mesh("BlockMesh",sprt15,"","",vt(0,0,0),vt(0.8,0.15,0.5)) | |
493 | smsh17=mesh("CylinderMesh",sprt17,"","",vt(0,0,0),vt(0.1,0.05,0.1)) | |
494 | smsh19=mesh("CylinderMesh",sprt19,"","",vt(0,0,0),vt(0.1,0.05,0.1)) | |
495 | ||
496 | local SwordWelds={} | |
497 | local swld1=weld(sprt1,sprt1,Torso,euler(0,0,1.57)*cf(0,-4,0)) | |
498 | local swld2=weld(sprt2,sprt2,sprt1,euler(0,0,0)*cf(0,-0.4,0)) | |
499 | local swld3=weld(sprt3,sprt3,sprt2,euler(0,0,0)*cf(0,-0.3,0)) | |
500 | local swld4=weld(sprt4,sprt4,sprt3,euler(0,0,0)*cf(0,-0.3,0)) | |
501 | local swld5=weld(sprt5,sprt5,sprt4,euler(0,0,0)*cf(0,-0.15,0)) | |
502 | local swld6=weld(sprt6,sprt6,sprt5,euler(0,0,1.57)*cf(0,-0.2,0)) | |
503 | local swld7=weld(sprt7,sprt7,sprt6,euler(0,0.785,0)*cf(0,0,-0.17)) | |
504 | local swld8=weld(sprt8,sprt8,sprt5,euler(0,0,1.57)*cf(0,-0.4,0)) | |
505 | local swld9=weld(sprt9,sprt9,sprt1,euler(3.14,3.14,0)*cf(0,0.4,0)) | |
506 | local swld10=weld(sprt10,sprt10,sprt9,euler(0,0,0)*cf(0,-0.3,0)) | |
507 | local swld11=weld(sprt11,sprt11,sprt10,euler(0,0,0)*cf(0,-0.3,0)) | |
508 | local swld12=weld(sprt12,sprt12,sprt11,euler(0,0,0)*cf(0,-0.15,0)) | |
509 | local swld13=weld(sprt13,sprt13,sprt12,euler(0,0,1.57)*cf(0,-0.2,0)) | |
510 | local swld14=weld(sprt14,sprt14,sprt13,euler(0,0.785,0)*cf(0,0,-0.17)) | |
511 | local swld15=weld(sprt15,sprt15,sprt12,euler(0,0,1.57)*cf(0,-0.4,0)) | |
512 | local swld16=weld(sprt16,sprt16,sprt1,cf(0,0,-0.3)) | |
513 | local swld17=weld(sprt17,sprt17,sprt1,euler(0.55,0,0)*cf(0,3.7,-0.79)) | |
514 | local swld18=weld(sprt18,sprt18,sprt1,cf(0,0,-0.8)) | |
515 | local swld19=weld(sprt19,sprt19,sprt1,euler(-0.55,0,0)*cf(0,-3.7,-0.79)) | |
516 | table.insert(SwordWelds,swld1) | |
517 | table.insert(SwordWelds,swld2) | |
518 | table.insert(SwordWelds,swld3) | |
519 | table.insert(SwordWelds,swld4) | |
520 | table.insert(SwordWelds,swld5) | |
521 | table.insert(SwordWelds,swld6) | |
522 | table.insert(SwordWelds,swld7) | |
523 | table.insert(SwordWelds,swld8) | |
524 | table.insert(SwordWelds,swld9) | |
525 | table.insert(SwordWelds,swld10) | |
526 | table.insert(SwordWelds,swld11) | |
527 | table.insert(SwordWelds,swld12) | |
528 | table.insert(SwordWelds,swld13) | |
529 | table.insert(SwordWelds,swld14) | |
530 | table.insert(SwordWelds,swld15) | |
531 | table.insert(SwordWelds,swld16) | |
532 | table.insert(SwordWelds,swld17) | |
533 | table.insert(SwordWelds,swld18) | |
534 | table.insert(SwordWelds,swld19) | |
535 | ||
536 | numb=0 | |
537 | numb2=0 | |
538 | bend=0 | |
539 | for i=1,8 do | |
540 | local sprtblade1=part(3,sword,0.3,0,BrickColor.new("White"),"Partblade1",vt(1,1,1)) | |
541 | smshblade1=mesh("SpecialMesh",sprtblade1,"Wedge","",vt(0,0,0),vt(0.1+numb2,0.7,0.7)) | |
542 | local swldblade1=weld(sprtblade1,sprtblade1,sprt5,euler(0,0,0)*cf(0,-0.3-numb,0.1+bend)*euler(-bend,0,0)) | |
543 | table.insert(SwordWelds,swldblade1) | |
544 | local sprtblade2=part(3,sword,0.3,0,BrickColor.new("White"),"Partblade2",vt(1,1,1)) | |
545 | smshblade2=mesh("SpecialMesh",sprtblade2,"Wedge","",vt(0,0,0),vt(0.1+numb2,0.7,0.7)) | |
546 | local swldblade2=weld(sprtblade2,sprtblade2,sprt12,euler(0,0,0)*cf(0,-0.3-numb,0.1+bend)*euler(-bend,0,0)) | |
547 | table.insert(SwordWelds,swldblade2) | |
548 | numb=numb+0.3 | |
549 | numb2=numb2-0.01 | |
550 | bend=bend+0.05 | |
551 | end | |
552 | ||
553 | local sniper=Instance.new("Model") | |
554 | sniper.Parent=modelzorz | |
555 | sniper.Name="Hand Sniper" | |
556 | sniper.Parent=nil | |
557 | ||
558 | local snprt1=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part1",vt(1,1,1)) | |
559 | local snprt2=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part2",vt(1,1,1)) | |
560 | local snprt3=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part3",vt(1,1,1)) | |
561 | local snprt4=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part4",vt(1,1,1)) | |
562 | local snprt5=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part5",vt(1,1,1)) | |
563 | local snprt6=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part6",vt(1,1,1)) | |
564 | local snprt7=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part7",vt(1,1,1)) | |
565 | local snprt8=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part8",vt(1,1,1)) | |
566 | local snprt9=part(3,sniper,0,0,BrickColor.new("Bright red"),"Part9",vt(1,1,1)) | |
567 | local snprt10=part(3,sniper,0,0,BrickColor.new("Black"),"Part10",vt(1,1,1)) | |
568 | local snprt11=part(3,sniper,0,0,BrickColor.new("Black"),"Part11",vt(1,1,1)) | |
569 | local snprt12=part(3,sniper,0,0,BrickColor.new("Black"),"Part12",vt(1,1,1)) | |
570 | local snprt13=part(3,sniper,0,0,BrickColor.new("Black"),"Part13",vt(1,1,1)) | |
571 | local snprt14=part(3,sniper,0,0,BrickColor.new("Black"),"Part14",vt(1,1,1)) | |
572 | local snprt15=part(3,sniper,0,0,BrickColor.new("Really black"),"Part15",vt(1,1,1)) | |
573 | local snprt16=part(3,sniper,0,0,BrickColor.new("Black"),"Part16",vt(1,1,1)) | |
574 | local snprt17=part(3,sniper,0,0,BrickColor.new("Black"),"Part17",vt(1,1,1)) | |
575 | local snprt18=part(3,sniper,0,0,BrickColor.new("Black"),"Part18",vt(1,1,1)) | |
576 | local snprt19=part(3,sniper,0,0,BrickColor.new("Black"),"Part19",vt(1,1,1)) | |
577 | local snprt20=part(3,sniper,0,0,BrickColor.new("Black"),"Part20",vt(1,1,1)) | |
578 | local snprt21=part(3,sniper,0,0,BrickColor.new("Black"),"Part21",vt(1,1,1)) | |
579 | local snprt22=part(3,sniper,0,0,BrickColor.new("Black"),"Part22",vt(1,1,1)) | |
580 | local snprt23=part(3,sniper,0,0,BrickColor.new("Dark stone grey"),"Part23",vt(1,1,1)) | |
581 | local snprt24=part(3,sniper,0,0,BrickColor.new("Medium stone grey"),"Part24",vt(1,1,1)) | |
582 | local snprt25=part(3,sniper,0,0,BrickColor.new("Black"),"Part25",vt(1,1,1)) | |
583 | local snprt26=part(3,sniper,0,0,BrickColor.new("Black"),"Part26",vt(1,1,1)) | |
584 | local snprt27=part(3,sniper,0,0,BrickColor.new("Dark stone grey"),"Part27",vt(1,1,1)) | |
585 | local snprt28=part(3,sniper,0,0,BrickColor.new("Black"),"Part28",vt(1,1,1)) | |
586 | local snprt29=part(3,sniper,0,0,BrickColor.new("Black"),"Part29",vt(1,1,1)) | |
587 | ||
588 | snmsh1=mesh("BlockMesh",snprt1,"","",vt(0,0,0),vt(0.2,1,0.2)) | |
589 | snmsh2=mesh("BlockMesh",snprt2,"","",vt(0,0,0),vt(0.201,0.5,0.5)) | |
590 | snmsh3=mesh("BlockMesh",snprt3,"","",vt(0,0,0),vt(0.2,0.3,0.3)) | |
591 | snmsh4=mesh("BlockMesh",snprt4,"","",vt(0,0,0),vt(0.199,0.6,0.7)) | |
592 | snmsh5=mesh("BlockMesh",snprt5,"","",vt(0,0,0),vt(0.198,0.9,0.3)) | |
593 | snmsh6=mesh("BlockMesh",snprt6,"","",vt(0,0,0),vt(0.202,3.5,0.3)) | |
594 | snmsh7=mesh("BlockMesh",snprt7,"","",vt(0,0,0),vt(0.1,0.5,0.1)) | |
595 | snmsh8=mesh("BlockMesh",snprt8,"","",vt(0,0,0),vt(0.1,0.6,0.1)) | |
596 | snmsh9=mesh("BlockMesh",snprt9,"","",vt(0,0,0),vt(0.201,1.7,0.2)) | |
597 | snmsh10=mesh("BlockMesh",snprt10,"","",vt(0,0,0),vt(0.15,0.4,0.4)) | |
598 | snmsh11=mesh("BlockMesh",snprt11,"","",vt(0,0,0),vt(0.201,0.8,0.2)) | |
599 | snmsh12=mesh("CylinderMesh",snprt12,"","",vt(0,0,0),vt(0.2,4,0.2)) | |
600 | snmsh13=mesh("CylinderMesh",snprt13,"","",vt(0,0,0),vt(0.4,0.2,0.4)) | |
601 | snmsh14=mesh("CylinderMesh",snprt14,"","",vt(0,0,0),vt(0.22,0.3,0.22)) | |
602 | snmsh15=mesh("CylinderMesh",snprt15,"","",vt(0,0,0),vt(0.15,0.301,0.15)) | |
603 | snmsh16=mesh("BlockMesh",snprt16,"","",vt(0,0,0),vt(0.1,0.7,0.1)) | |
604 | snmsh17=mesh("BlockMesh",snprt17,"","",vt(0,0,0),vt(0.05,0.2,0.1)) | |
605 | snmsh18=mesh("BlockMesh",snprt18,"","",vt(0,0,0),vt(0.05,0.2,0.1)) | |
606 | snmsh19=mesh("BlockMesh",snprt19,"","",vt(0,0,0),vt(0.05,0.2,0.1)) | |
607 | snmsh20=mesh("BlockMesh",snprt20,"","",vt(0,0,0),vt(0.05,0.2,0.1)) | |
608 | snmsh21=mesh("CylinderMesh",snprt21,"","",vt(0,0,0),vt(0.2,0.099,0.2)) | |
609 | snmsh22=mesh("CylinderMesh",snprt22,"","",vt(0,0,0),vt(0.2,0.099,0.2)) | |
610 | snmsh23=mesh("CylinderMesh",snprt23,"","",vt(0,0,0),vt(0.199,1,0.199)) | |
611 | snmsh24=mesh("CylinderMesh",snprt24,"","",vt(0,0,0),vt(0.15,1.01,0.15)) | |
612 | snmsh25=mesh("BlockMesh",snprt25,"","",vt(0,0,0),vt(0.3,0.5,0.2)) | |
613 | snmsh26=mesh("CylinderMesh",snprt26,"","",vt(0,0,0),vt(0.05,0.3,0.05)) | |
614 | snmsh27=mesh("SpecialMesh",snprt27,"Sphere","",vt(0,0,0),vt(0.1,0.1,0.1)) | |
615 | snmsh28=mesh("BlockMesh",snprt28,"","",vt(0,0,0),vt(0.05,0.3,0.05)) | |
616 | snmsh29=mesh("CylinderMesh",snprt29,"","",vt(0,0,0),vt(0.15,0.4,0.15)) | |
617 | ||
618 | local SniperWelds={} | |
619 | local snwld1=weld(snprt1,snprt1,Torso,euler(0.5,0,0)*cf(0,-4,0)) | |
620 | local snwld2=weld(snprt2,snprt2,snprt1,euler(-0.5,0,0)*cf(0,0.5,-0.2)) | |
621 | local snwld3=weld(snprt3,snprt3,snprt2,euler(-0.785,0,0)*cf(0,-0.1,-0.2)) | |
622 | local snwld4=weld(snprt4,snprt4,snprt3,euler(0.785,0,0)*cf(0,-0.4,0)) | |
623 | local snwld5=weld(snprt5,snprt5,snprt4,cf(0,0,-0.3)) | |
624 | local snwld6=weld(snprt6,snprt6,snprt1,euler(1.07,0,0)*cf(0,-0.5,0.2)) | |
625 | local snwld7=weld(snprt7,snprt7,snprt6,euler(0,0,0)*cf(0,0.2,0.5)) | |
626 | local snwld8=weld(snprt8,snprt8,snprt6,euler(1.57,0,0)*cf(0,-0.1,0.25)) | |
627 | local snwld9=weld(snprt9,snprt9,snprt6,euler(0,0,0)*cf(0,-0.9,0.25)) | |
628 | local snwld10=weld(snprt10,snprt10,snprt9,euler(0,0,0)*cf(0,0.5,0.2)) | |
629 | local snwld11=weld(snprt11,snprt11,snprt6,euler(0,0,0)*cf(0,0.2,-0.2)) | |
630 | local snwld12=weld(snprt12,snprt12,snprt11,euler(0,0,0)*cf(0,-2,0)) | |
631 | local snwld13=weld(snprt13,snprt13,snprt12,euler(0,0,0)*cf(0,-1.8,0)) | |
632 | local snwld14=weld(snprt14,snprt14,snprt12,euler(0,0,0)*cf(0,-2,0)) | |
633 | local snwld15=weld(snprt15,snprt15,snprt14,euler(0,0,0)*cf(0,0,0)) | |
634 | local snwld16=weld(snprt16,snprt16,snprt11,euler(0,0,0)*cf(0,0,-0.1)) | |
635 | local snwld17=weld(snprt17,snprt17,snprt16,euler(1.57,0,0)*cf(0.05,0.2,-0.1)) | |
636 | local snwld18=weld(snprt18,snprt18,snprt16,euler(1.57,0,0)*cf(-0.05,0.2,-0.1)) | |
637 | local snwld19=weld(snprt19,snprt19,snprt16,euler(1.57,0,0)*cf(-0.05,-0.2,-0.1)) | |
638 | local snwld20=weld(snprt20,snprt20,snprt16,euler(1.57,0,0)*cf(0.05,-0.2,-0.1)) | |
639 | local snwld21=weld(snprt21,snprt21,snprt16,euler(0,0,0)*cf(0,0.2,-0.2)) | |
640 | local snwld22=weld(snprt22,snprt22,snprt16,euler(0,0,0)*cf(0,-0.2,-0.2)) | |
641 | local snwld23=weld(snprt23,snprt23,snprt16,euler(0,0,0)*cf(0,0,-0.2)) | |
642 | local snwld24=weld(snprt24,snprt24,snprt23,euler(0,0,0)*cf(0,0,0)) | |
643 | local snwld25=weld(snprt25,snprt25,snprt6,euler(0,0,0)*cf(0,-0.5,0)) | |
644 | local snwld26=weld(snprt26,snprt26,snprt25,cf(0,-0.3,0)*euler(0.5,0.7,1.57)) | |
645 | local snwld27=weld(snprt27,snprt27,snprt26,cf(0,-0.1,0)) | |
646 | local snwld28=weld(snprt28,snprt28,snprt6,euler(1.57-0.5,0,0)*cf(0,0.2,0.2)) | |
647 | local snwld29=weld(snprt29,snprt29,snprt9,euler(0,0.2,1.57)*cf(0,-0.8,0.1)) | |
648 | table.insert(SniperWelds,snwld1) | |
649 | table.insert(SniperWelds,snwld2) | |
650 | table.insert(SniperWelds,snwld3) | |
651 | table.insert(SniperWelds,snwld4) | |
652 | table.insert(SniperWelds,snwld5) | |
653 | table.insert(SniperWelds,snwld6) | |
654 | table.insert(SniperWelds,snwld7) | |
655 | table.insert(SniperWelds,snwld8) | |
656 | table.insert(SniperWelds,snwld9) | |
657 | table.insert(SniperWelds,snwld10) | |
658 | table.insert(SniperWelds,snwld11) | |
659 | table.insert(SniperWelds,snwld12) | |
660 | table.insert(SniperWelds,snwld13) | |
661 | table.insert(SniperWelds,snwld14) | |
662 | table.insert(SniperWelds,snwld15) | |
663 | table.insert(SniperWelds,snwld16) | |
664 | table.insert(SniperWelds,snwld17) | |
665 | table.insert(SniperWelds,snwld18) | |
666 | table.insert(SniperWelds,snwld19) | |
667 | table.insert(SniperWelds,snwld20) | |
668 | table.insert(SniperWelds,snwld21) | |
669 | table.insert(SniperWelds,snwld22) | |
670 | table.insert(SniperWelds,snwld23) | |
671 | table.insert(SniperWelds,snwld24) | |
672 | table.insert(SniperWelds,snwld25) | |
673 | table.insert(SniperWelds,snwld26) | |
674 | table.insert(SniperWelds,snwld27) | |
675 | table.insert(SniperWelds,snwld28) | |
676 | table.insert(SniperWelds,snwld29) | |
677 | ||
678 | numb=-0.15 | |
679 | numb2=0.1 | |
680 | for i=1,2 do | |
681 | local snprt30=part(3,sniper,0,0,BrickColor.new("Black"),"Part30",vt(1,1,1)) | |
682 | local snprt31=part(3,sniper,0,0,BrickColor.new("Black"),"Part31",vt(1,1,1)) | |
683 | local snprt32=part(3,sniper,0,0,BrickColor.new("Black"),"Part32",vt(1,1,1)) | |
684 | local snprt33=part(3,sniper,0,0,BrickColor.new("Black"),"Part33",vt(1,1,1)) | |
685 | local snprt34=part(3,sniper,0,0,BrickColor.new("Black"),"Part34",vt(1,1,1)) | |
686 | local snprt35=part(3,sniper,0,0,BrickColor.new("Black"),"Part35",vt(1,1,1)) | |
687 | local snprt36=part(3,sniper,0,0,BrickColor.new("Black"),"Part36",vt(1,1,1)) | |
688 | local snprt37=part(3,sniper,0,0,BrickColor.new("Black"),"Part37",vt(1,1,1)) | |
689 | snmsh30=mesh("CylinderMesh",snprt30,"","",vt(0,0,0),vt(0.2,0.1,0.2)) | |
690 | snmsh31=mesh("CylinderMesh",snprt31,"","",vt(0,0,0),vt(0.1,0.5,0.1)) | |
691 | snmsh32=mesh("CylinderMesh",snprt32,"","",vt(0,0,0),vt(0.15,0.1,0.15)) | |
692 | snmsh33=mesh("CylinderMesh",snprt33,"","",vt(0,0,0),vt(0.125,0.3,0.125)) | |
693 | snmsh34=mesh("CylinderMesh",snprt34,"","",vt(0,0,0),vt(0.15,0.2,0.15)) | |
694 | snmsh35=mesh("CylinderMesh",snprt35,"","",vt(0,0,0),vt(0.08,0.8,0.08)) | |
695 | snmsh36=mesh("CylinderMesh",snprt36,"","",vt(0,0,0),vt(0.15,0.2,0.15)) | |
696 | snmsh37=mesh("CylinderMesh",snprt37,"","",vt(0,0,0),vt(0.2,0.1,0.2)) | |
697 | local snwld30=weld(snprt30,snprt30,snprt29,euler(0,0,0)*cf(0,numb,0)) | |
698 | local snwld31=weld(snprt31,snprt31,snprt30,euler(0,0,1.57+numb2)*cf(0.25,0,0)) | |
699 | local snwld32=weld(snprt32,snprt32,snprt31,cf(0,0.25,0)) | |
700 | local snwld33=weld(snprt33,snprt33,snprt32,cf(0,0.15,0)) | |
701 | local snwld34=weld(snprt34,snprt34,snprt33,cf(0,0.1,0)) | |
702 | local snwld35=weld(snprt35,snprt35,snprt34,cf(0,0.4,0)) | |
703 | local snwld36=weld(snprt36,snprt36,snprt35,cf(0,0.4,0)) | |
704 | local snwld37=weld(snprt37,snprt37,snprt36,cf(0,0.1,0)) | |
705 | table.insert(SniperWelds,snwld30) | |
706 | table.insert(SniperWelds,snwld31) | |
707 | table.insert(SniperWelds,snwld32) | |
708 | table.insert(SniperWelds,snwld33) | |
709 | table.insert(SniperWelds,snwld34) | |
710 | table.insert(SniperWelds,snwld35) | |
711 | table.insert(SniperWelds,snwld36) | |
712 | table.insert(SniperWelds,snwld37) | |
713 | numb=numb+0.3 | |
714 | numb2=numb2-0.2 | |
715 | end | |
716 | if (script.Parent.className ~= "HopperBin") then | |
717 | Tool = Instance.new("HopperBin") | |
718 | Tool.Parent = Backpack | |
719 | Tool.Name = "Techno Gauntlet" | |
720 | script.Parent = Tool | |
721 | end | |
722 | Bin = script.Parent | |
723 | ||
724 | local Bg = it("BodyGyro") | |
725 | Bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge | |
726 | Bg.P = 20e+003 | |
727 | Bg.Parent = nil | |
728 | ||
729 | so = function(id,par,vol,pit) | |
730 | coroutine.resume(coroutine.create(function() | |
731 | local sou = Instance.new("Sound",par or workspace) | |
732 | sou.Volume=vol | |
733 | sou.Pitch=pit or 1 | |
734 | sou.SoundId=136523485 | |
735 | wait() | |
736 | sou:play() | |
737 | wait(6) | |
738 | sou:Remove() | |
739 | end)) | |
740 | end | |
741 | ||
742 | function CreateDrone() | |
743 | local drone=Instance.new("Model") | |
744 | drone.Parent=modelzorz | |
745 | drone.Name="Drone" | |
746 | ||
747 | local dprt1=part(3,drone,0,1,BrickColor.new("White"),"DPart1",vt(1,1,1)) | |
748 | dprt1.CanCollide=true | |
749 | local dprt6=part(3,drone,0,1,BrickColor.new("Bright red"),"DPart6",vt(1,1,1)) | |
750 | local dprt7=part(3,drone,0,1,BrickColor.new("Black"),"DPart7",vt(1,1,1)) | |
751 | ||
752 | local dmsh1=mesh("SpecialMesh",dprt1,"Sphere","",vt(0,0,0),vt(1,1,1)) | |
753 | local dmsh6=mesh("CylinderMesh",dprt6,"","",vt(0,0,0),vt(0.5,0.2,0.5)) | |
754 | local dmsh7=mesh("CylinderMesh",dprt7,"","",vt(0,0,0),vt(0.4,0.21,0.4)) | |
755 | ||
756 | --local dwld1=weld(dprt1,dprt1,Torso,euler(0,0,0)*cf(0,-5,0)) | |
757 | local dwld6=weld(dprt6,dprt6,dprt1,euler(1.57,0,0)*cf(0,0,0.4)) | |
758 | local dwld7=weld(dprt7,dprt7,dprt6,cf(0,0,0)) | |
759 | ||
760 | numb=0 | |
761 | for i=1,4 do | |
762 | local dprt2=part(3,drone,0,1,BrickColor.new("Medium stone grey"),"DPart2",vt(1,1,1)) | |
763 | local dmsh2=mesh("BlockMesh",dprt2,"","",vt(0,0,0),vt(0.5,0.5,0.8)) | |
764 | local dwld2=weld(dprt2,dprt2,dprt1,cf(0,-0.5,0)*euler(0,0,numb)) | |
765 | numb=numb+1.57 | |
766 | end | |
767 | numb=0 | |
768 | for i=1,4 do | |
769 | local dprt3=part(3,drone,0,1,BrickColor.new("Dark stone grey"),"DPart3",vt(1,1,1)) | |
770 | local dmsh3=mesh("BlockMesh",dprt3,"","",vt(0,0,0),vt(0.5,0.5,0.79)) | |
771 | local dwld3=weld(dprt3,dprt3,dprt1,cf(0,-0.3,0)*euler(0,0,0.785+numb)) | |
772 | numb=numb+1.57 | |
773 | end | |
774 | numb=0 | |
775 | for i=1,4 do | |
776 | local dprt4=part(3,drone,0,1,BrickColor.new("Dark stone grey"),"DPart4",vt(1,1,1)) | |
777 | local dmsh4=mesh("BlockMesh",dprt4,"","",vt(0,0,0),vt(0.2,0.8,0.2)) | |
778 | local dwld4=weld(dprt4,dprt4,dprt1,cf(0,0.8,0)*euler(0.785,numb,0)) | |
779 | local dprt5=part(3,drone,0,1,BrickColor.new("Bright red"),"DPart5",vt(1,1,1)) | |
780 | local dmsh5=mesh("SpecialMesh",dprt5,"Sphere","",vt(0,0,0),vt(0.4,0.4,0.4)) | |
781 | local dwld5=weld(dprt5,dprt5,dprt4,cf(0,0.5,0)*euler(0,0,0)) | |
782 | light1=Instance.new("PointLight") | |
783 | light1.Brightness=.8 | |
784 | light1.Color=Color3.new(0,0,255) | |
785 | light1.Range=10 | |
786 | light1.Parent=dprt5 | |
787 | numb=numb+1.57 | |
788 | end | |
789 | return drone,dprt1 | |
790 | end | |
791 | ||
792 | function hideanim() | |
793 | equipped=false | |
794 | if Mode=="Drones" then | |
795 | Mode="Choose" | |
796 | end | |
797 | wait(0.1) | |
798 | cone.Parent=nil | |
799 | screen1.Parent=nil | |
800 | screen2.Parent=nil | |
801 | screen3.Parent=nil | |
802 | Neck.C0=necko*euler(0,0,0) | |
803 | wld9.C0=euler(0,0,0)*cf(0,0.05,0) | |
804 | Bg.Parent=nil | |
805 | end | |
806 | ||
807 | function equipanim() | |
808 | equipped=true | |
809 | if Mode=="Choose" then | |
810 | for i=0,1,0.1 do | |
811 | wait() | |
812 | Neck.C0=necko*euler(0.3*i,0,-0.2*i) | |
813 | RW.C0=cf(1.5-0.5*i, 0.5-0.2*i, -0.5*i) * euler(1*i,0,-1*i) | |
814 | RW.C1=cf(0, 0.5, 0) * euler(0,-2.07*i,0) | |
815 | LW.C0=cf(-1.5+0.3*i, 0.5, -0.3*i) * euler(1.5*i,0,1.2*i) | |
816 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
817 | end | |
818 | for i=0,1,0.1 do | |
819 | wait() | |
820 | wld9.C0=euler(0,-1.57*i,0)*cf(0,0.05,0) | |
821 | Neck.C0=necko*euler(0.3+0.1*i,0,-0.2-0.1*i) | |
822 | RW.C0=cf(1, 0.3, -0.5) * euler(1-0.2*i,0,-1+0.3*i) | |
823 | RW.C1=cf(0, 0.5, 0) * euler(0,-2.07-0.1*i,0) | |
824 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.5-0.2*i,0,1.2-0.5*i) | |
825 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
826 | end | |
827 | coroutine.resume(coroutine.create(function() | |
828 | cone.Parent=modelzorz | |
829 | cone.Transparency=1 | |
830 | local conewld=weld(cone,cone,prt9,euler(0,0,0)*cf(0,0.2,0)) | |
831 | screen1.Parent=modelzorz | |
832 | screen1.Transparency=1 | |
833 | local screen1wld=weld(screen1,screen1,cone,euler(0,0.8,0)*cf(0,1,0)) | |
834 | screen2.Parent=modelzorz | |
835 | screen2.Transparency=1 | |
836 | local screen2wld=weld(screen2,screen2,screen1,cf(0,0,1)*euler(0,0.3,0)) | |
837 | screen3.Parent=modelzorz | |
838 | screen3.Transparency=1 | |
839 | local screen3wld=weld(screen3,screen3,screen1,cf(0,0,-1)*euler(0,-0.3,0)) | |
840 | ||
841 | for i=1,0.5,-0.05 do | |
842 | wait() | |
843 | cone.Transparency=i | |
844 | screen1.Transparency=i | |
845 | screen2.Transparency=i | |
846 | screen3.Transparency=i | |
847 | end | |
848 | coroutine.resume(coroutine.create(function(Cone,Screen1,Screen2,Screen3) | |
849 | while Mode=="Choose" do | |
850 | wait(0.06) | |
851 | Cone.Transparency=0.5 | |
852 | Screen1.Transparency=0.5 | |
853 | Screen2.Transparency=0.5 | |
854 | Screen3.Transparency=0.5 | |
855 | light1.Brightness=.7 | |
856 | light2.Brightness=.7 | |
857 | light3.Brightness=.7 | |
858 | wait(0.06) | |
859 | Cone.Transparency=0.6 | |
860 | Screen1.Transparency=0.6 | |
861 | Screen2.Transparency=0.6 | |
862 | Screen3.Transparency=0.6 | |
863 | light1.Brightness=.8 | |
864 | light2.Brightness=.8 | |
865 | light3.Brightness=.8 | |
866 | end | |
867 | end),cone,screen1,screen2,screen3) | |
868 | end)) | |
869 | for i=0,1,0.1 do | |
870 | wait() | |
871 | wld9.C0=euler(0,-1.57,0)*cf(0,0.05,0) | |
872 | Neck.C0=necko*euler(0.4-0.7*i,0,-0.3) | |
873 | RW.C0=cf(1, 0.3, -0.5-0.3*i) * euler(0.8+0.77*i,0,-1+0.3) | |
874 | RW.C1=cf(0, 0.5, 0) * euler(0,-2.17+0.67*i,0) | |
875 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.3+1*i,0,0.7) | |
876 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
877 | end | |
878 | Neck.C0=necko*euler(-0.3,0,-0.3) | |
879 | RW.C0=cf(1, 0.3, -0.8) * euler(1.57,0,-0.7) | |
880 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0) | |
881 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(2.3,0,0.7) | |
882 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
883 | end | |
884 | end | |
885 | ||
886 | function Drones() | |
887 | Mode="Drones" | |
888 | attack=true | |
889 | Humanoid.WalkSpeed=0 | |
890 | coroutine.resume(coroutine.create(function() | |
891 | while Mode=="Drones" do | |
892 | wait() | |
893 | if Aiming==false then | |
894 | DroneTarget=Torso.Position | |
895 | end | |
896 | end | |
897 | end)) | |
898 | coroutine.resume(coroutine.create(function(Cone,Screen1,Screen2,Screen3) | |
899 | numb=0.5 | |
900 | for i=0,1,0.1 do | |
901 | wait() | |
902 | Cone.Transparency=numb | |
903 | Screen1.Transparency=numb | |
904 | Screen2.Transparency=numb | |
905 | Screen3.Transparency=numb | |
906 | numb=numb+0.1 | |
907 | end | |
908 | Cone.Parent=nil | |
909 | Screen1.Parent=nil | |
910 | Screen2.Parent=nil | |
911 | Screen3.Parent=nil | |
912 | end),cone,screen1,screen2,screen3) | |
913 | for i=0,1,0.1 do | |
914 | wait() | |
915 | Neck.C0=necko*euler(-0.3+0.3*i,0,-0.3+0.3*i) | |
916 | RW.C0=cf(1, 0.3, -0.8) * euler(1.57-0.3*i,0,-0.7-0.6*i) | |
917 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+0.5*i,0) | |
918 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(2.3-0.8*i,0,0.7-0.5*i) | |
919 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
920 | end | |
921 | local drone1,droneprt1=CreateDrone() | |
922 | local dwld1=weld(droneprt1,droneprt1,Torso,euler(0,0,0)*cf(2,0,5)) | |
923 | local drone2,droneprt2=CreateDrone() | |
924 | local dwld12=weld(droneprt2,droneprt2,Torso,euler(0,0,0)*cf(0,0,5)) | |
925 | local drone3,droneprt3=CreateDrone() | |
926 | local dwld13=weld(droneprt3,droneprt3,Torso,euler(0,0,0)*cf(-2,0,5)) | |
927 | wait() | |
928 | dwld1:Remove() | |
929 | dwld12:Remove() | |
930 | dwld13:Remove() | |
931 | local pos=it("BodyPosition",droneprt1) | |
932 | rand1=math.random(-5,5) | |
933 | rand2=math.random(-5,5) | |
934 | pos.position=Torso.Position + vt(rand1,5,rand2) | |
935 | coroutine.resume(coroutine.create(function(BodyPosition) | |
936 | while droneprt1.Parent~=nil do | |
937 | wait(math.random(1,3)) | |
938 | BodyPosition.position=Torso.Position + vt(math.random(-15,15),5,math.random(-15,15)) | |
939 | end | |
940 | end),pos) | |
941 | pos.maxForce=vt(7500,7500,7500) | |
942 | pos.Name="BP" | |
943 | local bg=it("BodyGyro",droneprt1) | |
944 | bg.maxTorque=vt(math.huge,math.huge,math.huge) | |
945 | bg.P=50000 | |
946 | --bg.cframe=cf(droneprt1.Position, Torso.Position) | |
947 | coroutine.resume(coroutine.create(function(BodyGyro) | |
948 | while droneprt1.Parent~=nil do | |
949 | wait() | |
950 | if Aiming==true then | |
951 | BodyGyro.cframe=cf(droneprt1.Position, DroneTarget) | |
952 | end | |
953 | end | |
954 | end),bg) | |
955 | bg.Name="DroneGyro" | |
956 | local pos=it("BodyPosition",droneprt2) | |
957 | rand1=math.random(-5,5) | |
958 | rand2=math.random(-5,5) | |
959 | pos.position=Torso.Position + vt(rand1,5,rand2) | |
960 | coroutine.resume(coroutine.create(function(BodyPosition) | |
961 | while droneprt2.Parent~=nil do | |
962 | wait(math.random(1,3)) | |
963 | BodyPosition.position=Torso.Position + vt(math.random(-15,15),5,math.random(-15,15)) | |
964 | end | |
965 | end),pos) | |
966 | pos.maxForce=vt(7500,7500,7500) | |
967 | pos.Name="BP" | |
968 | local bg=it("BodyGyro",droneprt2) | |
969 | bg.maxTorque=vt(math.huge,math.huge,math.huge) | |
970 | bg.P=50000 | |
971 | --bg.cframe=cf(droneprt1.Position, Torso.Position) | |
972 | coroutine.resume(coroutine.create(function(BodyGyro) | |
973 | while droneprt2.Parent~=nil do | |
974 | wait() | |
975 | if Aiming==true then | |
976 | BodyGyro.cframe=cf(droneprt2.Position, DroneTarget) | |
977 | end | |
978 | end | |
979 | end),bg) | |
980 | bg.Name="DroneGyro" | |
981 | local pos=it("BodyPosition",droneprt3) | |
982 | rand1=math.random(-5,5) | |
983 | rand2=math.random(-5,5) | |
984 | pos.position=Torso.Position + vt(rand1,5,rand2) | |
985 | coroutine.resume(coroutine.create(function(BodyPosition) | |
986 | while droneprt3.Parent~=nil do | |
987 | wait(math.random(1,3)) | |
988 | BodyPosition.position=Torso.Position + vt(math.random(-15,15),5,math.random(-15,15)) | |
989 | end | |
990 | end),pos) | |
991 | pos.maxForce=vt(7500,7500,7500) | |
992 | pos.Name="BP" | |
993 | local bg=it("BodyGyro",droneprt3) | |
994 | bg.maxTorque=vt(math.huge,math.huge,math.huge) | |
995 | bg.P=50000 | |
996 | --bg.cframe=cf(droneprt1.Position, Torso.Position) | |
997 | coroutine.resume(coroutine.create(function(BodyGyro) | |
998 | while droneprt3.Parent~=nil do | |
999 | wait() | |
1000 | if Aiming==true then | |
1001 | BodyGyro.cframe=cf(droneprt3.Position, DroneTarget) | |
1002 | end | |
1003 | end | |
1004 | end),bg) | |
1005 | bg.Name="DroneGyro" | |
1006 | droneprt1.Anchored=true | |
1007 | for _,v in pairs(drone1:children()) do | |
1008 | if v.className=="Part" then | |
1009 | v.Transparency=1 | |
1010 | coroutine.resume(coroutine.create(function(Part) | |
1011 | wait(1) | |
1012 | Part.Transparency=0 | |
1013 | end),v) | |
1014 | end | |
1015 | end | |
1016 | effect=drone1:Clone() | |
1017 | effect.Parent=workspace | |
1018 | print(effect) | |
1019 | for _,v in pairs(effect:children()) do | |
1020 | if v.className=="Part" then | |
1021 | v.Transparency=1 | |
1022 | v.Anchored=true | |
1023 | v.CanCollide=false | |
1024 | v.BrickColor=BrickColor.new("Bright blue") | |
1025 | coroutine.resume(coroutine.create(function(Part) | |
1026 | for i=0,1,0.1 do | |
1027 | wait(0) | |
1028 | Part.Transparency=Part.Transparency-0.05 | |
1029 | end | |
1030 | wait(0.5) | |
1031 | for i=0,1,0.1 do | |
1032 | wait(0) | |
1033 | Part.Transparency=Part.Transparency+0.05 | |
1034 | end | |
1035 | Part.Parent=nil | |
1036 | end),v) | |
1037 | end | |
1038 | end | |
1039 | droneprt2.Anchored=true | |
1040 | for _,v in pairs(drone2:children()) do | |
1041 | if v.className=="Part" then | |
1042 | v.Transparency=1 | |
1043 | coroutine.resume(coroutine.create(function(Part) | |
1044 | wait(1) | |
1045 | Part.Transparency=0 | |
1046 | end),v) | |
1047 | end | |
1048 | end | |
1049 | effect=drone2:Clone() | |
1050 | effect.Parent=workspace | |
1051 | print(effect) | |
1052 | for _,v in pairs(effect:children()) do | |
1053 | if v.className=="Part" then | |
1054 | v.Transparency=1 | |
1055 | v.Anchored=true | |
1056 | v.CanCollide=false | |
1057 | v.BrickColor=BrickColor.new("Bright blue") | |
1058 | coroutine.resume(coroutine.create(function(Part) | |
1059 | for i=0,1,0.1 do | |
1060 | wait(0) | |
1061 | Part.Transparency=Part.Transparency-0.05 | |
1062 | end | |
1063 | wait(0.5) | |
1064 | for i=0,1,0.1 do | |
1065 | wait(0) | |
1066 | Part.Transparency=Part.Transparency+0.05 | |
1067 | end | |
1068 | Part.Parent=nil | |
1069 | end),v) | |
1070 | end | |
1071 | end | |
1072 | droneprt3.Anchored=true | |
1073 | for _,v in pairs(drone3:children()) do | |
1074 | if v.className=="Part" then | |
1075 | v.Transparency=1 | |
1076 | coroutine.resume(coroutine.create(function(Part) | |
1077 | wait(1) | |
1078 | Part.Transparency=0 | |
1079 | end),v) | |
1080 | end | |
1081 | end | |
1082 | effect=drone3:Clone() | |
1083 | effect.Parent=workspace | |
1084 | print(effect) | |
1085 | for _,v in pairs(effect:children()) do | |
1086 | if v.className=="Part" then | |
1087 | v.Transparency=1 | |
1088 | v.Anchored=true | |
1089 | v.CanCollide=false | |
1090 | v.BrickColor=BrickColor.new("Bright blue") | |
1091 | coroutine.resume(coroutine.create(function(Part) | |
1092 | for i=0,1,0.1 do | |
1093 | wait(0) | |
1094 | Part.Transparency=Part.Transparency-0.05 | |
1095 | end | |
1096 | wait(0.5) | |
1097 | for i=0,1,0.1 do | |
1098 | wait(0) | |
1099 | Part.Transparency=Part.Transparency+0.05 | |
1100 | end | |
1101 | Part.Parent=nil | |
1102 | end),v) | |
1103 | end | |
1104 | end | |
1105 | wait(2) | |
1106 | droneprt1.Anchored=false | |
1107 | droneprt2.Anchored=false | |
1108 | droneprt3.Anchored=false | |
1109 | Humanoid.WalkSpeed=16 | |
1110 | wait() | |
1111 | effect.Parent=nil | |
1112 | for i=0,1,0.1 do | |
1113 | wait() | |
1114 | RW.C0=cf(1+0.5*i, 0.3+0.2*i, -0.8+0.8*i) * euler(1.27-0.77*i,0,-1.3+1.3*i) | |
1115 | RW.C1=cf(0, 0.5, 0) * euler(0,-1+1*i,0) | |
1116 | LW.C0=cf(-1.2-0.3*i, 0.5, -0.3+0.3*i) * euler(1.5-1.5*i,0,0.2-0.4*i) | |
1117 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1118 | end | |
1119 | attack=false | |
1120 | return drone1, drone2, drone3 | |
1121 | end | |
1122 | ||
1123 | function Gun() | |
1124 | attack=true | |
1125 | Mode="Gun" | |
1126 | gwld1.Part1=LeftArm | |
1127 | gwld1.C0=euler(1.57+0.5,0,-1.57)*cf(0,1,0) | |
1128 | coroutine.resume(coroutine.create(function(Cone,Screen1,Screen2,Screen3) | |
1129 | numb=0.5 | |
1130 | for i=0,1,0.1 do | |
1131 | wait() | |
1132 | Cone.Transparency=numb | |
1133 | Screen1.Transparency=numb | |
1134 | Screen2.Transparency=numb | |
1135 | Screen3.Transparency=numb | |
1136 | numb=numb+0.1 | |
1137 | end | |
1138 | Cone.Parent=nil | |
1139 | Screen1.Parent=nil | |
1140 | Screen2.Parent=nil | |
1141 | Screen3.Parent=nil | |
1142 | end),cone,screen1,screen2,screen3) | |
1143 | for i=0,1,0.1 do | |
1144 | wait() | |
1145 | Neck.C0=necko*euler(-0.3+0.3*i,0,-0.3+0.3*i) | |
1146 | RW.C0=cf(1, 0.3, -0.8) * euler(1.57-0.3*i,0,-0.7-0.6*i) | |
1147 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+0.5*i,0) | |
1148 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(2.3-0.8*i,0,0.7-0.5*i) | |
1149 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1150 | end | |
1151 | gun.Parent=modelzorz | |
1152 | for e=1,#GunWelds do | |
1153 | GunWelds[e].Parent=modelzorz | |
1154 | end | |
1155 | for _,v in pairs(gun:children()) do | |
1156 | if v.className=="Part" then | |
1157 | v.Transparency=1 | |
1158 | end | |
1159 | end | |
1160 | for _,v in pairs(gun:children()) do | |
1161 | if v.className=="Part" then | |
1162 | v.Transparency=1 | |
1163 | coroutine.resume(coroutine.create(function(Part) | |
1164 | wait(0.5) | |
1165 | Part.Transparency=0 | |
1166 | end),v) | |
1167 | end | |
1168 | end | |
1169 | effect=gun:Clone() | |
1170 | effect.Parent=workspace | |
1171 | print(effect) | |
1172 | for _,v in pairs(effect:children()) do | |
1173 | if v.className=="Part" then | |
1174 | v.Transparency=1 | |
1175 | v.Anchored=true | |
1176 | v.CanCollide=false | |
1177 | v.BrickColor=BrickColor.new("Bright blue") | |
1178 | coroutine.resume(coroutine.create(function(Part) | |
1179 | for i=0,1,0.1 do | |
1180 | wait(0) | |
1181 | Part.Transparency=Part.Transparency-0.05 | |
1182 | end | |
1183 | for i=0,1,0.1 do | |
1184 | wait(0) | |
1185 | Part.Transparency=Part.Transparency+0.05 | |
1186 | end | |
1187 | Part.Parent=nil | |
1188 | effect.Parent=nil | |
1189 | end),v) | |
1190 | end | |
1191 | end | |
1192 | wait(0.5) | |
1193 | gwld1.Part1=LeftArm | |
1194 | gwld1.C0=euler(1.57+0.5,0,-1.57)*cf(0,1,0) | |
1195 | for i=0,1,0.1 do | |
1196 | wait() | |
1197 | gwld1.C0=euler(1.57+0.5,0,-1.57+1.57*i)*cf(0,1,0) | |
1198 | RW.C0=cf(1+0.5*i, 0.3+0.2*i, -0.8+0.8*i) * euler(1.27-1.27*i,0,-1.3+1.5*i) | |
1199 | RW.C1=cf(0, 0.5, 0) * euler(0,-1+1*i,0) | |
1200 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.5-1*i,0,0.2+0.4*i) | |
1201 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
1202 | end | |
1203 | attack=false | |
1204 | end | |
1205 | ||
1206 | function Sword() | |
1207 | attack=true | |
1208 | Mode="Sword" | |
1209 | swld1.Part1=LeftArm | |
1210 | swld1.C0=euler(0,0,-1.57)*cf(0,1,0) | |
1211 | swld1.C1=euler(0,0,0) | |
1212 | coroutine.resume(coroutine.create(function(Cone,Screen1,Screen2,Screen3) | |
1213 | numb=0.5 | |
1214 | for i=0,1,0.1 do | |
1215 | wait() | |
1216 | Cone.Transparency=numb | |
1217 | Screen1.Transparency=numb | |
1218 | Screen2.Transparency=numb | |
1219 | Screen3.Transparency=numb | |
1220 | numb=numb+0.1 | |
1221 | end | |
1222 | Cone.Parent=nil | |
1223 | Screen1.Parent=nil | |
1224 | Screen2.Parent=nil | |
1225 | Screen3.Parent=nil | |
1226 | end),cone,screen1,screen2,screen3) | |
1227 | for i=0,1,0.1 do | |
1228 | wait() | |
1229 | Neck.C0=necko*euler(-0.3+0.3*i,0,-0.3+0.3*i) | |
1230 | RW.C0=cf(1, 0.3, -0.8) * euler(1.57-0.3*i,0,-0.7-0.6*i) | |
1231 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+0.5*i,0) | |
1232 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(2.3-0.8*i,0,0.7-0.5*i) | |
1233 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1234 | end | |
1235 | sword.Parent=modelzorz | |
1236 | for e=1,#SwordWelds do | |
1237 | SwordWelds[e].Parent=modelzorz | |
1238 | end | |
1239 | for _,v in pairs(sword:children()) do | |
1240 | if v.className=="Part" and v.Name~="Hitbox" and v.Name~="Mid" then | |
1241 | v.Transparency=1 | |
1242 | end | |
1243 | end | |
1244 | for _,v in pairs(sword:children()) do | |
1245 | if v.className=="Part" and v.Name~="Hitbox" and v.Name~="Mid" then | |
1246 | v.Transparency=1 | |
1247 | coroutine.resume(coroutine.create(function(Part) | |
1248 | wait(0.5) | |
1249 | Part.Transparency=0 | |
1250 | end),v) | |
1251 | end | |
1252 | end | |
1253 | effect=sword:Clone() | |
1254 | effect.Parent=workspace | |
1255 | print(effect) | |
1256 | for _,v in pairs(effect:children()) do | |
1257 | if v.className=="Part" and v.Name~="Hitbox" and v.Name~="Mid" then | |
1258 | v.Transparency=1 | |
1259 | v.Anchored=true | |
1260 | v.CanCollide=false | |
1261 | v.BrickColor=BrickColor.new("Bright blue") | |
1262 | coroutine.resume(coroutine.create(function(Part) | |
1263 | for i=0,1,0.1 do | |
1264 | wait(0) | |
1265 | Part.Transparency=Part.Transparency-0.05 | |
1266 | end | |
1267 | for i=0,1,0.1 do | |
1268 | wait(0) | |
1269 | Part.Transparency=Part.Transparency+0.05 | |
1270 | end | |
1271 | Part.Parent=nil | |
1272 | effect.Parent=nil | |
1273 | end),v) | |
1274 | end | |
1275 | end | |
1276 | wait(0.5) | |
1277 | for i=0,1,0.1 do | |
1278 | wait() | |
1279 | swld1.C0=euler(0,-1.57*i,1.57-3.14*i)*cf(0,1,0) | |
1280 | swld1.C1=euler(0,1.57*i,0) | |
1281 | RW.C0=cf(1+0.5*i, 0.3+0.2*i, -0.8+0.8*i) * euler(1.27-1.27*i,0,-1.3+1.5*i) | |
1282 | RW.C1=cf(0, 0.5, 0) * euler(0,-1+1*i,0) | |
1283 | LW.C0=cf(-1.2-0.3*i, 0.5, -0.3+0.3*i) * euler(1.5-1.5*i,0,0.2-0.6*i) | |
1284 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1285 | end | |
1286 | attack=false | |
1287 | end | |
1288 | ||
1289 | function Sniper() | |
1290 | attack=true | |
1291 | Mode="Sniper" | |
1292 | snwld1.Part1=LeftArm | |
1293 | snwld1.C0=euler(0.5,0,0)*cf(0,1.6,-2) | |
1294 | coroutine.resume(coroutine.create(function(Cone,Screen1,Screen2,Screen3) | |
1295 | numb=0.5 | |
1296 | for i=0,1,0.1 do | |
1297 | wait() | |
1298 | Cone.Transparency=numb | |
1299 | Screen1.Transparency=numb | |
1300 | Screen2.Transparency=numb | |
1301 | Screen3.Transparency=numb | |
1302 | numb=numb+0.1 | |
1303 | end | |
1304 | Cone.Parent=nil | |
1305 | Screen1.Parent=nil | |
1306 | Screen2.Parent=nil | |
1307 | Screen3.Parent=nil | |
1308 | end),cone,screen1,screen2,screen3) | |
1309 | for i=0,1,0.1 do | |
1310 | wait() | |
1311 | Neck.C0=necko*euler(-0.3+0.3*i,0,-0.3+0.3*i) | |
1312 | RW.C0=cf(1, 0.3, -0.8) * euler(1.57-0.3*i,0,-0.7-0.6*i) | |
1313 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.5+0.5*i,0) | |
1314 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(2.3-0.8*i,0,0.7-0.5*i) | |
1315 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1316 | end | |
1317 | sniper.Parent=modelzorz | |
1318 | for e=1,#SniperWelds do | |
1319 | SniperWelds[e].Parent=modelzorz | |
1320 | end | |
1321 | for _,v in pairs(sniper:children()) do | |
1322 | if v.className=="Part" then | |
1323 | v.Transparency=1 | |
1324 | end | |
1325 | end | |
1326 | for _,v in pairs(sniper:children()) do | |
1327 | if v.className=="Part" then | |
1328 | v.Transparency=1 | |
1329 | coroutine.resume(coroutine.create(function(Part) | |
1330 | wait(0.5) | |
1331 | Part.Transparency=0 | |
1332 | end),v) | |
1333 | end | |
1334 | end | |
1335 | effect=sniper:Clone() | |
1336 | effect.Parent=workspace | |
1337 | print(effect) | |
1338 | for _,v in pairs(effect:children()) do | |
1339 | if v.className=="Part" then | |
1340 | v.Transparency=1 | |
1341 | v.Anchored=true | |
1342 | v.CanCollide=false | |
1343 | v.BrickColor=BrickColor.new("Bright blue") | |
1344 | coroutine.resume(coroutine.create(function(Part) | |
1345 | for i=0,1,0.1 do | |
1346 | wait(0) | |
1347 | Part.Transparency=Part.Transparency-0.05 | |
1348 | end | |
1349 | for i=0,1,0.1 do | |
1350 | wait(0) | |
1351 | Part.Transparency=Part.Transparency+0.05 | |
1352 | end | |
1353 | Part.Parent=nil | |
1354 | effect.Parent=nil | |
1355 | end),v) | |
1356 | end | |
1357 | end | |
1358 | wait(0.5) | |
1359 | gwld1.Part1=LeftArm | |
1360 | snwld1.C0=euler(0.5,0,0)*cf(0,1.6,-2) | |
1361 | snwld1.C1=cf(0,0,0) | |
1362 | for i=0,1,0.1 do | |
1363 | wait() | |
1364 | snwld1.C0=euler(0.5+1.57*i,0,0)*cf(0,1.6-0.6*i,-2+2*i) | |
1365 | RW.C0=cf(1, 0.3, -0.8+0.3*i) * euler(1.27-0.37*i,0,-1.3+1*i) | |
1366 | RW.C1=cf(0, 0.5, 0) * euler(0,-1+2.3*i,0) | |
1367 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.57-0.5*i,0,0.2+0.5*i) | |
1368 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1369 | end | |
1370 | attack=false | |
1371 | end | |
1372 | ||
1373 | function Shoot() | |
1374 | attack=true | |
1375 | Humanoid.WalkSpeed=2 | |
1376 | Bg.Parent=Head | |
1377 | Bg.cframe=Head.CFrame | |
1378 | for i=0,1,0.2 do | |
1379 | wait() | |
1380 | Neck.C0=necko*euler(0,0,0.785*i) | |
1381 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1382 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1383 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(0.5+1.07*i,0,0.6-1.385*i) | |
1384 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) | |
1385 | end | |
1386 | spread=1 | |
1387 | range=70 | |
1388 | rangepower=90 | |
1389 | while hold==true and Bullets~=0 do | |
1390 | for i=1,5 do | |
1391 | wait(0.05) | |
1392 | Bullets=Bullets-1 | |
1393 | so("http://roblox.com/asset/?id=136523485",gprt16,0.5,1+math.random()) | |
1394 | coroutine.resume(coroutine.create(function() | |
1395 | for z = 1 ,2 do | |
1396 | coroutine.resume(coroutine.create(function() | |
1397 | local meshb1 = Instance.new("BlockMesh") | |
1398 | meshb1.Scale = Vector3.new(1,1,1) | |
1399 | light = Instance.new("PointLight") | |
1400 | light.Brightness = .8 | |
1401 | light.Color = Color3.new(100,50,0) | |
1402 | light.Range = 10 | |
1403 | local shellb1 = Instance.new("Part") | |
1404 | light.Parent = shellb1 | |
1405 | meshb1.Parent = shellb1 | |
1406 | shellb1.Anchored = true | |
1407 | shellb1.formFactor = 3 | |
1408 | shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100) | |
1409 | shellb1.CFrame = CFrame.new((gprt16.CFrame * CFrame.new(0,-gprt16.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100) | |
1410 | shellb1.Parent = Character | |
1411 | shellb1.Transparency = 0 | |
1412 | if math.random(1,2) == 1 then | |
1413 | shellb1.BrickColor = BrickColor.new("Bright red") | |
1414 | else | |
1415 | shellb1.BrickColor = BrickColor.new("Bright orange") | |
1416 | end | |
1417 | shellb1.CanCollide = false | |
1418 | local incre = math.random(0,60)/100 | |
1419 | for i = 0 , 1 , 0.1 do | |
1420 | wait() | |
1421 | light.Brightness = light.Brightness - .1 | |
1422 | shellb1.CFrame = shellb1.CFrame + Head.CFrame.lookVector*incre | |
1423 | shellb1.Transparency = 1*i | |
1424 | meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i) | |
1425 | end | |
1426 | shellb1.Parent=nil | |
1427 | end)) | |
1428 | end | |
1429 | end)) | |
1430 | shoottrail(MMouse.Hit.p,gprt16,5,1,1) | |
1431 | LW.C1=cf(0, 0.5, 0) * euler(-0.2,0,0) | |
1432 | wait(0.05) | |
1433 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1434 | end | |
1435 | end | |
1436 | spread=0 | |
1437 | range=500 | |
1438 | rangepower=50 | |
1439 | if Bullets==0 then | |
1440 | for i=0,1,0.2 do | |
1441 | wait(0) | |
1442 | gwld13.C0=cf(0,0,0.3)*euler(0,1.57-1.57*i,0) | |
1443 | end | |
1444 | wait(0.2) | |
1445 | Humanoid.WalkSpeed=16 | |
1446 | Bg.Parent=nil | |
1447 | for i=0,1,0.1 do | |
1448 | wait() | |
1449 | gwld1.C0=euler(1.57+0.5,0,-1.57*i)*cf(0,1,0) | |
1450 | Neck.C0=necko*euler(0.3*i,0,0.785-0.785*i) | |
1451 | RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(1.2*i,0,0.2-0.4*i) | |
1452 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1453 | LW.C0=cf(-1.2+0.2*i, 0.5, -0.3-0.2*i) * euler(1.57-0.57*i,0,-0.785+0.785*i) | |
1454 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1455 | end | |
1456 | for i=0,1,0.1 do | |
1457 | wait() | |
1458 | gwld20.C0=cf(0.3*i,-0.8-0.2*i,0)*euler(0,0,1.57*i) | |
1459 | RW.C0=cf(1, 0.5, -0.5) * euler(1.2-0.3*i,0,-0.2-0.1*i) | |
1460 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1461 | end | |
1462 | for i=0,1,0.2 do | |
1463 | wait() | |
1464 | Neck.C0=necko*euler(0.3+0.2*i,0,-0.5*i) | |
1465 | RW.C0=cf(1+0.5*i, 0.5, -0.5+0.5*i) * euler(0.9-1.3*i,0,-0.3) | |
1466 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1467 | end | |
1468 | local ammo=Instance.new("Model") | |
1469 | ammo.Parent=modelzorz | |
1470 | ammo.Name="Ammo" | |
1471 | local aprt1=part(3,ammo,0,0,BrickColor.new("Dark stone grey"),"Part1",vt(1,1,1)) | |
1472 | local amsh1=mesh("CylinderMesh",aprt1,"","",vt(0,0,0),vt(0.7,0.2,0.7)) | |
1473 | local awld1=weld(aprt1,aprt1,RightArm,cf(0,1,0)) | |
1474 | numb=0 | |
1475 | for i=1,10 do | |
1476 | local aprt2=part(3,ammo,0,0,BrickColor.new("Bright yellow"),"Part2",vt(1,1,1)) | |
1477 | local amsh2=mesh("CylinderMesh",aprt2,"","",vt(0,0,0),vt(0.2,0.3,0.2)) | |
1478 | local awld2=weld(aprt2,aprt2,aprt1,cf(0.2,0.1,0)*euler(0,numb,0)) | |
1479 | numb=numb+0.628 | |
1480 | end | |
1481 | for i=0,1,0.2 do | |
1482 | wait() | |
1483 | awld1.C0=euler(1.57,0,0)*cf(0,1+0.1*i,0) | |
1484 | Neck.C0=necko*euler(0.5-0.2*i,0,-0.5+0.5*i) | |
1485 | RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(-0.4+1.5*i,0,-0.3-0.1*i) | |
1486 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1487 | end | |
1488 | ammo.Parent=nil | |
1489 | for i=0,1,0.2 do | |
1490 | wait() | |
1491 | gwld20.C0=cf(0.3-0.3*i,-0.8-0.2+0.2*i,0)*euler(0,0,1.57-1.57*i) | |
1492 | Neck.C0=necko*euler(0.3-0.1*i,0,-0.2*i) | |
1493 | RW.C0=cf(1.5-0.5, 0.5, -0.5) * euler(1.1+0.1*i,0,-0.4+0.4*i) | |
1494 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1495 | end | |
1496 | for i=0,1,0.1 do | |
1497 | wait() | |
1498 | gwld1.C0=euler(1.57+0.5,0,-1.57+1.57*i)*cf(0,1,0) | |
1499 | gwld13.C0=cf(0,0,0.3)*euler(0,1.57*i,0) | |
1500 | Neck.C0=necko*euler(0.2-0.2*i,0,-0.2+0.2*i) | |
1501 | RW.C0=cf(1.5-0.5+0.5*i, 0.5, -0.5+0.5*i) * euler(1.2-1.2*i,0,0.2*i) | |
1502 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1503 | LW.C0=cf(-1-0.2*i, 0.5, -0.5+0.2*i) * euler(1-0.5*i,0,0.6*i) | |
1504 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
1505 | end | |
1506 | Bullets=10 | |
1507 | else | |
1508 | for i=0,1,0.1 do | |
1509 | wait() | |
1510 | Neck.C0=necko*euler(0,0,0.785-0.785*i) | |
1511 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1512 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1513 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.57-1.57*i,0,-0.785+1.385*i) | |
1514 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
1515 | end | |
1516 | Neck.C0=necko | |
1517 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1518 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1519 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(0.5,0,0.6) | |
1520 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1521 | end | |
1522 | Bg.Parent=nil | |
1523 | Humanoid.WalkSpeed=16 | |
1524 | attack=false | |
1525 | end | |
1526 | ||
1527 | function slash1() | |
1528 | attack=true | |
1529 | for i=0,1,0.1 do | |
1530 | wait() | |
1531 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1532 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1533 | LW.C0=cf(-1.5, 0.5, 0) * euler(-0.4*i,0,-0.4-0.2*i) | |
1534 | LW.C1=cf(0, 0.5, 0) * euler(0,1*i,0) | |
1535 | end | |
1536 | Bg.Parent=Head | |
1537 | Bg.cframe=Head.CFrame | |
1538 | con1=sprt16.Touched:connect(function(hit) Damagefunc1(hit,20,10) end) | |
1539 | so("http://roblox.com/asset/?id=10209640",LeftArm,1,1) | |
1540 | for i=0,1,0.2 do | |
1541 | wait() | |
1542 | Neck.C0=necko*euler(0,0,0.785*i) | |
1543 | swld1.C0=euler(0.5*i,-1.57,-1.57)*cf(0,1,0) | |
1544 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1545 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1546 | LW.C0=cf(-1.5+0.5*i, 0.5, -0.5*i) * euler(-0.4+2.4*i,0,-0.6+1.4*i) | |
1547 | LW.C1=cf(0, 0.5, 0) * euler(0,1,0) | |
1548 | end | |
1549 | for i=0,1,0.1 do | |
1550 | wait() | |
1551 | --[[Neck.C0=necko*euler(0,0,0.785*i) | |
1552 | swld1.C0=euler(0.5*i,-1.57,-1.57)*cf(0,1,0)]] | |
1553 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1554 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1555 | LW.C0=cf(-1.5+0.5, 0.5, -0.5) * euler(2,0,0.8+0.2*i) | |
1556 | LW.C1=cf(0, 0.5, 0) * euler(0,1,0) | |
1557 | end | |
1558 | con1:disconnect() | |
1559 | wait() | |
1560 | attack=false | |
1561 | end | |
1562 | ||
1563 | function slash2() | |
1564 | attack=true | |
1565 | CF=Head.CFrame | |
1566 | con1=sprt16.Touched:connect(function(hit) Damagefunc1(hit,10,10) end) | |
1567 | so("http://roblox.com/asset/?id=10209640",LeftArm,1,1.5) | |
1568 | for i=0,1,0.2 do | |
1569 | wait() | |
1570 | swld1.C0=euler(0.5-0.5*i,-1.57,-1.57)*cf(0,1,0) | |
1571 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1572 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1573 | LW.C0=cf(-1-0.5*i, 0.5, -0.5+0.5*i) * euler(2-0.43*i,0,1-2.57*i) | |
1574 | LW.C1=cf(0, 0.5, 0) * euler(0,1+.57*i,0) | |
1575 | Bg.cframe=CF*euler(0,3.14*i,0) | |
1576 | end | |
1577 | so("http://roblox.com/asset/?id=10209640",LeftArm,1,1.5) | |
1578 | for i=0,1,0.2 do | |
1579 | wait() | |
1580 | swld1.C0=euler(-0.5*i,-1.57,-1.57)*cf(0,1,0) | |
1581 | Bg.cframe=CF*euler(0,3.14+3.14*i,0) | |
1582 | end | |
1583 | con1:disconnect() | |
1584 | wait() | |
1585 | attack=false | |
1586 | end | |
1587 | ||
1588 | function slash3() | |
1589 | attack=true | |
1590 | Bg.Parent=nil | |
1591 | for i=0,1,0.1 do | |
1592 | wait() | |
1593 | Neck.C0=necko*euler(0,0,0.785-0.785*i) | |
1594 | swld1.C0=euler(-0.5+0.5*i,-1.57,-1.57)*cf(0,1,0) | |
1595 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
1596 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1597 | LW.C0=cf(-1.5, 0.5, 0) * euler(1.57+.43*i,0,-1.57+1*i) | |
1598 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-2.07*i,0) | |
1599 | end | |
1600 | con1=sprt16.Touched:connect(function(hit) Damagefunc1(hit,20,10) end) | |
1601 | so("http://roblox.com/asset/?id=10209640",LeftArm,1,0.9) | |
1602 | for i=0,1,0.2 do | |
1603 | wait() | |
1604 | Neck.C0=necko*euler(0.3*i,0,-0.2*i) | |
1605 | swld1.C0=euler(-0.3*i,-1.57,-1.57)*cf(0,1,0) | |
1606 | RW.C0=cf(1.5, 0.5, 0) * euler(-0.5*i,0,0.2+0.2*i) | |
1607 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1608 | LW.C0=cf(-1.5+1.5*i, 0.5-0.2*i, -1*i) * euler(2-1.5*i,0,-.57+1.07*i) | |
1609 | LW.C1=cf(0, 0.5, 0) * euler(0,-.5,0) | |
1610 | end | |
1611 | for i=0,1,0.1 do | |
1612 | wait() | |
1613 | RW.C0=cf(1.5, 0.5, 0) * euler(-0.5,0,0.4) | |
1614 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1615 | LW.C0=cf(0, 0.3, -1) * euler(.5-.2*i,0,.5) | |
1616 | LW.C1=cf(0, 0.5, 0) * euler(0,-.5,0) | |
1617 | end | |
1618 | con1:disconnect() | |
1619 | wait() | |
1620 | attack=false | |
1621 | end | |
1622 | ||
1623 | function BowShoot() | |
1624 | attack=true | |
1625 | BowAim=true | |
1626 | HeadNumb=0 | |
1627 | Humanoid.WalkSpeed=2 | |
1628 | coroutine.resume(coroutine.create(function(FenNeck) | |
1629 | while BowAim==true do | |
1630 | wait() | |
1631 | local pos4 = vt(workspace.CurrentCamera.CoordinateFrame.X,Head.Position.Y,workspace.CurrentCamera.CoordinateFrame.Z) | |
1632 | Bg.cframe = cf(Head.Position,pos4) * euler(0,3.14-HeadNumb,0) * cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) * | |
1633 | Bg.Parent = Torso | |
1634 | offset=(Torso.Position.y-MMouse.Hit.p.y)/60 | |
1635 | mag=(Torso.Position-MMouse.Hit.p).magnitude/80 | |
1636 | offset=offset/mag | |
1637 | FenNeck.C1=necko2*euler(-offset,0,0) | |
1638 | end | |
1639 | end),Neck) | |
1640 | for i=0,1,0.1 do | |
1641 | wait() | |
1642 | HeadNumb=1.57*i | |
1643 | swld1.C0=euler(0,-1.57+0.3*i,-1.57)*cf(0,1,0) | |
1644 | Neck.C0=necko*euler(0,0,HeadNumb) | |
1645 | RW.C0=cf(1.5-2.5*i, 0.5, -1*i) * euler(1.57*i,0,0.2-1.97*i) | |
1646 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1647 | LW.C0=cf(-1.5, 0.5, 0) * euler(1.57*i,0,-0.4-0.87*i) | |
1648 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1649 | end | |
1650 | ||
1651 | local string1=part(3,sword,0,1,BrickColor.new("Bright yellow"),"String1",vt(0.5,1,0.5)) | |
1652 | local stringmsh1=mesh("CylinderMesh",string1,"","",vt(0,0,0),vt(0.1,1,0.1)) | |
1653 | local stringwld1=weld(string1,string1,prt17,euler(0,0,0)*cf(0,0,0)) | |
1654 | local string2=part(3,sword,0,1,BrickColor.new("Bright yellow"),"String2",vt(0.5,1,0.5)) | |
1655 | local stringmsh2=mesh("CylinderMesh",string2,"","",vt(0,0,0),vt(0.1,1,0.1)) | |
1656 | local stringwld2=weld(string2,string2,prt19,euler(0,0,0)*cf(0,0,0)) | |
1657 | table.insert(SwordWelds,stringwld1) | |
1658 | table.insert(SwordWelds,stringwld1) | |
1659 | coroutine.resume(coroutine.create(function(String1,String2) | |
1660 | for i=0,1,0.1 do | |
1661 | wait() | |
1662 | String1.Transparency=String1.Transparency-0.05 | |
1663 | String2.Transparency=String2.Transparency-0.05 | |
1664 | end | |
1665 | end),string1,string2) | |
1666 | ||
1667 | local strmdl = "Arrow" | |
1668 | coroutine.resume(coroutine.create(function() | |
1669 | arrowdebounce=false | |
1670 | repeat | |
1671 | wait(0) | |
1672 | coroutine.resume(coroutine.create(function() | |
1673 | if arrowdebounce==false then | |
1674 | so("http://www.roblox.com/asset/?id=10756118",sprt18,1,1) | |
1675 | Lightning(sprt17.Position,sprt18.Position,3,0.2,"Bright yellow",0.00001,0.4) | |
1676 | Lightning(sprt19.Position,sprt18.Position,3,0.2,"Bright yellow",0.00001,0.4) | |
1677 | arrowdebounce=true | |
1678 | wait(0.1) | |
1679 | arrowdebounce=false | |
1680 | end | |
1681 | end)) | |
1682 | local top = sprt17.CFrame | |
1683 | local bottom = sprt19.CFrame | |
1684 | local oristrpos | |
1685 | if strmdl == "Bow" then | |
1686 | oristrpos = CFrame.new((top.p+bottom.p)/2) | |
1687 | elseif strmdl == "Arrow" then | |
1688 | oristrpos = sprt18.CFrame | |
1689 | end | |
1690 | local mg1 = (top.p - oristrpos.p).magnitude | |
1691 | local mg2 = (bottom.p - oristrpos.p).magnitude | |
1692 | stringmsh1.Scale=vt(0.1,mg1,0.1) | |
1693 | basecf=sprt17.CFrame | |
1694 | cff=CFrame.new(sprt17.CFrame*angles(1.57,0,0).p,sprt18.Position)*angles(math.rad(90),0,0)*cf(0,-mg1/2,0) | |
1695 | hit2=string1 | |
1696 | hit=sprt18 | |
1697 | stringwld1.Parent=string1 | |
1698 | stringwld1.Part0=hit2 | |
1699 | stringwld1.Part1=hit | |
1700 | HitPos=cff.p | |
1701 | local CJ = CFrame.new(HitPos) | |
1702 | local C0=cff:inverse() *CJ | |
1703 | local C1=hit.CFrame:inverse() * CJ | |
1704 | stringwld1.C0=C0 | |
1705 | stringwld1.C1=C1 | |
1706 | ||
1707 | stringmsh2.Scale=vt(0.1,mg2,0.1) | |
1708 | cff2=CFrame.new(sprt18.CFrame*angles(1.57,0,0).p,sprt19.Position)*angles(math.rad(90),0,0)*cf(0,-mg2/2,0) | |
1709 | hit3=string2 | |
1710 | hit2=sprt18 | |
1711 | stringwld2.Parent=string2 | |
1712 | stringwld2.Part0=hit3 | |
1713 | stringwld2.Part1=hit2 | |
1714 | HitPos2=cff2.p | |
1715 | local CJ2 = CFrame.new(HitPos2) | |
1716 | local C02=cff2:inverse() *CJ | |
1717 | local C12=hit2.CFrame:inverse() * CJ | |
1718 | stringwld2.C0=C02 | |
1719 | stringwld2.C1=C12 | |
1720 | until string1.Parent==nil | |
1721 | end)) | |
1722 | swld18.Part1=RightArm | |
1723 | swld18.C0=cf(0,1,0) | |
1724 | local arrow=part(3,sword,0,1,BrickColor.new("Bright yellow"),"Arrow",vt(1,1,1)) | |
1725 | local arrowmsh=mesh("SpecialMesh",arrow,"FileMesh","http://www.roblox.com/asset/?id=15887356",vt(0,0,0),vt(1,1,2)) | |
1726 | arrowmsh.VertexColor=vt(1,1,1) | |
1727 | local arrowwld=weld(arrow,arrow,sprt18,euler(-1.57,0,0)*cf(0,1,0)) | |
1728 | for i=0,1,0.1 do | |
1729 | wait() | |
1730 | arrow.Transparency=arrow.Transparency-0.05 | |
1731 | arrowwld.C0=euler(-1.57,0,0)*cf(0,1,0)*euler(0,0,0.15*i) | |
1732 | RW.C0=cf(1.5-2.5+2*i, 0.5, -1) * euler(1.57,0,-1.77+0.2*i) | |
1733 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1734 | LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-1.27) | |
1735 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1736 | end | |
1737 | while BowAim==true do | |
1738 | wait(0) | |
1739 | end | |
1740 | so("http://www.roblox.com/asset/?id=16211041",prt18,1,1) | |
1741 | spread=0 | |
1742 | range=500 | |
1743 | rangepower=100 | |
1744 | shoottrail(MMouse.Hit.p,arrow,30,10,2) | |
1745 | Humanoid.WalkSpeed=0 | |
1746 | arrow.Parent=nil | |
1747 | swld18.Part0=sprt18 | |
1748 | swld18.Part1=sprt1 | |
1749 | swld18.C0=cf(0,0,-0.8) | |
1750 | for i=0,1,0.2 do | |
1751 | wait() | |
1752 | Neck.C0=necko*euler(-0.2*i,0,HeadNumb) | |
1753 | RW.C0=cf(1, 0.5, -1) * euler(1.57,0,-1.57) | |
1754 | RW.C1=cf(0, 0.5, 0) * euler(-0.4*i,0,0) | |
1755 | LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-1.27) | |
1756 | LW.C1=cf(0, 0.5, 0) * euler(-0.4*i,0,0) | |
1757 | end | |
1758 | for i=0,1,0.1 do | |
1759 | wait() | |
1760 | Neck.C0=necko*euler(-0.2-0.1*i,0,HeadNumb) | |
1761 | RW.C0=cf(1, 0.5, -1) * euler(1.57,0,-1.57) | |
1762 | RW.C1=cf(0, 0.5, 0) * euler(-0.4-0.1*i,0,0) | |
1763 | LW.C0=cf(-1.5, 0.5, 0) * euler(1.57,0,-1.27) | |
1764 | LW.C1=cf(0, 0.5, 0) * euler(-0.4-0.1*i,0,0) | |
1765 | end | |
1766 | string1.Parent=nil | |
1767 | string2.Parent=nil | |
1768 | BowAim=false | |
1769 | Humanoid.WalkSpeed=16 | |
1770 | Bg.Parent=nil | |
1771 | for i=0,1,0.1 do | |
1772 | wait() | |
1773 | Neck.C0=necko*euler(-0.3+0.3*i,0,HeadNumb-HeadNumb*i) | |
1774 | RW.C0=cf(1+0.5*i, 0.5, -1+1*i) * euler(1.57-1.57*i,0,-1.57+1.77*i) | |
1775 | RW.C1=cf(0, 0.5, 0) * euler(-0.5+0.5*i,0,0) | |
1776 | LW.C0=cf(-1.5, 0.5, 0) * euler(1.57-1.57*i,0,-1.27+1.07*i) | |
1777 | LW.C1=cf(0, 0.5, 0) * euler(-0.5+0.5*i,0,0) | |
1778 | end | |
1779 | spread=0 | |
1780 | range=500 | |
1781 | rangepower=50 | |
1782 | Neck.C1=necko2 | |
1783 | Neck.C0=necko | |
1784 | attack=false | |
1785 | end | |
1786 | ||
1787 | function Aim() | |
1788 | attack=true | |
1789 | Humanoid.WalkSpeed=5 | |
1790 | Bg.Parent=Torso | |
1791 | Bg.cframe=Head.CFrame | |
1792 | CF=Torso.CFrame | |
1793 | for i=0,1,0.1 do | |
1794 | wait() | |
1795 | Bg.cframe=CF*euler(0,0.785*i,0) | |
1796 | Neck.C0=necko*euler(0,0,-0.785*i) | |
1797 | Neck.C1=necko2*euler(0,-0.5*i,0) | |
1798 | RW.C0=cf(1+0.2*i, 0.3, -0.5-0.2*i) * euler(0.9+0.6*i,0,-0.3+0.1*i) | |
1799 | RW.C1=cf(0, 0.5, 0) * euler(0,1.3+0.27*i,0) | |
1800 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.07+0.5*i,0,0.7+0.085*i) | |
1801 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1802 | end | |
1803 | attack=false | |
1804 | end | |
1805 | ||
1806 | function UnAim() | |
1807 | attack=true | |
1808 | Humanoid.WalkSpeed=16 | |
1809 | for i=0,1,0.1 do | |
1810 | wait() | |
1811 | Bg.cframe=CF*euler(0,0.785-0.785*i,0) | |
1812 | Neck.C0=necko*euler(0,0,-0.785+0.785*i) | |
1813 | Neck.C1=necko2*euler(0,-0.5+0.5*i,0) | |
1814 | RW.C0=cf(1.2-0.2*i, 0.3, -0.7+0.2*i) * euler(1.5-0.6*i,0,-0.2-0.1*i) | |
1815 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57-0.27*i,0) | |
1816 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.57-0.5*i,0,0.785-0.085*i) | |
1817 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1818 | end | |
1819 | Bg.Parent=nil | |
1820 | attack=false | |
1821 | end | |
1822 | ||
1823 | function SniperShoot() | |
1824 | attack=true | |
1825 | spread=0 | |
1826 | range=1000 | |
1827 | rangepower=100 | |
1828 | shoottrail(MMouse.Hit.p,snprt15,20,20,0.5) | |
1829 | coroutine.resume(coroutine.create(function() | |
1830 | for z = 1 ,4 do | |
1831 | coroutine.resume(coroutine.create(function() | |
1832 | local meshb1 = Instance.new("BlockMesh") | |
1833 | meshb1.Scale = Vector3.new(1,1,1) | |
1834 | light = Instance.new("PointLight") | |
1835 | light.Brightness = .8 | |
1836 | light.Color = Color3.new(100,50,0) | |
1837 | light.Range = 10 | |
1838 | local shellb1 = Instance.new("Part") | |
1839 | light.Parent = shellb1 | |
1840 | meshb1.Parent = shellb1 | |
1841 | shellb1.Anchored = true | |
1842 | shellb1.formFactor = 3 | |
1843 | shellb1.Size = Vector3.new(0.3,0.3,0.3) * (math.random(100,300)/100) | |
1844 | shellb1.CFrame = CFrame.new((snprt15.CFrame * CFrame.new(0,-snprt15.Size.y/2,0)).p) * CFrame.Angles(math.random(-100,100)/100,math.random(-100,100)/100,math.random(-100,100)/100) | |
1845 | shellb1.Parent = Character | |
1846 | shellb1.Transparency = 0 | |
1847 | if math.random(1,2) == 1 then | |
1848 | shellb1.BrickColor = BrickColor.new("Bright red") | |
1849 | else | |
1850 | shellb1.BrickColor = BrickColor.new("Bright orange") | |
1851 | end | |
1852 | shellb1.CanCollide = false | |
1853 | local incre = math.random(0,60)/100 | |
1854 | HCF=Head.CFrame.lookVector | |
1855 | for i = 0 , 1 , 0.02 do | |
1856 | wait() | |
1857 | light.Brightness = light.Brightness - .02 | |
1858 | shellb1.CFrame = shellb1.CFrame + HCF*incre | |
1859 | shellb1.Transparency = 1*i | |
1860 | meshb1.Scale = Vector3.new(1+1*i,1+1*i,1+1*i) | |
1861 | end | |
1862 | shellb1.Parent=nil | |
1863 | end)) | |
1864 | end | |
1865 | end)) | |
1866 | so("http://roblox.com/asset/?id=132083686",snprt15,1,0.8) | |
1867 | for i=0,1,0.3 do | |
1868 | wait() | |
1869 | Neck.C0=necko*euler(-0.3*i,0,-0.785) | |
1870 | RW.C0=cf(1.2, 0.3, -0.7) * euler(1.5+0.3*i,0,-0.2) | |
1871 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1872 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.57,0,0.785) | |
1873 | LW.C1=cf(0, 0.5, 0) * euler(-0.3*i,0,0) | |
1874 | end | |
1875 | for i=0,1,0.2 do | |
1876 | wait() | |
1877 | Neck.C0=necko*euler(-0.3-0.1*i,0,-0.785) | |
1878 | RW.C0=cf(1.2, 0.3, -0.7) * euler(1.5+0.3+0.1*i,0,-0.2) | |
1879 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1880 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.57,0,0.785) | |
1881 | LW.C1=cf(0, 0.5, 0) * euler(-0.3-0.1*i,0,0) | |
1882 | end | |
1883 | Humanoid.WalkSpeed=16 | |
1884 | for i=0,1,0.1 do | |
1885 | wait() | |
1886 | Neck.C0=necko*euler(-0.4+0.6*i,0,-0.785+0.785*i) | |
1887 | Neck.C1=necko2*euler(0,-0.5+0.5*i,0) | |
1888 | RW.C0=cf(1.2, 0.3, -0.7) * euler(1.9-0.6*i,0,-0.2-0.4*i) | |
1889 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1890 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.57,0,0.785-0.185*i) | |
1891 | LW.C1=cf(0, 0.5, 0) * euler(-0.4+0.8*i,0,0) | |
1892 | end | |
1893 | so("http://roblox.com/asset/?id=10209881",snprt15,1,1) | |
1894 | local ammo=part(3,workspace,0,0,BrickColor.new("Bright red"),"Ammo",vt(1,1,1)) | |
1895 | ammo.CanCollide=true | |
1896 | ammomsh=mesh("CylinderMesh",ammo,"","",vt(0,0,0),vt(0.15,0.2,0.15)) | |
1897 | local cfrf = snprt25.CFrame * CFrame.fromEulerAnglesXYZ(0,1.57,0) | |
1898 | local cfr = cfrf + cfrf.lookVector * -0.5 | |
1899 | ammo.CFrame = cfr | |
1900 | ammo.RotVelocity = Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)) | |
1901 | ammo.Velocity = cfr.lookVector * 20 | |
1902 | coroutine.resume(coroutine.create(function(Part) | |
1903 | wait(10) | |
1904 | Part.Parent=nil | |
1905 | end),ammo) | |
1906 | for i=0,1,0.2 do | |
1907 | wait() | |
1908 | snwld26.C1=euler(0,0,1*i) | |
1909 | RW.C0=cf(1.2, 0.3, -0.7-0.4*i) * euler(1.3,0,-0.6+0.3*i) | |
1910 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1911 | end | |
1912 | for i=0,1,0.2 do | |
1913 | wait() | |
1914 | snwld26.C1=euler(0,0,1-1*i) | |
1915 | RW.C0=cf(1.2, 0.3, -0.7-0.4+0.4*i) * euler(1.3,0,-0.6+0.3-0.3*i) | |
1916 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1917 | end | |
1918 | Humanoid.WalkSpeed=5 | |
1919 | for i=0,1,0.1 do | |
1920 | wait() | |
1921 | Neck.C0=necko*euler(0.2-0.2*i,0,-0.785*i) | |
1922 | Neck.C1=necko2*euler(0,-0.5*i,0) | |
1923 | RW.C0=cf(1.2, 0.3, -0.7) * euler(1.3+0.2*i,0,-0.6+0.4*i) | |
1924 | RW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
1925 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.57,0,0.6+0.185*i) | |
1926 | LW.C1=cf(0, 0.5, 0) * euler(0.4-0.4*i,0,0) | |
1927 | end | |
1928 | spread=0 | |
1929 | range=500 | |
1930 | rangepower=50 | |
1931 | attack=false | |
1932 | end | |
1933 | ||
1934 | function RemoveDrones() | |
1935 | attack=true | |
1936 | for i=0,1,0.1 do | |
1937 | wait() | |
1938 | Neck.C0=necko*euler(-0.5*i,0,0) | |
1939 | RW.C0=cf(1.5, 0.5, 0) * euler(0.5+2.64*i,0,0) | |
1940 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1941 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
1942 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1943 | end | |
1944 | for _,v in pairs(modelzorz:children()) do | |
1945 | if v.Name=="Drone" then | |
1946 | print("FoundDrone") | |
1947 | for _,s in pairs(v:children()) do | |
1948 | if s.className=="Part" then | |
1949 | s.Anchored=true | |
1950 | coroutine.resume(coroutine.create(function(Part,Model) | |
1951 | for i=0,1,0.1 do | |
1952 | wait(0) | |
1953 | Part.Transparency=Part.Transparency+0.1 | |
1954 | end | |
1955 | wait() | |
1956 | Model.Parent=nil | |
1957 | end),s,v) | |
1958 | end | |
1959 | end | |
1960 | end | |
1961 | end | |
1962 | wait(1) | |
1963 | for i=0,1,0.1 do | |
1964 | wait() | |
1965 | Neck.C0=necko*euler(-0.5+0.5*i,0,0) | |
1966 | RW.C0=cf(1.5, 0.5, 0) * euler(3.14-3.14*i,0,0) | |
1967 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1968 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2+0.2*i) | |
1969 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1970 | end | |
1971 | attack=false | |
1972 | end | |
1973 | ||
1974 | function RemoveDrones2() | |
1975 | attack=true | |
1976 | for i=0,1,0.1 do | |
1977 | wait() | |
1978 | Neck.C0=necko*euler(-0.3-0.3*i,0,-0.3+0.3*i) | |
1979 | RW.C0=cf(1, 0.3, -0.8) * euler(1.57-0.4*i,0,-0.7) | |
1980 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0) | |
1981 | LW.C0=cf(-1.2-0.3*i, 0.5, -0.3+0.3*i) * euler(2.3+0.84*i,0,0.7-0.7*i) | |
1982 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
1983 | end | |
1984 | for _,v in pairs(modelzorz:children()) do | |
1985 | if v.Name=="Drone" then | |
1986 | print("FoundDrone") | |
1987 | for _,s in pairs(v:children()) do | |
1988 | if s.className=="Part" then | |
1989 | s.Anchored=true | |
1990 | coroutine.resume(coroutine.create(function(Part,Model) | |
1991 | for i=0,1,0.1 do | |
1992 | wait(0) | |
1993 | Part.Transparency=Part.Transparency+0.1 | |
1994 | end | |
1995 | wait() | |
1996 | Model.Parent=nil | |
1997 | end),s,v) | |
1998 | end | |
1999 | end | |
2000 | end | |
2001 | end | |
2002 | wait(1) | |
2003 | for i=0,1,0.1 do | |
2004 | wait() | |
2005 | Neck.C0=necko*euler(-0.6+0.3*i,0,-0.3*i) | |
2006 | RW.C0=cf(1, 0.3, -0.8) * euler(1.17+0.4*i,0,-0.7) | |
2007 | RW.C1=cf(0, 0.5, 0) * euler(0,-1.5,0) | |
2008 | LW.C0=cf(-1.5+0.3*i, 0.5, -0.3*i) * euler(3.14-0.84*i,0,0.7*i) | |
2009 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2010 | end | |
2011 | attack=false | |
2012 | end | |
2013 | ||
2014 | function RemoveGun() | |
2015 | attack=true | |
2016 | for i=0,1,0.1 do | |
2017 | wait() | |
2018 | RW.C0=cf(1.5-0.5*i, 0.5-0.2*i, -0.8*i) * euler(1.27*i,0,0.2-1.5*i) | |
2019 | RW.C1=cf(0, 0.5, 0) * euler(0,-1*i,0) | |
2020 | LW.C0=cf(-1.2-0.3*i, 0.5, -0.3+0.2*i) * euler(0.5+1.07*i,0,0.6-0.6*i) | |
2021 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57,0) | |
2022 | end | |
2023 | for _,s in pairs(gun:children()) do | |
2024 | if s.className=="Part" then | |
2025 | coroutine.resume(coroutine.create(function(Part,Model) | |
2026 | for i=0,1,0.1 do | |
2027 | wait(0) | |
2028 | Part.Transparency=Part.Transparency+0.1 | |
2029 | end | |
2030 | wait() | |
2031 | Model.Parent=nil | |
2032 | end),s,gun) | |
2033 | end | |
2034 | end | |
2035 | wait(0.7) | |
2036 | for i=0,1,0.1 do | |
2037 | wait() | |
2038 | RW.C0=cf(1+0.5*i, 0.3+0.2*i, -0.8+0.8*i) * euler(1.27-1.27*i,0,-1.3+1.3*i) | |
2039 | RW.C1=cf(0, 0.5, 0) * euler(0,-1+1*i,0) | |
2040 | LW.C0=cf(-1.5, 0.5, -0.1+0.1*i) * euler(1.57-1.57*i,0,0) | |
2041 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) | |
2042 | end | |
2043 | attack=false | |
2044 | end | |
2045 | ||
2046 | function RemoveSword() | |
2047 | attack=true | |
2048 | for i=0,1,0.1 do | |
2049 | wait() | |
2050 | RW.C0=cf(1.5-0.5*i, 0.5-0.2*i, -0.8*i) * euler(1.27*i,0,0.2-1.5*i) | |
2051 | RW.C1=cf(0, 0.5, 0) * euler(0,-1*i,0) | |
2052 | LW.C0=cf(-1.5, 0.5, -0.1*i) * euler(1.57*i,0,-0.4+0.4*i) | |
2053 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57*i,0) | |
2054 | end | |
2055 | for _,s in pairs(sword:children()) do | |
2056 | if s.className=="Part" then | |
2057 | coroutine.resume(coroutine.create(function(Part,Model) | |
2058 | for i=0,1,0.1 do | |
2059 | wait(0) | |
2060 | Part.Transparency=Part.Transparency+0.1 | |
2061 | end | |
2062 | wait() | |
2063 | Model.Parent=nil | |
2064 | end),s,sword) | |
2065 | end | |
2066 | end | |
2067 | wait(0.7) | |
2068 | for i=0,1,0.1 do | |
2069 | wait() | |
2070 | RW.C0=cf(1+0.5*i, 0.3+0.2*i, -0.8+0.8*i) * euler(1.27-1.27*i,0,-1.3+1.3*i) | |
2071 | RW.C1=cf(0, 0.5, 0) * euler(0,-1+1*i,0) | |
2072 | LW.C0=cf(-1.5, 0.5, -0.1+0.1*i) * euler(1.57-1.57*i,0,0) | |
2073 | LW.C1=cf(0, 0.5, 0) * euler(0,1.57-1.57*i,0) | |
2074 | end | |
2075 | attack=false | |
2076 | end | |
2077 | ||
2078 | function RemoveSniper() | |
2079 | attack=true | |
2080 | for i=0,1,0.1 do | |
2081 | wait() | |
2082 | Neck.C0=necko*euler(0.4*i,0,0) | |
2083 | snwld1.C0=euler(2.07+0.3*i,0,0)*cf(0,1,0) | |
2084 | RW.C0=cf(1, 0.3, -0.5-0.3*i) * euler(0.9+0.37*i,0,-0.3-1*i) | |
2085 | RW.C1=cf(0, 0.5, 0) * euler(0,1.3-1*i,0) | |
2086 | LW.C0=cf(-1.2, 0.5, -0.3) * euler(1.07,0,0.7-0.2*i) | |
2087 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2088 | end | |
2089 | for _,s in pairs(sniper:children()) do | |
2090 | if s.className=="Part" then | |
2091 | coroutine.resume(coroutine.create(function(Part,Model) | |
2092 | for i=0,1,0.1 do | |
2093 | wait(0) | |
2094 | Part.Transparency=Part.Transparency+0.1 | |
2095 | end | |
2096 | wait() | |
2097 | Model.Parent=nil | |
2098 | end),s,sniper) | |
2099 | end | |
2100 | end | |
2101 | wait(0.7) | |
2102 | for i=0,1,0.1 do | |
2103 | wait() | |
2104 | Neck.C0=necko*euler(0.4-0.4*i,0,0) | |
2105 | RW.C0=cf(1+0.5*i, 0.3, -0.8+0.8*i) * euler(1.27-1.27*i,0,-1.3+1.3*i) | |
2106 | RW.C1=cf(0, 0.5, 0) * euler(0,0.3-0.3*i,0) | |
2107 | LW.C0=cf(-1.2-0.3*i, 0.5, -0.3+0.3*i) * euler(1.07-1.07*i,0,0.5-0.5*i) | |
2108 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2109 | end | |
2110 | attack=false | |
2111 | end | |
2112 | ||
2113 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
2114 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
2115 | end | |
2116 | ||
2117 | function Lightning(p0,p1,tym,ofs,col,th,tra) | |
2118 | local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs} | |
2119 | for i=1,tym do | |
2120 | local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col) | |
2121 | li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
2122 | light1=Instance.new("PointLight") | |
2123 | light1.Brightness=.8 | |
2124 | light1.Color=Color3.new(.2,255,.2) | |
2125 | light1.Range=8 | |
2126 | light1.Parent=li | |
2127 | local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz | |
2128 | if tym == i then | |
2129 | local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2) | |
2130 | li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2) | |
2131 | else | |
2132 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2) | |
2133 | end | |
2134 | curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,.2) | |
2135 | end | |
2136 | end | |
2137 | ||
2138 | spread=0 | |
2139 | range=500 | |
2140 | rangepower=50 | |
2141 | function shoottrail(ShootPosition,baseprt,Damage,Knockback,Size) | |
2142 | coroutine.resume(coroutine.create(function() | |
2143 | local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-ShootPosition).magnitude/100 | |
2144 | local dir = CFrame.new((baseprt.Position+ShootPosition)/2,ShootPosition+spreadvector) | |
2145 | local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,modelzorz) | |
2146 | local rangepos = range | |
2147 | local function drawtrail(From,To) | |
2148 | local effectsmsh = Instance.new("CylinderMesh") | |
2149 | effectsmsh.Scale = Vector3.new(1,1,1) | |
2150 | effectsmsh.Name = "Mesh" | |
2151 | local effectsg = Instance.new("Part") | |
2152 | effectsg.formFactor = 3 | |
2153 | effectsg.CanCollide = false | |
2154 | effectsg.Name = "Eff" | |
2155 | effectsg.Locked = true | |
2156 | effectsg.Anchored = true | |
2157 | effectsg.Size = Vector3.new(0.2,0.2,0.2) | |
2158 | effectsg.Parent = modelzorz | |
2159 | effectsmsh.Parent = effectsg | |
2160 | effectsg.BrickColor = BrickColor.new("Bright yellow") | |
2161 | effectsg.Reflectance = 0.4 | |
2162 | local LP = From | |
2163 | local point1 = To | |
2164 | local mg = (LP - point1).magnitude | |
2165 | effectsmsh.Scale = Vector3.new(2,mg*5,2) | |
2166 | effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0) | |
2167 | coroutine.resume(coroutine.create(function() | |
2168 | for i = 0 , 1 , 0.1 do | |
2169 | wait() | |
2170 | effectsg.Transparency = 1*i | |
2171 | effectsmsh.Scale = Vector3.new(Size-Size*i,mg*5,Size-Size*i) | |
2172 | end | |
2173 | effectsg.Parent = nil | |
2174 | end)) | |
2175 | end | |
2176 | local newpos = baseprt.Position | |
2177 | local inc = rangepower | |
2178 | repeat | |
2179 | wait() wait() | |
2180 | rangepos = rangepos - 10 | |
2181 | dir = dir | |
2182 | if Mode~="Sniper" then | |
2183 | dir = dir * CFrame.Angles(math.rad(-1),0,0) | |
2184 | end | |
2185 | hit,pos = rayCast(newpos,dir.lookVector,inc,Character) | |
2186 | drawtrail(newpos,pos) | |
2187 | newpos = newpos + (dir.lookVector * inc) | |
2188 | if inc >= 20 then | |
2189 | inc = inc - 10 | |
2190 | end | |
2191 | if hit ~= nil then | |
2192 | rangepos = 0 | |
2193 | end | |
2194 | until rangepos <= 0 | |
2195 | if hit ~= nil then | |
2196 | if hit.Parent:FindFirstChild("Humanoid") ~= nil then | |
2197 | critical=false | |
2198 | if SnipAim==true then | |
2199 | if hit.Name=="Head" then | |
2200 | coroutine.resume(coroutine.create(function(HeadPart) | |
2201 | for i=0,0.5,0.1 do | |
2202 | wait() | |
2203 | HeadPart.Velocity=vt(0,60,0) | |
2204 | end | |
2205 | end),hit) | |
2206 | print("CRITICAL") | |
2207 | critical=true | |
2208 | p=it("Part") | |
2209 | p.Parent=workspace | |
2210 | p.CanCollide=false | |
2211 | p.Transparency=1 | |
2212 | p.CFrame=hit.CFrame | |
2213 | p.Anchored=true | |
2214 | local GUI = it("BillboardGui") | |
2215 | GUI.Adornee = p | |
2216 | GUI.Parent = p | |
2217 | GUI.Active = true | |
2218 | GUI.Enabled = true | |
2219 | GUI.Size = UDim2.new(1, 0, 1, 0) | |
2220 | GUI.StudsOffset = vt(0, 4, 0) | |
2221 | local Chat = it("TextLabel") | |
2222 | Chat.Parent = GUI | |
2223 | Chat.FontSize = "Size12" | |
2224 | Chat.Position = UDim2.new(0.599999964, 0, 0, 0) | |
2225 | Chat.Visible = true | |
2226 | Chat.Text = "Critical!" | |
2227 | coroutine.resume(coroutine.create(function(Part) | |
2228 | for i=0,4,0.1 do | |
2229 | wait() | |
2230 | Part.CFrame=Part.CFrame*cf(0,0.05,0) | |
2231 | end | |
2232 | Part.Parent=nil | |
2233 | end),p) | |
2234 | for i=0,7 do | |
2235 | Blood=it("Part") | |
2236 | Blood.Name="Blood" | |
2237 | Blood.TopSurface="Smooth" | |
2238 | Blood.BottomSurface="Smooth" | |
2239 | Blood.formFactor="Plate" | |
2240 | Blood.BrickColor=BrickColor:Red() | |
2241 | Blood.Size=vt(1,.4,1) | |
2242 | Blood.Velocity=vt(math.random(-4,4),math.random(5,25),math.random(-4,4)) | |
2243 | Blood.CFrame=hit.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
2244 | Blood.Parent=workspace | |
2245 | Blood.Velocity=vt(math.random(-20,20),math.random(20,50),math.random(-20,20)) | |
2246 | Blood.CanCollide=false | |
2247 | coroutine.resume(coroutine.create(function(blod) | |
2248 | wait(0.1) | |
2249 | blod.CanCollide=true | |
2250 | wait(5) | |
2251 | blod.Parent = nil | |
2252 | end),Blood) | |
2253 | end | |
2254 | end | |
2255 | hum = hit.Parent.Humanoid | |
2256 | tTorso=hit.Parent.Torso | |
2257 | end | |
2258 | if critical==true then | |
2259 | CRIT=true | |
2260 | Damagefunc1(hit,Damage*math.random(3,8),Knockback) | |
2261 | else | |
2262 | Damagefunc1(hit,Damage,Knockback) | |
2263 | end | |
2264 | attackdebounce=false | |
2265 | --ADmg(hum,hit) | |
2266 | elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then | |
2267 | if SnipAim==true then | |
2268 | if hit.Parent.className == "Hat" then | |
2269 | hatCF=hit.CFrame | |
2270 | coroutine.resume(coroutine.create(function(hat) | |
2271 | hat.Handle:BreakJoints() | |
2272 | hat.Handle.CFrame=hatCF | |
2273 | hat.Handle.CanCollide=true | |
2274 | hat.Handle.Velocity=vt(math.random(-10,10),40,math.random(-10,10)) | |
2275 | wait(3) | |
2276 | hatCF=hat.Handle.CFrame | |
2277 | hat.Parent=workspace | |
2278 | for i=0,4,0.2 do | |
2279 | wait() | |
2280 | hat.Handle.CFrame=hatCF | |
2281 | hat.Handle.Velocity=vt(math.random(-5,5),20,math.random(-5,5)) | |
2282 | end | |
2283 | end),hit.Parent) | |
2284 | --[[hit:BreakJoints() | |
2285 | hit.CFrame=CF | |
2286 | hit.Velocity = vt(math.random(-5,5),20,math.random(-5,5)) ]] | |
2287 | print("BREAKHAT") | |
2288 | end | |
2289 | end | |
2290 | hum = hit.Parent.Parent.Humanoid | |
2291 | tTorso=hit.Parent.Parent.Torso | |
2292 | Damagefunc1(hit.Parent.Parent.Torso,Damage,Knockback) | |
2293 | attackdebounce=false | |
2294 | --ADmg(hum,hit) | |
2295 | end | |
2296 | end | |
2297 | end)) | |
2298 | end | |
2299 | ||
2300 | function findNearestTorso(pos) | |
2301 | local list = game:service("Workspace"):children() | |
2302 | local torso = nil | |
2303 | local dist = 50 | |
2304 | local temp = nil | |
2305 | local human = nil | |
2306 | local temp2 = nil | |
2307 | for x = 1, #list do | |
2308 | temp2 = list[x] | |
2309 | if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "Fenrier") then | |
2310 | temp = temp2:findFirstChild("Torso") | |
2311 | human = temp2:findFirstChild("Humanoid") | |
2312 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
2313 | if (temp.Position - pos).magnitude < dist then | |
2314 | torso = temp | |
2315 | dist = (temp.Position - pos).magnitude | |
2316 | end | |
2317 | end | |
2318 | end | |
2319 | end | |
2320 | return torso | |
2321 | end | |
2322 | ||
2323 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3) | |
2324 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
2325 | prt.Anchored=true | |
2326 | prt.CFrame=cframe*cf(x2,y2,z2) | |
2327 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
2328 | coroutine.resume(coroutine.create(function() | |
2329 | for i=0,1,0.1 do | |
2330 | wait() | |
2331 | prt.CFrame=prt.CFrame | |
2332 | prt.Transparency=i | |
2333 | msh.Scale=msh.Scale+vt(x3,y3,z3) | |
2334 | end | |
2335 | prt.Parent=nil | |
2336 | end)) | |
2337 | end | |
2338 | ||
2339 | Damagefunc1=function(hit,Damage,Knockback) | |
2340 | if hit.Parent==nil then | |
2341 | return | |
2342 | end | |
2343 | CPlayer=Bin | |
2344 | h=hit.Parent:FindFirstChild("Humanoid") | |
2345 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
2346 | if attackdebounce == false then | |
2347 | attackdebounce = true | |
2348 | coroutine.resume(coroutine.create(function() | |
2349 | wait(0.2) | |
2350 | attackdebounce = false | |
2351 | end)) | |
2352 | Damage=Damage | |
2353 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
2354 | return | |
2355 | end]] | |
2356 | -- hs(hit,1.2) | |
2357 | c=Instance.new("ObjectValue") | |
2358 | c.Name="creator" | |
2359 | c.Value=game:service("Players").LocalPlayer | |
2360 | c.Parent=h | |
2361 | game:GetService("Debris"):AddItem(c,.5) | |
2362 | Damage=Damage+math.random(0,10) | |
2363 | -- h:TakeDamage(Damage) | |
2364 | blocked=false | |
2365 | block=hit.Parent:findFirstChild("Block") | |
2366 | if block~=nil then | |
2367 | print("herp") | |
2368 | if block.Value>0 then | |
2369 | blocked=true | |
2370 | block.Value=block.Value-1 | |
2371 | print(block.Value) | |
2372 | end | |
2373 | end | |
2374 | if blocked==false then | |
2375 | -- h:TakeDamage(Damage) | |
2376 | h.Health=h.Health-Damage | |
2377 | showDamage(hit.Parent,Damage,.5) | |
2378 | else | |
2379 | h:TakeDamage(1) | |
2380 | showDamage(hit.Parent,1,.5) | |
2381 | end | |
2382 | vp=Instance.new("BodyVelocity") | |
2383 | vp.P=500 | |
2384 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
2385 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
2386 | vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05 | |
2387 | if Knockback>0 then | |
2388 | vp.Parent=hit.Parent.Torso | |
2389 | end | |
2390 | game:GetService("Debris"):AddItem(vp,.25) | |
2391 | c=Instance.new("ObjectValue") | |
2392 | c.Name="creator" | |
2393 | c.Value=Player | |
2394 | c.Parent=h | |
2395 | game:GetService("Debris"):AddItem(c,.5) | |
2396 | CRIT=false | |
2397 | hitDeb=true | |
2398 | AttackPos=6 | |
2399 | end | |
2400 | end | |
2401 | end | |
2402 | ||
2403 | showDamage=function(Char,Dealt,du) | |
2404 | m=Instance.new("Model") | |
2405 | m.Name=tostring(Dealt) | |
2406 | h=Instance.new("Humanoid") | |
2407 | h.Health=0 | |
2408 | h.MaxHealth=0 | |
2409 | h.Parent=m | |
2410 | c=Instance.new("Part") | |
2411 | c.Transparency=0 | |
2412 | c.BrickColor=BrickColor:Red() | |
2413 | if CRIT==true then | |
2414 | c.BrickColor=BrickColor.new("Really red") | |
2415 | end | |
2416 | c.Name="Head" | |
2417 | c.TopSurface=0 | |
2418 | c.BottomSurface=0 | |
2419 | c.formFactor="Plate" | |
2420 | c.Size=Vector3.new(1,.4,1) | |
2421 | ms=Instance.new("CylinderMesh") | |
2422 | ms.Scale=Vector3.new(.8,.8,.8) | |
2423 | if CRIT==true then | |
2424 | ms.Scale=Vector3.new(1,1.25,1) | |
2425 | end | |
2426 | ms.Parent=c | |
2427 | c.Reflectance=0 | |
2428 | Instance.new("BodyGyro").Parent=c | |
2429 | c.Parent=m | |
2430 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
2431 | f=Instance.new("BodyPosition") | |
2432 | f.P=2000 | |
2433 | f.D=100 | |
2434 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
2435 | f.position=c.Position+Vector3.new(0,3,0) | |
2436 | f.Parent=c | |
2437 | game:GetService("Debris"):AddItem(m,.5+du) | |
2438 | c.CanCollide=false | |
2439 | m.Parent=workspace | |
2440 | c.CanCollide=false | |
2441 | end | |
2442 | ||
2443 | function ob1d(mouse) | |
2444 | if attack == true then return end | |
2445 | hold=true | |
2446 | if Mode=="Drones" and Aiming==true then | |
2447 | print("Attack drones") | |
2448 | for i=0,1,0.1 do | |
2449 | wait() | |
2450 | RW.C0=cf(1.5, 0.5, 0) * euler(0.5+1.07*i,0,0) | |
2451 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2452 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
2453 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2454 | end | |
2455 | Drone1debounce=false | |
2456 | Drone2debounce=false | |
2457 | Drone3debounce=false | |
2458 | for _,v in pairs(modelzorz:children()) do | |
2459 | if v.Name=="Drone" then | |
2460 | coroutine.resume(coroutine.create(function(Drone) | |
2461 | while hold==true do | |
2462 | so("http://roblox.com/asset/?id=10209257",Drone.DPart1,0.5,1.5) | |
2463 | shoottrail(MMouse.Hit.p,Drone.DPart1,5,0,1) | |
2464 | wait(math.random(0,2)+math.random()) | |
2465 | end | |
2466 | end),v) | |
2467 | end | |
2468 | end | |
2469 | while hold==true do | |
2470 | wait() | |
2471 | end | |
2472 | for i=0,1,0.1 do | |
2473 | wait() | |
2474 | RW.C0=cf(1.5, 0.5, 0) * euler(1.57-1.07*i,0,0) | |
2475 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2476 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
2477 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2478 | end | |
2479 | elseif Aiming==false then | |
2480 | for _,v in pairs(modelzorz:children()) do | |
2481 | if v.Name=="Drone" and v:findFirstChild("CanShoot")~=nil then | |
2482 | coroutine.resume(coroutine.create(function(Drone) | |
2483 | while hold==true do | |
2484 | if v.CanShoot.Value==true then | |
2485 | print("Shoot") | |
2486 | so("http://roblox.com/asset/?id=10209257",Drone.DPart1,0.5,1.5) | |
2487 | shoottrail(Drone.DPart6.Position,Drone.DPart1,5,0,1) | |
2488 | elseif v.CanShoot.Value==false then | |
2489 | print("NoShoot") | |
2490 | end | |
2491 | wait(math.random(0,2)+math.random()) | |
2492 | end | |
2493 | end),v) | |
2494 | end | |
2495 | end | |
2496 | end | |
2497 | if Mode=="Gun" then | |
2498 | print("Shoot") | |
2499 | Shoot() | |
2500 | end | |
2501 | if Mode=="Sword" then | |
2502 | slash1() | |
2503 | if hold==true then | |
2504 | slash2() | |
2505 | end | |
2506 | if hold==true then | |
2507 | slash3() | |
2508 | end | |
2509 | wait(0.5) | |
2510 | Bg.Parent=nil | |
2511 | Neck.C0=necko*euler(0,0,0) | |
2512 | swld1.C0=euler(0,-1.57,-1.57)*cf(0,1,0) | |
2513 | swld1.C1=euler(0,1.57,0) | |
2514 | RW.C0=cf(1.5, 0.5, 0) * euler(0,0,0.2) | |
2515 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2516 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.4) | |
2517 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2518 | end | |
2519 | if Mode=="Sniper" and SnipAim==true then | |
2520 | SniperShoot() | |
2521 | end | |
2522 | end | |
2523 | ||
2524 | function ob1u(mouse) | |
2525 | hold = false | |
2526 | end | |
2527 | ||
2528 | buttonhold = false | |
2529 | ||
2530 | eul=0 | |
2531 | function key(key) | |
2532 | if attack == true then return end | |
2533 | if Mode=="Drones" then | |
2534 | if key=="z" then | |
2535 | RemoveDrones() | |
2536 | Mode="Choose" | |
2537 | equipanim() | |
2538 | return | |
2539 | end | |
2540 | if key=="f" then | |
2541 | if Aiming==false then | |
2542 | attack=true | |
2543 | for i=0,1,0.1 do | |
2544 | wait() | |
2545 | RW.C0=cf(1.5, 0.5, 0) * euler(0.5+2.64*i,0,0) | |
2546 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2547 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
2548 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2549 | end | |
2550 | for i=0,1,0.1 do | |
2551 | wait() | |
2552 | RW.C0=cf(1.5, 0.5, 0) * euler(3.14-1.57*i,0,0) | |
2553 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2554 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
2555 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2556 | end | |
2557 | Aiming=true | |
2558 | coroutine.resume(coroutine.create(function() | |
2559 | while Aiming==true do | |
2560 | wait() | |
2561 | DroneTarget=MMouse.Hit.p | |
2562 | end | |
2563 | end)) | |
2564 | wait(0.5) | |
2565 | for i=0,1,0.1 do | |
2566 | wait() | |
2567 | RW.C0=cf(1.5, 0.5, 0) * euler(1.57-1.07*i,0,0) | |
2568 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2569 | LW.C0=cf(-1.5, 0.5, 0) * euler(0,0,-0.2) | |
2570 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2571 | end | |
2572 | attack=false | |
2573 | elseif Aiming==true then | |
2574 | attack=true | |
2575 | for i=0,1,0.1 do | |
2576 | wait() | |
2577 | RW.C0=cf(1.5-0.5*i, 0.5, -0.5*i) * euler(.5+1.07*i,0,-1*i) | |
2578 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2579 | LW.C0=cf(-1.5+0.5*i, 0.5, -0.5*i) * euler(1.57*i,0,-0.2+1.2*i) | |
2580 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2581 | end | |
2582 | Aiming=false | |
2583 | for _,v in pairs(modelzorz:children()) do | |
2584 | if v.Name=="Drone" then | |
2585 | Valuee=Instance.new("BoolValue") | |
2586 | Valuee.Parent=v | |
2587 | Valuee.Name="CanShoot" | |
2588 | print("Found Drone") | |
2589 | coroutine.resume(coroutine.create(function(DDrone,Val,Gyro) | |
2590 | --coroutine.resume(coroutine.create(function() | |
2591 | while Aiming==false do | |
2592 | wait() | |
2593 | local target = findNearestTorso(DDrone.DPart1.Position) | |
2594 | if target~=nil then | |
2595 | Val.Value=true | |
2596 | Gyro.cframe=cf(DDrone.DPart1.Position, target.Position) | |
2597 | else | |
2598 | Val.Value=false | |
2599 | Gyro.cframe=cf(DDrone.DPart1.Position, Torso.Position) | |
2600 | end | |
2601 | end | |
2602 | Val.Parent=nil | |
2603 | end),v,Valuee,v.DPart1.DroneGyro) | |
2604 | end | |
2605 | end | |
2606 | wait(0.5) | |
2607 | for i=0,1,0.1 do | |
2608 | wait() | |
2609 | RW.C0=cf(1+.5*i, 0.5, -0.5+0.5*i) * euler(1.57-1.07*i,0,-1+1*i) | |
2610 | RW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2611 | LW.C0=cf(-1-.5*i, 0.5, -0.5+0.5*i) * euler(1.57-1.57*i,0,1-1.2*i) | |
2612 | LW.C1=cf(0, 0.5, 0) * euler(0,0,0) | |
2613 | end | |
2614 | attack=false | |
2615 | end | |
2616 | end | |
2617 | end | |
2618 | if Mode=="Gun" then | |
2619 | if key=="x" then | |
2620 | RemoveGun() | |
2621 | Mode="Choose" | |
2622 | equipanim() | |
2623 | return | |
2624 | end | |
2625 | end | |
2626 | if Mode=="Sword" then | |
2627 | if key=="c" then | |
2628 | RemoveSword() | |
2629 | Mode="Choose" | |
2630 | equipanim() | |
2631 | return | |
2632 | end | |
2633 | if key=="f" then | |
2634 | BowShoot() | |
2635 | end | |
2636 | end | |
2637 | if Mode=="Sniper" then | |
2638 | if key=="v" then | |
2639 | if SnipAim==true then | |
2640 | SnipAim=false | |
2641 | UnAim() | |
2642 | end | |
2643 | RemoveSniper() | |
2644 | Mode="Choose" | |
2645 | equipanim() | |
2646 | return | |
2647 | end | |
2648 | if key=="f" then | |
2649 | if SnipAim==false then | |
2650 | SnipAim=true | |
2651 | Aim() | |
2652 | else | |
2653 | SnipAim=false | |
2654 | UnAim() | |
2655 | end | |
2656 | end | |
2657 | end | |
2658 | if Mode=="Choose" then | |
2659 | if key=="f" then | |
2660 | RemoveDrones2() | |
2661 | end | |
2662 | if key=="z" then | |
2663 | Drone1,Drone2,Drone3=Drones() | |
2664 | end | |
2665 | if key=="x" then | |
2666 | Gun() | |
2667 | end | |
2668 | if key=="c" then | |
2669 | Sword() | |
2670 | end | |
2671 | if key=="v" then | |
2672 | Sniper() | |
2673 | end | |
2674 | end | |
2675 | end | |
2676 | ||
2677 | function key2(key) | |
2678 | if key=="f" then | |
2679 | BowAim=false | |
2680 | end | |
2681 | end | |
2682 | ||
2683 | function s(mouse) | |
2684 | mouse.Button1Down:connect(function() ob1d(mouse) end) | |
2685 | mouse.Button1Up:connect(function() ob1u(mouse) end) | |
2686 | mouse.KeyDown:connect(key) | |
2687 | mouse.KeyUp:connect(key2) | |
2688 | unsheathed = true | |
2689 | player = Player | |
2690 | ch = Character | |
2691 | MMouse = mouse | |
2692 | RSH = ch.Torso["Right Shoulder"] | |
2693 | LSH = ch.Torso["Left Shoulder"] | |
2694 | -- | |
2695 | RSH.Parent = nil | |
2696 | LSH.Parent = nil | |
2697 | -- | |
2698 | RW.Part0 = ch.Torso | |
2699 | RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
2700 | RW.C1 = CFrame.new(0, 0.5, 0) | |
2701 | RW.Part1 = ch["Right Arm"] | |
2702 | RW.Parent = ch.Torso | |
2703 | --_G.R = RW | |
2704 | -- | |
2705 | LW.Part0 = ch.Torso | |
2706 | LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
2707 | LW.C1 = CFrame.new(0, 0.5, 0) | |
2708 | LW.Part1 = ch["Left Arm"] | |
2709 | LW.Parent = ch.Torso | |
2710 | --_G.L = LW | |
2711 | -- | |
2712 | equipanim() | |
2713 | end | |
2714 | ||
2715 | function ds(mouse) | |
2716 | hideanim() | |
2717 | wait(0) | |
2718 | RW.Parent = nil | |
2719 | LW.Parent = nil | |
2720 | RSH.Parent = player.Character.Torso | |
2721 | LSH.Parent = player.Character.Torso | |
2722 | end | |
2723 | ||
2724 | Bin.Selected:connect(s) | |
2725 | Bin.Deselected:connect(ds) | |
2726 | print("Fenrier's Techno Gauntlet loaded (edited).") |