SHOW:
|
|
- or go back to the newest paste.
1 | -- This script has been converted to FE by iPxter | |
2 | - | player = game.Players.LocalPlayer |
2 | + | |
3 | ||
4 | - | mouse = player:GetMouse() |
4 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
5 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
6 | do | |
7 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") | |
8 | script.Parent = Player.Character | |
9 | ||
10 | --RemoteEvent for communicating | |
11 | local Event = Instance.new("RemoteEvent") | |
12 | Event.Name = "UserInput_Event" | |
13 | ||
14 | --Fake event to make stuff like Mouse.KeyDown work | |
15 | local function fakeEvent() | |
16 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
17 | t.connect = t.Connect | |
18 | return t | |
19 | end | |
20 | ||
21 | --Creating fake input objects with fake variables | |
22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
26 | end} | |
27 | --Merged 2 functions into one by checking amount of arguments | |
28 | CAS.UnbindAction = CAS.BindAction | |
29 | ||
30 | --This function will trigger the events that have been :Connect()'ed | |
31 | local function te(self,ev,...) | |
32 | local t = m[ev] | |
33 | if t and t._fakeEvent and t.Function then | |
34 | t.Function(...) | |
35 | end | |
36 | end | |
37 | m.TrigEvent = te | |
38 | UIS.TrigEvent = te | |
39 | ||
40 | Event.OnServerEvent:Connect(function(plr,io) | |
41 | if plr~=Player then return end | |
42 | if io.isMouse then | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | else | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | for _,t in pairs(CAS.Actions) do | |
51 | for _,k in pairs(t.Keys) do | |
52 | if k==io.KeyCode then | |
53 | t.Function(t.Name,io.UserInputState,io) | |
54 | end | |
55 | end | |
56 | end | |
57 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
58 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
59 | end | |
60 | end | |
61 | Event.Parent = NLS([==[ | |
62 | local Player = game:GetService("Players").LocalPlayer | |
63 | local Event = script:WaitForChild("UserInput_Event") | |
64 | ||
65 | local UIS = game:GetService("UserInputService") | |
66 | local input = function(io,a) | |
67 | if a then return end | |
68 | --Since InputObject is a client-side instance, we create and pass table instead | |
69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
70 | end | |
71 | UIS.InputBegan:Connect(input) | |
72 | UIS.InputEnded:Connect(input) | |
73 | ||
74 | local Mouse = Player:GetMouse() | |
75 | local h,t | |
76 | --Give the server mouse data 30 times every second, but only if the values changed | |
77 | --If player is not moving their mouse, client won't fire events | |
78 | while wait(1/30) do | |
79 | if h~=Mouse.Hit or t~=Mouse.Target then | |
80 | h,t=Mouse.Hit,Mouse.Target | |
81 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
82 | end | |
83 | end]==],Player.Character) | |
84 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
85 | end | |
86 | ||
87 | wait() | |
88 | player = owner | |
89 | char = player.Character | |
90 | ||
91 | print("WHAT UP") | |
92 | ||
93 | armed = false | |
94 | canfire = false | |
95 | enabled = true | |
96 | equipped = false | |
97 | ||
98 | mouse.Icon = "rbxassetid://311756275" | |
99 | ||
100 | rightshoulder = char.Torso["Right Shoulder"]:Clone() | |
101 | leftshoulder = char.Torso["Left Shoulder"]:Clone() | |
102 | torso = char.HumanoidRootPart.RootJoint:Clone() | |
103 | ||
104 | hed = Instance.new("Weld", char.Torso) | |
105 | hed.Part0 = char.Torso | |
106 | hed.Part1 = char.Head | |
107 | hed.C0 = CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 0, 0) | |
108 | ||
109 | -- the bow stuff | |
110 | ||
111 | bow = Instance.new("Model") | |
112 | bow.Parent = game.Workspace | |
113 | bow.Name = "bow" | |
114 | ||
115 | handle = Instance.new("Part") | |
116 | handle.CFrame = CFrame.new(Vector3.new(-48.1999893, 2.79998732, -58.2000122)) * CFrame.Angles(-3.1415927410126, 0, -0) | |
117 | handle.Size = Vector3.new(0.200000003, 1.20000005, 0.200000003) | |
118 | handle.BrickColor = BrickColor.new("Pine Cone") | |
119 | handle.Friction = 0.30000001192093 | |
120 | handle.Shape = Enum.PartType.Block | |
121 | handle.Name = "Handle" | |
122 | handle.Parent = bow | |
123 | handle.CanCollide = false | |
124 | ||
125 | leg2 = Instance.new("Part") | |
126 | leg2.CFrame = CFrame.new(Vector3.new(-48.1999931, 1.25002313, -58.2000008)) * CFrame.Angles(-3.1415927410126, 0, -0) | |
127 | leg2.Size = Vector3.new(0.200000003, 1.90000021, 0.200000003) | |
128 | leg2.BrickColor = BrickColor.new("Pine Cone") | |
129 | leg2.Friction = 0.30000001192093 | |
130 | leg2.Shape = Enum.PartType.Block | |
131 | leg2.Name = "Leg2" | |
132 | leg2.Parent = bow | |
133 | leg2.CanCollide = false | |
134 | ||
135 | cap2 = Instance.new("Part") | |
136 | cap2.CFrame = CFrame.new(Vector3.new(-48.2000046, 0.300019979, -58.2000008)) * CFrame.Angles(1.5707963705063, 0, -0) | |
137 | cap2.TopSurface = Enum.SurfaceType.Smooth | |
138 | cap2.BottomSurface = Enum.SurfaceType.Smooth | |
139 | cap2.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
140 | cap2.BrickColor = BrickColor.new("Pine Cone") | |
141 | cap2.Friction = 0.30000001192093 | |
142 | cap2.Shape = Enum.PartType.Cylinder | |
143 | cap2.Name = "Cap2" | |
144 | cap2.Parent = bow | |
145 | cap2.CanCollide = false | |
146 | ||
147 | joint2 = Instance.new("Part") | |
148 | joint2.CFrame = CFrame.new(Vector3.new(-48.1999893, 2.19999003, -58.2000237)) * CFrame.Angles(1.5707963705063, 0, -0) | |
149 | joint2.TopSurface = Enum.SurfaceType.Smooth | |
150 | joint2.BottomSurface = Enum.SurfaceType.Smooth | |
151 | joint2.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
152 | joint2.BrickColor = BrickColor.new("Pine Cone") | |
153 | joint2.Friction = 0.30000001192093 | |
154 | joint2.Shape = Enum.PartType.Cylinder | |
155 | joint2.Name = "Joint2" | |
156 | joint2.Parent = bow | |
157 | joint2.CanCollide = false | |
158 | ||
159 | joint1 = Instance.new("Part") | |
160 | joint1.CFrame = CFrame.new(Vector3.new(-48.2000008, 3.39998126, -58.2000275)) * CFrame.Angles(1.5707963705063, 0, -0) | |
161 | joint1.TopSurface = Enum.SurfaceType.Smooth | |
162 | joint1.BottomSurface = Enum.SurfaceType.Smooth | |
163 | joint1.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
164 | joint1.BrickColor = BrickColor.new("Pine Cone") | |
165 | joint1.Friction = 0.30000001192093 | |
166 | joint1.Shape = Enum.PartType.Cylinder | |
167 | joint1.Name = "Joint1" | |
168 | joint1.Parent = bow | |
169 | joint1.CanCollide = false | |
170 | ||
171 | leg1 = Instance.new("Part") | |
172 | leg1.CFrame = CFrame.new(Vector3.new(-48.1999931, 4.35000753, -58.2000122)) * CFrame.Angles(-3.1415927410126, 0, -0) | |
173 | leg1.Size = Vector3.new(0.200000003, 1.90000021, 0.200000003) | |
174 | leg1.BrickColor = BrickColor.new("Pine Cone") | |
175 | leg1.Friction = 0.30000001192093 | |
176 | leg1.Shape = Enum.PartType.Block | |
177 | leg1.Name = "Leg1" | |
178 | leg1.Parent = bow | |
179 | leg1.CanCollide = false | |
180 | ||
181 | cap1 = Instance.new("Part") | |
182 | cap1.CFrame = CFrame.new(Vector3.new(-48.2000046, 5.29999113, -58.2000122)) * CFrame.Angles(1.5707963705063, 0, -0) | |
183 | cap1.TopSurface = Enum.SurfaceType.Smooth | |
184 | cap1.BottomSurface = Enum.SurfaceType.Smooth | |
185 | cap1.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
186 | cap1.BrickColor = BrickColor.new("Pine Cone") | |
187 | cap1.Friction = 0.30000001192093 | |
188 | cap1.Shape = Enum.PartType.Cylinder | |
189 | cap1.Name = "Cap1" | |
190 | cap1.Parent = bow | |
191 | cap1.CanCollide = false | |
192 | ||
193 | stringpart = Instance.new("Part") | |
194 | stringpart.CFrame = CFrame.new(Vector3.new(-48.2000046, 5.29999113, -58.2000122)) * CFrame.Angles(1.5707963705063, 0, -0) | |
195 | stringpart.TopSurface = Enum.SurfaceType.Smooth | |
196 | stringpart.BottomSurface = Enum.SurfaceType.Smooth | |
197 | stringpart.Size = Vector3.new(0.1, 0.1, 0.1) | |
198 | stringpart.Transparency = 1 | |
199 | stringpart.BrickColor = BrickColor.new("Mid grey") | |
200 | stringpart.Friction = 0.30000001192093 | |
201 | stringpart.Shape = Enum.PartType.Cylinder | |
202 | stringpart.Name = "StringAttachment" | |
203 | stringpart.Parent = bow | |
204 | stringpart.CanCollide = false | |
205 | ||
206 | arrow = Instance.new("Model") | |
207 | arrow.Parent = game.Workspace | |
208 | arrow.Name = "arrow" | |
209 | ||
210 | feather1 = Instance.new("WedgePart") | |
211 | feather1.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.90000844, -56.1500168)) * CFrame.Angles(-0, 0, -0) | |
212 | feather1.TopSurface = Enum.SurfaceType.Smooth | |
213 | feather1.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
214 | feather1.BrickColor = BrickColor.new("Crimson") | |
215 | feather1.Friction = 0.30000001192093 | |
216 | feather1.Name = "Feather" | |
217 | feather1.Parent = arrow | |
218 | feather1.CanCollide = false | |
219 | feather1.Transparency = 1 | |
220 | ||
221 | feather2 = Instance.new("WedgePart") | |
222 | feather2.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.50003171, -56.1500168)) * CFrame.Angles(-0, 0, -3.1415927410126) | |
223 | feather2.TopSurface = Enum.SurfaceType.Smooth | |
224 | feather2.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
225 | feather2.BrickColor = BrickColor.new("Crimson") | |
226 | feather2.Friction = 0.30000001192093 | |
227 | feather2.Name = "Feather" | |
228 | feather2.Parent = arrow | |
229 | feather2.CanCollide = false | |
230 | feather2.Transparency = 1 | |
231 | ||
232 | arrowhead = Instance.new("WedgePart") | |
233 | arrowhead.CFrame = CFrame.new(Vector3.new(-48.2999992, 2.80002427, -59.4500008)) * CFrame.Angles(-0, 0, -0) | |
234 | arrowhead.TopSurface = Enum.SurfaceType.Smooth | |
235 | arrowhead.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
236 | arrowhead.Friction = 0.30000001192093 | |
237 | arrowhead.Name = "Arrowhead" | |
238 | arrowhead.Parent = arrow | |
239 | arrowhead.CanCollide = false | |
240 | arrowhead.Transparency = 1 | |
241 | ||
242 | arrowcap = Instance.new("Part") | |
243 | arrowcap.CFrame = CFrame.new(Vector3.new(-48.2000046, 5.29999113, -58.2000122)) * CFrame.Angles(1.5707963705063, 0, -0) | |
244 | arrowcap.TopSurface = Enum.SurfaceType.Smooth | |
245 | arrowcap.BottomSurface = Enum.SurfaceType.Smooth | |
246 | arrowcap.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003) | |
247 | arrowcap.BrickColor = BrickColor.new("Dirt brown") | |
248 | arrowcap.Friction = 0.30000001192093 | |
249 | arrowcap.Shape = Enum.PartType.Cylinder | |
250 | arrowcap.Name = "ArrowCap" | |
251 | arrowcap.Parent = arrow | |
252 | arrowcap.CanCollide = false | |
253 | arrowcap.Transparency = 1 | |
254 | ||
255 | arrowbody = Instance.new("Part") | |
256 | arrowbody.CFrame = CFrame.new(Vector3.new(0, 3, 0)) * CFrame.Angles(-0, 0, -0) | |
257 | arrowbody.Size = Vector3.new(0.200000003, 0.200000003, 3.60000014) | |
258 | arrowbody.BrickColor = BrickColor.new("Dirt brown") | |
259 | arrowbody.Friction = 0.30000001192093 | |
260 | arrowbody.Shape = Enum.PartType.Block | |
261 | arrowbody.Name = "ArrowBody" | |
262 | arrowbody.Parent = arrow | |
263 | arrowbody.CanCollide = false | |
264 | arrowbody.Transparency = 1 | |
265 | ||
266 | feather3 = Instance.new("WedgePart") | |
267 | feather3.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.50004983, -55.9500198)) * CFrame.Angles(-0, 0, -3.1415927410126) | |
268 | feather3.TopSurface = Enum.SurfaceType.Smooth | |
269 | feather3.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
270 | feather3.BrickColor = BrickColor.new("Crimson") | |
271 | feather3.Friction = 0.30000001192093 | |
272 | feather3.Name = "Feather" | |
273 | feather3.Parent = arrow | |
274 | feather3.CanCollide = false | |
275 | feather3.Transparency = 1 | |
276 | ||
277 | feather4 = Instance.new("WedgePart") | |
278 | feather4.CFrame = CFrame.new(Vector3.new(-48.3000031, 2.90003037, -55.9500198)) * CFrame.Angles(-0, 0, -0) | |
279 | feather4.TopSurface = Enum.SurfaceType.Smooth | |
280 | feather4.Size = Vector3.new(0.200000003, 0.200000003, 0.299999952) | |
281 | feather4.BrickColor = BrickColor.new("Crimson") | |
282 | feather4.Friction = 0.30000001192093 | |
283 | feather4.Name = "Feather" | |
284 | feather4.Parent = arrow | |
285 | feather4.CanCollide = false | |
286 | feather4.Transparency = 1 | |
287 | ||
288 | -- the welds | |
289 | ||
290 | whandle = Instance.new("Weld", char["Left Arm"]) | |
291 | whandle.Part0 = char.Torso | |
292 | whandle.Part1 = handle | |
293 | whandle.C0 = CFrame.new(0, 0, 0.6) * CFrame.Angles(0, 0, math.rad(45)) | |
294 | ||
295 | wstringpart = Instance.new("Weld", handle) | |
296 | wstringpart.Part0 = handle | |
297 | wstringpart.Part1 = stringpart | |
298 | wstringpart.C0 = CFrame.new(0, -0.3, -0.3) * CFrame.new(0, 0, 0) | |
299 | ||
300 | wjoint1 = Instance.new("Weld", handle) | |
301 | wjoint1.Part0 = handle | |
302 | wjoint1.Part1 = joint1 | |
303 | wjoint1.C0 = CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0) | |
304 | ||
305 | wjoint2 = Instance.new("Weld", handle) | |
306 | wjoint2.Part0 = handle | |
307 | wjoint2.Part1 = joint2 | |
308 | wjoint2.C0 = CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0) | |
309 | ||
310 | wleg1 = Instance.new("Weld", joint1) | |
311 | wleg1.Part0 = joint1 | |
312 | wleg1.Part1 = leg1 | |
313 | wleg1.C0 = CFrame.new(0, 0.95, 0) * CFrame.Angles(0, 0, 0) | |
314 | ||
315 | wleg2 = Instance.new("Weld", joint2) | |
316 | wleg2.Part0 = joint2 | |
317 | wleg2.Part1 = leg2 | |
318 | wleg2.C0 = CFrame.new(0, -0.95, 0) * CFrame.Angles(0, 0, 0) | |
319 | ||
320 | wcap1 = Instance.new("Weld", leg1) | |
321 | wcap1.Part0 = leg1 | |
322 | wcap1.Part1 = cap1 | |
323 | wcap1.C0 = CFrame.new(0, 0.95, 0) * CFrame.Angles(0, 0, 0) | |
324 | ||
325 | wcap2 = Instance.new("Weld", leg2) | |
326 | wcap2.Part0 = leg2 | |
327 | wcap2.Part1 = cap2 | |
328 | wcap2.C0 = CFrame.new(0, -0.95, 0) * CFrame.Angles(0, 0, 0) | |
329 | ||
330 | cap1att = Instance.new("Attachment", cap1) | |
331 | cap1att.Position = Vector3.new(0, 0, -0.05) | |
332 | cap2att = Instance.new("Attachment", cap2) | |
333 | cap2att.Position = Vector3.new(0, 0, -0.05) | |
334 | stringatt = Instance.new("Attachment", stringpart) | |
335 | stringp1 = Instance.new("RodConstraint", stringpart) | |
336 | stringp1.Color = BrickColor.new("Mid grey") | |
337 | stringp1.Visible = true | |
338 | stringp1.Attachment0 = stringatt | |
339 | stringp1.Attachment1 = cap1att | |
340 | stringp2 = Instance.new("RodConstraint", stringpart) | |
341 | stringp2.Color = BrickColor.new("Mid grey") | |
342 | stringp2.Visible = true | |
343 | stringp2.Attachment0 = stringatt | |
344 | stringp2.Attachment1 = cap2att | |
345 | ||
346 | warrowhead1 = Instance.new("Weld", arrowbody) | |
347 | warrowhead1.Part0 = arrowbody | |
348 | warrowhead1.Part1 = arrowhead | |
349 | warrowhead1.C0 = CFrame.new(0, 0, -1.95) | |
350 | ||
351 | wfeather1 = Instance.new("Weld", arrowbody) | |
352 | wfeather1.Part0 = arrowbody | |
353 | wfeather1.Part1 = feather1 | |
354 | wfeather1.C0 = CFrame.new(0, 0.2, 1.45) | |
355 | ||
356 | wfeather2 = Instance.new("Weld", arrowbody) | |
357 | wfeather2.Part0 = arrowbody | |
358 | wfeather2.Part1 = feather2 | |
359 | wfeather2.C0 = CFrame.new(0, 0.2, 1.4) | |
360 | ||
361 | wfeather3 = Instance.new("Weld", arrowbody) | |
362 | wfeather3.Part0 = arrowbody | |
363 | wfeather3.Part1 = feather3 | |
364 | wfeather3.C0 = CFrame.new(0, -0.2, 1.45) * CFrame.Angles(0, 0, 3.15) | |
365 | ||
366 | wfeather4 = Instance.new("Weld", arrowbody) | |
367 | wfeather4.Part0 = arrowbody | |
368 | wfeather4.Part1 = feather4 | |
369 | wfeather4.C0 = CFrame.new(0, -0.2, 1.4) * CFrame.Angles(0, 0, 3.15) | |
370 | ||
371 | warrow = Instance.new("Weld", char.Torso) | |
372 | warrow.Part0 = char.Torso | |
373 | warrow.Part1 = arrowbody | |
374 | warrow.C0 = CFrame.new(0, 0, 0.5) * CFrame.Angles(-1.575, 0, 1.575) | |
375 | ||
376 | warrowcap = Instance.new("Weld", arrowbody) | |
377 | warrowcap.Part0 = arrowbody | |
378 | warrowcap.Part1 = arrowcap | |
379 | warrowcap.C0 = CFrame.new(0, 0, 1.8) | |
380 | ||
381 | -- sounds | |
382 | ||
383 | pullbacksound = Instance.new("Sound", handle) | |
384 | pullbacksound.SoundId = "rbxassetid://609348868" | |
385 | ||
386 | firesound = Instance.new("Sound", handle) | |
387 | firesound.SoundId = "rbxassetid://609348009" | |
388 | firesound.PlaybackSpeed = 1.05 | |
389 | ||
390 | function velocity(v) | |
391 | print("killvel") | |
392 | vel = coroutine.wrap(function() | |
393 | wait(0.05) | |
394 | v:Remove() | |
395 | end) | |
396 | vel() | |
397 | end | |
398 | ||
399 | function killz(playa,hitz,kneef) | |
400 | local heyy = hitz | |
401 | if hitz == "Right Arm" then | |
402 | local Limb = playa:FindFirstChild("Right Arm") | |
403 | local ters = playa:FindFirstChild('Torso') | |
404 | if Limb and ters then | |
405 | if ters:FindFirstChild('Right Shoulder') then ters["Right Shoulder"]:Destroy() end | |
406 | for i,v in pairs(Limb:GetChildren()) do | |
407 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
408 | v:Destroy() | |
409 | end | |
410 | end | |
411 | Limb.CFrame = ters.CFrame * CFrame.new(1.5, 0, 0) | |
412 | local Joint = Instance.new("Glue") | |
413 | Joint.Name = "RightShoulder" | |
414 | Joint.Part0 = ters | |
415 | Joint.Part1 = Limb | |
416 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
417 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
418 | Joint.Parent = ters | |
419 | ||
420 | local B = Instance.new("Part") | |
421 | B.TopSurface = 0 | |
422 | B.BottomSurface = 0 | |
423 | B.formFactor = "Symmetric" | |
424 | B.Size = Vector3.new(1, 1, 1) | |
425 | B.Transparency = 1 | |
426 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
427 | B.Parent = playa | |
428 | local W = Instance.new("Weld") | |
429 | W.Part0 = Limb | |
430 | W.Part1 = B | |
431 | W.C0 = CFrame.new(0, -0.5, 0) | |
432 | W.Parent = Limb | |
433 | local coru = coroutine.wrap(function() | |
434 | local uno = Instance.new('Part',workspace) | |
435 | local dos = Instance.new('Part',workspace) | |
436 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
437 | dos.CFrame = kneef.CFrame | |
438 | local weld = Instance.new('Weld',kneef) | |
439 | weld.Part0 = playa:FindFirstChild(hitz) | |
440 | weld.Part1 = kneef | |
441 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
442 | uno:Destroy() | |
443 | dos:Destroy() | |
444 | end) | |
445 | coru() | |
446 | end | |
447 | elseif hitz == "Left Arm" then | |
448 | local Limb = playa:FindFirstChild("Left Arm") | |
449 | local ters = playa:FindFirstChild('Torso') | |
450 | if Limb and ters then | |
451 | if ters:FindFirstChild('Left Shoulder') then ters["Left Shoulder"]:Destroy() end | |
452 | for i,v in pairs(Limb:GetChildren()) do | |
453 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
454 | v:Destroy() | |
455 | end | |
456 | end | |
457 | Limb.CFrame = ters.CFrame * CFrame.new(-1.5, 0, 0) | |
458 | local Joint = Instance.new("Glue") | |
459 | Joint.Name = "LeftShoulder" | |
460 | Joint.Part0 = ters | |
461 | Joint.Part1 = Limb | |
462 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
463 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
464 | Joint.Parent = ters | |
465 | ||
466 | local B = Instance.new("Part") | |
467 | B.TopSurface = 0 | |
468 | B.BottomSurface = 0 | |
469 | B.formFactor = "Symmetric" | |
470 | B.Size = Vector3.new(1, 1, 1) | |
471 | B.Transparency = 1 | |
472 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
473 | B.Parent = playa | |
474 | local W = Instance.new("Weld") | |
475 | W.Part0 = ters | |
476 | W.Part1 = B | |
477 | W.C0 = CFrame.new(0, -0.5, 0) | |
478 | W.Parent = Limb | |
479 | local coru = coroutine.wrap(function() | |
480 | local uno = Instance.new('Part',workspace) | |
481 | local dos = Instance.new('Part',workspace) | |
482 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
483 | dos.CFrame = kneef.CFrame | |
484 | local weld = Instance.new('Weld',kneef) | |
485 | weld.Part0 = playa:FindFirstChild(hitz) | |
486 | weld.Part1 = kneef | |
487 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
488 | uno:Destroy() | |
489 | dos:Destroy() | |
490 | end) | |
491 | coru() | |
492 | end | |
493 | elseif hitz == "Right Leg" then | |
494 | local Limb = playa:FindFirstChild("Right Leg") | |
495 | local ters = playa:FindFirstChild('Torso') | |
496 | if Limb and ters then | |
497 | if ters:FindFirstChild('Right Hip') then ters["Right Hip"]:Destroy() end | |
498 | for i,v in pairs(Limb:GetChildren()) do | |
499 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
500 | v:Destroy() | |
501 | end | |
502 | end | |
503 | Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0) | |
504 | local Joint = Instance.new("Glue") | |
505 | Joint.Name = "Right Hip" | |
506 | Joint.Part0 = ters | |
507 | Joint.Part1 = Limb | |
508 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
509 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
510 | Joint.Parent = ters | |
511 | local B = Instance.new("Part") | |
512 | B.TopSurface = 0 | |
513 | B.BottomSurface = 0 | |
514 | B.formFactor = "Symmetric" | |
515 | B.Size = Vector3.new(1, 1, 1) | |
516 | B.Transparency = 1 | |
517 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
518 | B.Parent = playa | |
519 | local W = Instance.new("Weld") | |
520 | W.Part0 = Limb | |
521 | W.Part1 = B | |
522 | W.C0 = CFrame.new(0, -0.5, 0) | |
523 | W.Parent = Limb | |
524 | local coru = coroutine.wrap(function() | |
525 | local uno = Instance.new('Part',workspace) | |
526 | local dos = Instance.new('Part',workspace) | |
527 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
528 | dos.CFrame = kneef.CFrame | |
529 | local weld = Instance.new('Weld',kneef) | |
530 | weld.Part0 = playa:FindFirstChild(hitz) | |
531 | weld.Part1 = kneef | |
532 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
533 | uno:Destroy() | |
534 | dos:Destroy() | |
535 | if playa:FindFirstChild('HumanoidRootPart') then | |
536 | if playa.HumanoidRootPart:FindFirstChild('RootJoint') then | |
537 | playa.HumanoidRootPart:FindFirstChild('RootJoint'):Destroy() | |
538 | wait() | |
539 | end | |
540 | while playa.HumanoidRootPart:FindFirstChild('RootJoint') do | |
541 | wait() | |
542 | end | |
543 | playa:FindFirstChild('HumanoidRootPart'):Destroy() | |
544 | end | |
545 | end) | |
546 | coru() | |
547 | end | |
548 | elseif hitz == "Left Leg" then | |
549 | local Limb = playa:FindFirstChild("Left Leg") | |
550 | local ters = playa:FindFirstChild('Torso') | |
551 | if Limb and ters then | |
552 | if ters:FindFirstChild('Left Hip') then ters["Left Hip"]:Destroy() end | |
553 | for i,v in pairs(Limb:GetChildren()) do | |
554 | if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then | |
555 | v:Destroy() | |
556 | end | |
557 | end | |
558 | Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0) | |
559 | Limb.CFrame = ters.CFrame * CFrame.new(-0.5, -2, 0) | |
560 | local Joint = Instance.new("Glue") | |
561 | Joint.Name = "LeftHip" | |
562 | Joint.Part0 = ters | |
563 | Joint.Part1 = Limb | |
564 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
565 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
566 | Joint.Parent = ters | |
567 | ||
568 | local B = Instance.new("Part") | |
569 | B.TopSurface = 0 | |
570 | B.BottomSurface = 0 | |
571 | B.formFactor = "Symmetric" | |
572 | B.Size = Vector3.new(1, 1, 1) | |
573 | B.Transparency = 1 | |
574 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
575 | B.Parent = playa | |
576 | local W = Instance.new("Weld") | |
577 | W.Part0 = Limb | |
578 | W.Part1 = B | |
579 | W.C0 = CFrame.new(0, -0.5, 0) | |
580 | W.Parent = Limb | |
581 | Limb.CanCollide = false | |
582 | local coru = coroutine.wrap(function() | |
583 | local uno = Instance.new('Part',workspace) | |
584 | local dos = Instance.new('Part',workspace) | |
585 | uno.CFrame = playa:FindFirstChild(hitz).CFrame | |
586 | dos.CFrame = kneef.CFrame | |
587 | local weld = Instance.new('Weld',kneef) | |
588 | weld.Part0 = playa:FindFirstChild(hitz) | |
589 | weld.Part1 = kneef | |
590 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
591 | uno:Destroy() | |
592 | dos:Destroy() | |
593 | if playa:FindFirstChild('HumanoidRootPart') then | |
594 | if playa.HumanoidRootPart:FindFirstChild('RootJoint') then | |
595 | playa.HumanoidRootPart:FindFirstChild('RootJoint'):Destroy() | |
596 | end | |
597 | while playa.HumanoidRootPart:FindFirstChild('RootJoint') do | |
598 | wait() | |
599 | end | |
600 | playa:FindFirstChild('HumanoidRootPart'):Destroy() | |
601 | end | |
602 | end) | |
603 | coru() | |
604 | end | |
605 | else | |
606 | local playa2 = playa | |
607 | playa.Archivable = true | |
608 | local playa = playa:Clone() | |
609 | playa.Archivable = false | |
610 | playa2:Destroy() | |
611 | playa.Parent = workspace | |
612 | local Gibs = game.Workspace | |
613 | local Torso = playa.Torso | |
614 | local Head = playa:FindFirstChild("Head") | |
615 | local function Scan(ch) | |
616 | local e | |
617 | for e = 1,#ch do | |
618 | Scan(ch[e]:GetChildren()) | |
619 | if (ch[e].ClassName == "Weld" and ch[e].Part1.Name ~= 'Projectile') or ch[e].ClassName == "Motor6D" then | |
620 | ch[e]:remove() | |
621 | end | |
622 | end | |
623 | end | |
624 | Scan(playa:GetChildren()) | |
625 | if playa:FindFirstChild('HumanoidRootPart') then | |
626 | playa:FindFirstChild('HumanoidRootPart'):Destroy() | |
627 | end | |
628 | local hum2 = playa:FindFirstChildOfClass("Humanoid") | |
629 | ||
630 | ||
631 | if hum2 ~= nil then | |
632 | hum2.Name = "Humanoid2" | |
633 | hum2.PlatformStand = true | |
634 | hum2.Health = 0 | |
635 | end | |
636 | local ch = playa:GetChildren() | |
637 | local i | |
638 | for i = 1,#ch do | |
639 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
640 | ch[i]:remove() | |
641 | end | |
642 | end | |
643 | ||
644 | if Head then | |
645 | local Neck = Instance.new("Weld") | |
646 | Neck.Name = "Neck" | |
647 | Neck.Part0 = Torso | |
648 | Neck.Part1 = Head | |
649 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
650 | Neck.C1 = CFrame.new() | |
651 | Neck.Parent = Torso | |
652 | end | |
653 | local Limb = playa:FindFirstChild("Right Arm") | |
654 | if Limb then | |
655 | ||
656 | Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0) | |
657 | local Joint = Instance.new("Glue") | |
658 | Joint.Name = "RightShoulder" | |
659 | Joint.Part0 = Torso | |
660 | Joint.Part1 = Limb | |
661 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
662 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
663 | Joint.Parent = Torso | |
664 | ||
665 | local B = Instance.new("Part") | |
666 | B.TopSurface = 0 | |
667 | B.BottomSurface = 0 | |
668 | B.formFactor = "Symmetric" | |
669 | B.Size = Vector3.new(1, 1, 1) | |
670 | B.Transparency = 1 | |
671 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
672 | B.Parent = playa | |
673 | local W = Instance.new("Weld") | |
674 | W.Part0 = Limb | |
675 | W.Part1 = B | |
676 | W.C0 = CFrame.new(0, -0.5, 0) | |
677 | W.Parent = Limb | |
678 | end | |
679 | local Limb = playa:FindFirstChild("Left Arm") | |
680 | if Limb then | |
681 | ||
682 | Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0) | |
683 | local Joint = Instance.new("Glue") | |
684 | Joint.Name = "LeftShoulder" | |
685 | Joint.Part0 = Torso | |
686 | Joint.Part1 = Limb | |
687 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
688 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
689 | Joint.Parent = Torso | |
690 | ||
691 | local B = Instance.new("Part") | |
692 | B.TopSurface = 0 | |
693 | B.BottomSurface = 0 | |
694 | B.formFactor = "Symmetric" | |
695 | B.Size = Vector3.new(1, 1, 1) | |
696 | B.Transparency = 1 | |
697 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
698 | B.Parent = playa | |
699 | local W = Instance.new("Weld") | |
700 | W.Part0 = Limb | |
701 | W.Part1 = B | |
702 | W.C0 = CFrame.new(0, -0.5, 0) | |
703 | W.Parent = Limb | |
704 | end | |
705 | local Limb = playa:FindFirstChild("Right Leg") | |
706 | if Limb then | |
707 | ||
708 | Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0) | |
709 | local Joint = Instance.new("Glue") | |
710 | Joint.Name = "RightHip" | |
711 | Joint.Part0 = Torso | |
712 | Joint.Part1 = Limb | |
713 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
714 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
715 | Joint.Parent = Torso | |
716 | ||
717 | local B = Instance.new("Part") | |
718 | B.TopSurface = 0 | |
719 | B.BottomSurface = 0 | |
720 | B.formFactor = "Symmetric" | |
721 | B.Size = Vector3.new(1, 1, 1) | |
722 | B.Transparency = 1 | |
723 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
724 | B.Parent = playa | |
725 | local W = Instance.new("Weld") | |
726 | W.Part0 = Limb | |
727 | W.Part1 = B | |
728 | W.C0 = CFrame.new(0, -0.5, 0) | |
729 | W.Parent = Limb | |
730 | end | |
731 | local Limb = playa:FindFirstChild("Left Leg") | |
732 | if Limb then | |
733 | ||
734 | Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0) | |
735 | local Joint = Instance.new("Glue") | |
736 | Joint.Name = "LeftHip" | |
737 | Joint.Part0 = Torso | |
738 | Joint.Part1 = Limb | |
739 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
740 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
741 | Joint.Parent = Torso | |
742 | ||
743 | local B = Instance.new("Part") | |
744 | B.TopSurface = 0 | |
745 | B.BottomSurface = 0 | |
746 | B.formFactor = "Symmetric" | |
747 | B.Size = Vector3.new(1, 1, 1) | |
748 | B.Transparency = 1 | |
749 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
750 | B.Parent = playa | |
751 | local W = Instance.new("Weld") | |
752 | W.Part0 = Limb | |
753 | W.Part1 = B | |
754 | W.C0 = CFrame.new(0, -0.5, 0) | |
755 | W.Parent = Limb | |
756 | end | |
757 | --[ | |
758 | local Bar = Instance.new("Part") | |
759 | Bar.TopSurface = 0 | |
760 | Bar.BottomSurface = 0 | |
761 | Bar.formFactor = "Symmetric" | |
762 | Bar.Size = Vector3.new(1, 1, 1) | |
763 | Bar.Transparency = 1 | |
764 | Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0) | |
765 | Bar.Parent = playa | |
766 | local Weld = Instance.new("Weld") | |
767 | Weld.Part0 = Torso | |
768 | Weld.Part1 = Bar | |
769 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
770 | Weld.Parent = Torso | |
771 | --]] | |
772 | playa.Parent = Gibs | |
773 | local coru = coroutine.wrap(function() | |
774 | print(hitz.Name) | |
775 | local uno = Instance.new('Part',workspace) | |
776 | local dos = Instance.new('Part',workspace) | |
777 | uno.CFrame = playa:FindFirstChild(heyy).CFrame | |
778 | dos.CFrame = kneef.CFrame | |
779 | local weld = Instance.new('Weld',kneef) | |
780 | weld.Part0 = playa:FindFirstChild(heyy) | |
781 | weld.Part1 = kneef | |
782 | weld.C0 = uno.CFrame:toObjectSpace(dos.CFrame) | |
783 | uno:Destroy() | |
784 | dos:Destroy() | |
785 | end) | |
786 | coru() | |
787 | game.Debris:AddItem(playa, 15) | |
788 | end | |
789 | end | |
790 | ||
791 | function checkarms() | |
792 | check = coroutine.wrap(function() | |
793 | rshould = char.Torso:FindFirstChild("Right Shoulder") | |
794 | lshould = char.Torso:FindFirstChild("Left Shoulder") | |
795 | ||
796 | if rshould == nil then | |
797 | rightshoulder:Clone().Parent = char.Torso | |
798 | end | |
799 | if lshould == nil then | |
800 | rightshoulder:Clone().Parent = char.Torso | |
801 | end | |
802 | end) | |
803 | check() | |
804 | end | |
805 | ||
806 | mouse.KeyDown:connect(function(k) | |
807 | key = k:lower() | |
808 | ||
809 | if key == "e" and enabled == true and equipped == true then | |
810 | if armed == false then | |
811 | tors = Instance.new("Weld", char.HumanoidRootPart) | |
812 | tors.Part0 = char.HumanoidRootPart | |
813 | tors.Part1 = char.Torso | |
814 | tors.C0 = CFrame.new(0, 0, 0) * CFrame.new(0, 0, 0) | |
815 | ||
816 | crarm = Instance.new("Weld", char.Torso) | |
817 | crarm.Part0 = char.Torso | |
818 | crarm.Part1 = char["Right Arm"] | |
819 | crarm.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(1.5, 0, 0) | |
820 | ||
821 | clarm = Instance.new("Weld", char.Torso) | |
822 | clarm.Part0 = char.Torso | |
823 | clarm.Part1 = char["Left Arm"] | |
824 | clarm.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0) | |
825 | ||
826 | enabled = false | |
827 | for i = 0, 1, 0.1 do | |
828 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 1.5, 0) * CFrame.Angles(3.14, 0, 0), i) | |
829 | wait() | |
830 | end | |
831 | for i, v in pairs(arrow:GetChildren()) do | |
832 | v.Transparency = 0 | |
833 | end | |
834 | feather1.Transparency = 0.25 | |
835 | feather2.Transparency = 0.25 | |
836 | feather3.Transparency = 0.25 | |
837 | feather4.Transparency = 0.25 | |
838 | ||
839 | warrow.Part0 = char["Right Arm"] | |
840 | warrow.C0 = CFrame.new(-0.5, -2.7, -0.2) * CFrame.Angles(-1.575, 0.075, -0.5) | |
841 | ||
842 | for i = 0, 1, 0.05 do | |
843 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, -1.5, 0), i) | |
844 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, -0.05, 0), i) | |
845 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.6, 0.45, -0.10) * CFrame.Angles(1.2, 0, -1.575), i) | |
846 | crarm.C0 = crarm.C0:lerp(CFrame.new(-1.35, 0.6, -1) * CFrame.Angles(1.575, 0, -1.575), i) | |
847 | wjoint1.C0 = wjoint1.C0:lerp(CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0), i) | |
848 | wjoint2.C0 = wjoint2.C0:lerp(CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0), i) | |
849 | wstringpart.C0 = wstringpart.C0:lerp(CFrame.new(0, -0.5, -0.3) * CFrame.new(0, 0, 0), i) | |
850 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 1.5, 0), i) | |
851 | wait() | |
852 | end | |
853 | pullbacksound:Play() | |
854 | warrow.Part0 = stringpart | |
855 | warrow.C0 = CFrame.new(-0.1, 0, 1.9) * CFrame.Angles(3.15, 0.04, 0) | |
856 | for i = 0, 1, 0.025 do | |
857 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, -1.5, 0), i) | |
858 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, -0.05, 0), i) | |
859 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.95, 0.45, -0.10) * CFrame.Angles(1.2, 0, -1.575), i) | |
860 | crarm.C0 = crarm.C0:lerp(CFrame.new(1, 0.6, -1) * CFrame.Angles(1.575, 0, -1.575), i) | |
861 | wjoint1.C0 = wjoint1.C0:lerp(CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.4, 0, 0), i) | |
862 | wjoint2.C0 = wjoint2.C0:lerp(CFrame.new(0, -0.6, 0) * CFrame.Angles(0.4, 0, 0), i) | |
863 | wstringpart.C0 = wstringpart.C0:lerp(CFrame.new(0, -0.5, -3) * CFrame.new(0, 0, 0), i) | |
864 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, -0.1) * CFrame.Angles(0, 1.5, -0.25), i) | |
865 | wait() | |
866 | end | |
867 | armed = true | |
868 | enabled = true | |
869 | elseif armed == true and equipped == true then | |
870 | enabled = false | |
871 | for i = 0,1,0.05 do | |
872 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.6, 0.45, -0.10) * CFrame.Angles(1.2, 0, -1.575), i) | |
873 | crarm.C0 = crarm.C0:lerp(CFrame.new(-1.3, 0.4, -1) * CFrame.Angles(1.575, 0.1, -1.575), i) | |
874 | wjoint1.C0 = wjoint1.C0:lerp(CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0), i) | |
875 | wjoint2.C0 = wjoint2.C0:lerp(CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0), i) | |
876 | wstringpart.C0 = wstringpart.C0:lerp(CFrame.new(0, -0.5, -0.3) * CFrame.new(0, 0, 0), i) | |
877 | wait() | |
878 | end | |
879 | warrow.Part0 = char["Right Arm"] | |
880 | warrow.C0 = CFrame.new(-0.5, -2.65, -0.2) * CFrame.Angles(-1.575, 0.075, -0.4) | |
881 | for i = 0,1,0.05 do | |
882 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 1.5, 0) * CFrame.Angles(3.14, 0, 0), i) | |
883 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
884 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0), i) | |
885 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
886 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
887 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 0, 0), i) | |
888 | wait() | |
889 | end | |
890 | ||
891 | for i, v in pairs(arrow:GetChildren()) do | |
892 | v.Transparency = 1 | |
893 | end | |
894 | warrow.Part0 = char.Torso | |
895 | warrow.C0 = CFrame.new(0, 0, 0.5) * CFrame.Angles(-1.575, 0, 1.575) | |
896 | ||
897 | for i = 0, 1, 0.1 do | |
898 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
899 | wait() | |
900 | end | |
901 | armed = false | |
902 | enabled = true | |
903 | clarm:Remove() | |
904 | crarm:Remove() | |
905 | tors:Remove() | |
906 | rightshoulder:Clone().Parent = char.Torso | |
907 | leftshoulder:Clone().Parent = char.Torso | |
908 | torso:Clone().Parent = char.HumanoidRootPart | |
909 | checkarms() | |
910 | end | |
911 | elseif key == "z" then | |
912 | if armed == true or enabled == false then return end | |
913 | clarm = Instance.new("Weld", char.Torso) | |
914 | clarm.Part0 = char.Torso | |
915 | clarm.Part1 = char["Left Arm"] | |
916 | clarm.C0 = CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0) | |
917 | if equipped == false then | |
918 | enabled = false | |
919 | for i = 0, 1, 0.075 do | |
920 | clarm.C0 = clarm.C0:lerp(CFrame.new(-0.5, 0, 0.25) * CFrame.Angles(math.rad(-90), 0, math.rad(75)), i) | |
921 | wait() | |
922 | end | |
923 | whandle.C0 = CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0) | |
924 | whandle.Part0 = char["Left Arm"] | |
925 | for i = 0, 1, 0.075 do | |
926 | clarm.C0 = clarm.C0:lerp(CFrame.new(-2, 0.6, 0) * CFrame.Angles(0, 0, math.rad(-90)), i) | |
927 | wait() | |
928 | end | |
929 | for i = 0, 1, 0.075 do | |
930 | clarm.C0 = clarm.C0:lerp(CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0), i) | |
931 | wait() | |
932 | end | |
933 | enabled = true | |
934 | equipped = true | |
935 | elseif equipped == true then | |
936 | if armed == true or enabled == false then return end | |
937 | enabled = false | |
938 | for i = 0, 1, 0.075 do | |
939 | clarm.C0 = clarm.C0:lerp(CFrame.new(-2, 0.6, 0) * CFrame.Angles(0, 0, math.rad(-90)), i) | |
940 | wait() | |
941 | end | |
942 | for i = 0, 1, 0.075 do | |
943 | clarm.C0 = clarm.C0:lerp(CFrame.new(-0.5, 0, 0.25) * CFrame.Angles(math.rad(-90), 0, math.rad(75)), i) | |
944 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0), i) | |
945 | wait() | |
946 | end | |
947 | whandle.C0 = CFrame.new(0, 0, 0.6) * CFrame.Angles(0, 0, math.rad(45)) | |
948 | whandle.Part0 = char.Torso | |
949 | for i = 0, 1, 0.075 do | |
950 | clarm.C0 = clarm.C0:lerp(CFrame.Angles(0, 0, 0) * CFrame.new(-1.5, 0, 0), i) | |
951 | wait() | |
952 | end | |
953 | equipped = false | |
954 | enabled = true | |
955 | end | |
956 | clarm:Remove() | |
957 | leftshoulder:Clone().Parent = char.Torso | |
958 | end | |
959 | end) | |
960 | ||
961 | mouse.Button1Down:connect(function() | |
962 | if armed == false or enabled == false or equipped == false then return end | |
963 | firesound:Play() | |
964 | enabled = false | |
965 | armed = false | |
966 | wjoint1.C0 = CFrame.new(0, 0.6, 0) * CFrame.Angles(-0.1, 0, 0) | |
967 | wjoint2.C0 = CFrame.new(0, -0.6, 0) * CFrame.Angles(0.1, 0, 0) | |
968 | wstringpart.C0 = CFrame.new(0, -0.5, -0.3) * CFrame.new(0, 0, 0) | |
969 | crarm.C0 = CFrame.new(1.2, 0.6, -1) * CFrame.Angles(1.575, 0, -1.575) | |
970 | newarrow = arrow:Clone() | |
971 | newarrow.Parent = game.Workspace | |
972 | newarrow.Name = "flyingarrow" | |
973 | newarrow.ArrowBody.CFrame = CFrame.new(newarrow.ArrowBody.CFrame.p, mouse.Hit.p)*CFrame.Angles(0,0,math.pi/1.15) | |
974 | char.HumanoidRootPart.CFrame = CFrame.new(char.HumanoidRootPart.CFrame.p, mouse.Hit.p)*CFrame.Angles(0,math.pi/100,0) | |
975 | local fly = Instance.new('BodyVelocity',newarrow.ArrowBody) | |
976 | fly.Velocity = (newarrow.ArrowBody.CFrame*CFrame.Angles(0,0,math.pi/2)).lookVector*200 | |
977 | newarrow.Arrowhead.Touched:connect(function(hit) | |
978 | if hit.Parent and hit.Parent:FindFirstChildOfClass('Humanoid') and hit.Transparency < 1 and newarrow.Arrowhead.CanCollide == false and hit.Parent:FindFirstChildOfClass('Humanoid').Health > 0 and hit.Parent ~= char then | |
979 | velocity(fly) | |
980 | newarrow.Arrowhead.CanCollide = true | |
981 | game:GetService('Debris'):AddItem(newarrow.Arrowhead,15) | |
982 | tone = math.random(1, 3) | |
983 | local sound = Instance.new('Sound',newarrow.Arrowhead) | |
984 | if tone == 1 then sound.SoundId = "rbxassetid://220833967" end | |
985 | if tone == 2 then sound.SoundId = "rbxassetid://220833976" end | |
986 | if tone == 3 then sound.SoundId = "rbxassetid://220834000" end | |
987 | sound.PlaybackSpeed = 1 | |
988 | sound:Play() | |
989 | newarrow.Arrowhead.Anchored = true | |
990 | hit.Anchored = true | |
991 | if hit.Parent:FindFirstChildOfClass('Humanoid') and hit.Name == "Torso" or hit.Name == "Head" then | |
992 | hit.Parent:FindFirstChildOfClass('Humanoid').Health = 0 | |
993 | end | |
994 | wait() | |
995 | hit.Anchored = false | |
996 | newarrow.Arrowhead.Anchored = false | |
997 | killz(hit.Parent,hit.Name,newarrow.Arrowhead) | |
998 | elseif hit.Parent and hit.Parent.Parent:FindFirstChildOfClass('Humanoid') and hit.Transparency < 1 and newarrow.Arrowhead.CanCollide == false and hit.Parent.Parent:FindFirstChildOfClass('Humanoid').Health > 0 and hit.Parent.Parent ~= char and hit.Parent.Parent:FindFirstChild('Head') then | |
999 | velocity(fly) | |
1000 | game:GetService('Debris'):AddItem(newarrow.Arrowhead,15) | |
1001 | newarrow.Arrowhead.CanCollide = true | |
1002 | tone = math.random(1, 3) | |
1003 | local sound = Instance.new('Sound',newarrow.Arrowhead) | |
1004 | if tone == 1 then sound.SoundId = "rbxassetid://220833967" end | |
1005 | if tone == 2 then sound.SoundId = "rbxassetid://220833976" end | |
1006 | if tone == 3 then sound.SoundId = "rbxassetid://220834000" end | |
1007 | sound.PlaybackSpeed = 1 | |
1008 | sound:Play() | |
1009 | newarrow.Arrowhead.Anchored = true | |
1010 | hit.Anchored = true | |
1011 | if hit.Parent.Parent:FindFirstChildOfClass('Humanoid') then | |
1012 | hit.Parent.Parent:FindFirstChildOfClass('Humanoid').Health = 0 | |
1013 | end | |
1014 | wait() | |
1015 | newarrow.Arrowhead.Anchored = false | |
1016 | hit.Anchored = false | |
1017 | killz(hit.Parent.Parent,hit.Name,newarrow.Arrowhead) | |
1018 | elseif hit.Parent and hit.Parent ~= char and hit.Parent.Parent ~= char and hit.Transparency < 1 and newarrow.Arrowhead.CanCollide == false then | |
1019 | velocity(fly) | |
1020 | game:GetService('Debris'):AddItem(newarrow.Arrowhead,15) | |
1021 | newarrow.Arrowhead.CanCollide = true | |
1022 | local sound = Instance.new('Sound',newarrow.Arrowhead) | |
1023 | sound.SoundId = 'rbxassetid://267585646' | |
1024 | sound:Play() | |
1025 | end | |
1026 | end) | |
1027 | ||
1028 | for i, v in pairs(arrow:GetChildren()) do | |
1029 | v.Transparency = 1 | |
1030 | end | |
1031 | warrow.Part0 = char.Torso | |
1032 | warrow.C0 = CFrame.new(0, 0, 0.5) * CFrame.Angles(-1.575, 0, 1.575) | |
1033 | wait(0.5) | |
1034 | for i = 0, 1, 0.05 do | |
1035 | tors.C0 = tors.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
1036 | whandle.C0 = whandle.C0:lerp(CFrame.new(0.4, -1, 0) * CFrame.Angles(1.575, 0, 0), i) | |
1037 | clarm.C0 = clarm.C0:lerp(CFrame.new(-1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
1038 | crarm.C0 = crarm.C0:lerp(CFrame.new(1.5, 0, 0) * CFrame.Angles(0, 0, 0), i) | |
1039 | hed.C0 = hed.C0:lerp(CFrame.new(0, 1.55, 0) * CFrame.Angles(0, 0, 0), i) | |
1040 | wait() | |
1041 | end | |
1042 | clarm:Remove() | |
1043 | crarm:Remove() | |
1044 | tors:Remove() | |
1045 | rightshoulder:Clone().Parent = char.Torso | |
1046 | leftshoulder:Clone().Parent = char.Torso | |
1047 | torso:Clone().Parent = char.HumanoidRootPart | |
1048 | checkarms() | |
1049 | enabled = true | |
1050 | end) |