SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
3 | do | |
4 | print("FE Compatibility code by Mokiros") | |
5 | script.Parent = Player.Character | |
6 | ||
7 | --RemoteEvent for communicating | |
8 | local Event = Instance.new("RemoteEvent") | |
9 | Event.Name = "UserInput_Event" | |
10 | ||
11 | --Fake event to make stuff like Mouse.KeyDown work | |
12 | local function fakeEvent() | |
13 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
14 | t.connect = t.Connect | |
15 | return t | |
16 | end | |
17 | ||
18 | --Creating fake input objects with fake variables | |
19 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
20 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
21 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
22 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
23 | end} | |
24 | --Merged 2 functions into one by checking amount of arguments | |
25 | CAS.UnbindAction = CAS.BindAction | |
26 | ||
27 | --This function will trigger the events that have been :Connect()'ed | |
28 | local function te(self,ev,...) | |
29 | local t = m[ev] | |
30 | if t and t._fakeEvent and t.Function then | |
31 | t.Function(...) | |
32 | end | |
33 | end | |
34 | m.TrigEvent = te | |
35 | UIS.TrigEvent = te | |
36 | ||
37 | Event.OnServerEvent:Connect(function(plr,io) | |
38 | if plr~=Player then return end | |
39 | if io.isMouse then | |
40 | m.Target = io.Target | |
41 | m.Hit = io.Hit | |
42 | else | |
43 | local b = io.UserInputState == Enum.UserInputState.Begin | |
44 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
45 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
46 | end | |
47 | for _,t in pairs(CAS.Actions) do | |
48 | for _,k in pairs(t.Keys) do | |
49 | if k==io.KeyCode then | |
50 | t.Function(t.Name,io.UserInputState,io) | |
51 | end | |
52 | end | |
53 | end | |
54 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
55 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
56 | end | |
57 | end) | |
58 | Event.Parent = NLS([==[ | |
59 | local Player = game:GetService("Players").LocalPlayer | |
60 | local Event = script:WaitForChild("UserInput_Event") | |
61 | ||
62 | local UIS = game:GetService("UserInputService") | |
63 | local input = function(io,a) | |
64 | if a then return end | |
65 | --Since InputObject is a client-side instance, we create and pass table instead | |
66 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
67 | end | |
68 | UIS.InputBegan:Connect(input) | |
69 | UIS.InputEnded:Connect(input) | |
70 | ||
71 | local Mouse = Player:GetMouse() | |
72 | local h,t | |
73 | --Give the server mouse data 30 times every second, but only if the values changed | |
74 | --If player is not moving their mouse, client won't fire events | |
75 | while wait(1/30) do | |
76 | if h~=Mouse.Hit or t~=Mouse.Target then | |
77 | h,t=Mouse.Hit,Mouse.Target | |
78 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
79 | end | |
80 | end]==],Player.Character) | |
81 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
82 | end | |
83 | ||
84 | --Fireaxe by DMS, also contains gore | |
85 | o1 = Instance.new("Tool") | |
86 | o1.Name = "Fire Axe" | |
87 | o1.GripForward = Vector3.new(-1.74845553e-007, 4.37113812e-008, 1) | |
88 | o1.GripPos = Vector3.new(0.487703323, -3.7742065e-010, 0.00863459334) | |
89 | o1.GripRight = Vector3.new(-7.64274186e-015, -1, 4.37113812e-008) | |
90 | o1.GripUp = Vector3.new(-1, 0, -1.74845553e-007) | |
91 | o1.CanBeDropped = false | |
92 | o4 = Instance.new("Animation") | |
93 | o4.Name = "Whack" | |
94 | o4.Parent = o1 | |
95 | o4.AnimationId = "http://www.roblox.com/Asset?ID=94161088" | |
96 | o7 = Instance.new("Part") | |
97 | o7.Name = "Wedge" | |
98 | o7.Parent = o1 | |
99 | o7.Material = Enum.Material.Metal | |
100 | o7.BrickColor = BrickColor.new("Maroon") | |
101 | o7.Position = Vector3.new(-9.99647808, 2.66786528, 55.8684578) | |
102 | o7.Rotation = Vector3.new(5.00001049, 0, -180) | |
103 | o7.Anchored = true | |
104 | o7.CFrame = CFrame.new(-9.99647808, 2.66786528, 55.8684578, -1, 0, 0, 0, -0.996185839, -0.0871551484, 0, -0.0871551558, 0.996185839) | |
105 | o7.FormFactor = Enum.FormFactor.Custom | |
106 | o7.Size = Vector3.new(0.39738366, 0.39738363, 0.39738363) | |
107 | o7.BottomSurface = Enum.SurfaceType.Smooth | |
108 | o7.TopSurface = Enum.SurfaceType.Smooth | |
109 | o7.Color = Color3.new(0.458824, 0, 0) | |
110 | o8 = Instance.new("SpecialMesh") | |
111 | o8.Parent = o7 | |
112 | o8.Scale = Vector3.new(0.285714298, 0.571428597, 0.142857149) | |
113 | o8.MeshType = Enum.MeshType.Wedge | |
114 | o9 = Instance.new("Part") | |
115 | o9.Parent = o1 | |
116 | o9.Material = Enum.Material.Metal | |
117 | o9.BrickColor = BrickColor.new("Maroon") | |
118 | o9.Position = Vector3.new(-9.99647808, 3.02555633, 56.01371) | |
119 | o9.Rotation = Vector3.new(95.0000076, 0, -90) | |
120 | o9.Anchored = true | |
121 | o9.CFrame = CFrame.new(-9.99647808, 3.02555633, 56.01371, 0, 1, 0, 0.0871551484, 0, -0.996185839, -0.996185839, 0, -0.0871551558) | |
122 | o9.FormFactor = Enum.FormFactor.Custom | |
123 | o9.Size = Vector3.new(0.39738366, 0.39738363, 0.39738363) | |
124 | o9.BottomSurface = Enum.SurfaceType.Smooth | |
125 | o9.TopSurface = Enum.SurfaceType.Smooth | |
126 | o9.Color = Color3.new(0.458824, 0, 0) | |
127 | o10 = Instance.new("BlockMesh") | |
128 | o10.Parent = o9 | |
129 | o10.Scale = Vector3.new(0.714285731, 0.285714298, 1.28571427) | |
130 | o11 = Instance.new("Part") | |
131 | o11.Parent = o1 | |
132 | o11.Material = Enum.Material.Metal | |
133 | o11.BrickColor = BrickColor.new("Black") | |
134 | o11.Position = Vector3.new(-9.99639225, 1.28804588, 55.8821335) | |
135 | o11.Rotation = Vector3.new(-98.331665, 90, 0) | |
136 | o11.Anchored = true | |
137 | o11.CFrame = CFrame.new(-9.99639225, 1.28804588, 55.8821335, 0, 0, 1, -0.989437163, -0.144901738, 0, 0.144901723, -0.989437163, 0) | |
138 | o11.FormFactor = Enum.FormFactor.Plate | |
139 | o11.Size = Vector3.new(0.0994508043, 0.266528189, 0.119341016) | |
140 | o11.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
141 | o12 = Instance.new("Part") | |
142 | o12.Parent = o1 | |
143 | o12.Material = Enum.Material.Metal | |
144 | o12.BrickColor = BrickColor.new("Black") | |
145 | o12.Position = Vector3.new(-9.99370193, 1.40131426, 55.8971977) | |
146 | o12.Rotation = Vector3.new(-76.431015, 90, 0) | |
147 | o12.Anchored = true | |
148 | o12.CFrame = CFrame.new(-9.99370193, 1.40131426, 55.8971977, 0, 0, 1, -0.972079694, 0.234613955, 0, -0.23461397, -0.972079694, 0) | |
149 | o12.FormFactor = Enum.FormFactor.Plate | |
150 | o12.Size = Vector3.new(0.0994508043, 0.266528189, 0.125308067) | |
151 | o12.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
152 | o13 = Instance.new("Part") | |
153 | o13.Parent = o1 | |
154 | o13.Material = Enum.Material.Metal | |
155 | o13.BrickColor = BrickColor.new("Black") | |
156 | o13.Position = Vector3.new(-9.99370193, 1.50252604, 55.90522) | |
157 | o13.Rotation = Vector3.new(-84.9999924, 90, 0) | |
158 | o13.Anchored = true | |
159 | o13.CFrame = CFrame.new(-9.99370193, 1.50252604, 55.90522, 0, 0, 1, -0.996185839, 0.0871551484, 0, -0.0871551558, -0.996185839, 0) | |
160 | o13.FormFactor = Enum.FormFactor.Plate | |
161 | o13.Size = Vector3.new(0.0994508043, 0.258572131, 0.12133003) | |
162 | o13.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
163 | o14 = Instance.new("Part") | |
164 | o14.Parent = o1 | |
165 | o14.Material = Enum.Material.Metal | |
166 | o14.BrickColor = BrickColor.new("Maroon") | |
167 | o14.Position = Vector3.new(-9.9964819, 0.22239995, 55.8333473) | |
168 | o14.Rotation = Vector3.new(82.6855316, 0, -90) | |
169 | o14.Anchored = true | |
170 | o14.CFrame = CFrame.new(-9.9964819, 0.22239995, 55.8333473, 0, 1, 0, -0.127313927, 0, -0.991853654, -0.991853714, 0, 0.127313912) | |
171 | o14.FormFactor = Enum.FormFactor.Custom | |
172 | o14.Size = Vector3.new(0.397383124, 0.397383094, 0.397383094) | |
173 | o14.BottomSurface = Enum.SurfaceType.Smooth | |
174 | o14.TopSurface = Enum.SurfaceType.Smooth | |
175 | o14.Color = Color3.new(0.458824, 0, 0) | |
176 | o15 = Instance.new("BlockMesh") | |
177 | o15.Parent = o14 | |
178 | o15.Scale = Vector3.new(0.571428597, 0.285714298, 0.428571433) | |
179 | o16 = Instance.new("Part") | |
180 | o16.Parent = o1 | |
181 | o16.Material = Enum.Material.Metal | |
182 | o16.BrickColor = BrickColor.new("Maroon") | |
183 | o16.Position = Vector3.new(-9.9964819, 0.375630856, 55.8168411) | |
184 | o16.Rotation = Vector3.new(88.6483841, 0, -90) | |
185 | o16.Anchored = true | |
186 | o16.CFrame = CFrame.new(-9.9964819, 0.375630856, 55.8168411, 0, 1, 0, -0.023587808, 0, -0.999713004, -0.999713004, 0, 0.0235878006) | |
187 | o16.FormFactor = Enum.FormFactor.Custom | |
188 | o16.Size = Vector3.new(0.397383124, 0.397383094, 0.397383094) | |
189 | o16.BottomSurface = Enum.SurfaceType.Smooth | |
190 | o16.TopSurface = Enum.SurfaceType.Smooth | |
191 | o16.Color = Color3.new(0.458824, 0, 0) | |
192 | o17 = Instance.new("BlockMesh") | |
193 | o17.Parent = o16 | |
194 | o17.Scale = Vector3.new(0.571428597, 0.285714298, 0.428571433) | |
195 | o18 = Instance.new("WedgePart") | |
196 | o18.Parent = o1 | |
197 | o18.Material = Enum.Material.Metal | |
198 | o18.BrickColor = BrickColor.new("Maroon") | |
199 | o18.Position = Vector3.new(-9.93888187, 3.79157043, 55.4540977) | |
200 | o18.Rotation = Vector3.new(4.99995804, 0, -90) | |
201 | o18.Anchored = true | |
202 | o18.CFrame = CFrame.new(-9.93888187, 3.79157043, 55.4540977, 0, 1, 0, -0.996186078, 0, -0.0871542543, -0.0871542618, 0, 0.996186078) | |
203 | o18.FormFactor = Enum.FormFactor.Symmetric | |
204 | o18.Size = Vector3.new(0.139231324, 0.0696156621, 0.654387176) | |
205 | - | o1.Parent = game.Players.LocalPlayer.Backpack |
205 | + | |
206 | o19 = Instance.new("Part") | |
207 | o19.Parent = o1 | |
208 | o19.Material = Enum.Material.Metal | |
209 | o19.BrickColor = BrickColor.new("Maroon") | |
210 | o19.Position = Vector3.new(-9.9964819, 1.58100605, 55.9158287) | |
211 | o19.Rotation = Vector3.new(95.0000076, 0, -90) | |
212 | o19.Anchored = true | |
213 | o19.CFrame = CFrame.new(-9.9964819, 1.58100605, 55.9158287, 0, 1, 0, 0.0871551484, 0, -0.996185839, -0.996185839, 0, -0.0871551558) | |
214 | o19.FormFactor = Enum.FormFactor.Custom | |
215 | o19.Size = Vector3.new(0.397383064, 0.397383034, 2.38429832) | |
216 | o19.BottomSurface = Enum.SurfaceType.Smooth | |
217 | o19.TopSurface = Enum.SurfaceType.Smooth | |
218 | o19.Color = Color3.new(0.458824, 0, 0) | |
219 | o20 = Instance.new("BlockMesh") | |
220 | o20.Parent = o19 | |
221 | o20.Scale = Vector3.new(0.571428597, 0.285714298, 1) | |
222 | o21 = Instance.new("Part") | |
223 | o21.Parent = o1 | |
224 | o21.Material = Enum.Material.Metal | |
225 | o21.BrickColor = BrickColor.new("Black") | |
226 | o21.Position = Vector3.new(-9.97369194, 3.52371502, 56.1993446) | |
227 | o21.Rotation = Vector3.new(-84.9999924, 0, -90) | |
228 | o21.Anchored = true | |
229 | o21.CFrame = CFrame.new(-9.97369194, 3.52371502, 56.1993446, 0, 1, 0, -0.0871551484, 0, 0.996185839, 0.996185839, 0, 0.0871551558) | |
230 | o21.FormFactor = Enum.FormFactor.Symmetric | |
231 | o21.Size = Vector3.new(0.877157807, 0.139231384, 0.543002486) | |
232 | o21.BottomSurface = Enum.SurfaceType.Smooth | |
233 | o21.TopSurface = Enum.SurfaceType.Smooth | |
234 | o21.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
235 | o22 = Instance.new("WedgePart") | |
236 | o22.Parent = o1 | |
237 | o22.Material = Enum.Material.Metal | |
238 | o22.BrickColor = BrickColor.new("Mid gray") | |
239 | o22.Position = Vector3.new(-9.93888187, 3.43113708, 56.7782478) | |
240 | o22.Rotation = Vector3.new(-175.000015, 0, -90) | |
241 | o22.Anchored = true | |
242 | o22.CFrame = CFrame.new(-9.93888187, 3.43113708, 56.7782478, 0, 1, 0, 0.996186018, 0, 0.0871547684, 0.0871547759, 0, -0.996186137) | |
243 | o22.FormFactor = Enum.FormFactor.Symmetric | |
244 | o22.Size = Vector3.new(0.626541376, 0.0696156994, 0.292385936) | |
245 | o22.Color = Color3.new(0.803922, 0.803922, 0.803922) | |
246 | o25 = Instance.new("Part") | |
247 | o25.Name = "CHOPPART" | |
248 | o25.Parent = o1 | |
249 | o25.Material = Enum.Material.Metal | |
250 | o25.BrickColor = BrickColor.new("Black") | |
251 | o25.Transparency = 1 | |
252 | o25.Position = Vector3.new(-9.94330788, 3.48598647, 55.9995308) | |
253 | o25.Rotation = Vector3.new(-84.9999924, 0, -90) | |
254 | o25.Anchored = true | |
255 | o25.CFrame = CFrame.new(-9.94330788, 3.48598647, 55.9995308, 0, 1, 0, -0.0871551484, 0, 0.996185839, 0.996185839, 0, 0.0871551558) | |
256 | o25.FormFactor = Enum.FormFactor.Symmetric | |
257 | o25.Size = Vector3.new(1.87715781, 0.200000003, 0.693002462) | |
258 | o25.BottomSurface = Enum.SurfaceType.Smooth | |
259 | o25.TopSurface = Enum.SurfaceType.Smooth | |
260 | o25.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
261 | o26 = Instance.new("Part") | |
262 | o26.Name = "Handle" | |
263 | o26.Parent = o1 | |
264 | o26.Transparency = 1 | |
265 | o26.Position = Vector3.new(-10.0078793, 1.42237854, 55.9140701) | |
266 | o26.Rotation = Vector3.new(-2.1344531e-006, 0, -90) | |
267 | o26.Anchored = true | |
268 | o26.CFrame = CFrame.new(-10.0078793, 1.42237854, 55.9140701, 0, 1, 0, -0.999991179, 0, 3.7252903e-008, 2.98023224e-008, 0, 0.999991179) | |
269 | o26.Size = Vector3.new(0.200000003, 1, 0.200000003) | |
270 | o27 = Instance.new("Sound") | |
271 | o27.Name = "SlashSound" | |
272 | o27.Parent = o26 | |
273 | o27.SoundId = "rbxassetid://101164100" | |
274 | o27.Volume = 1 | |
275 | o28 = Instance.new("Sound") | |
276 | o28.Name = "Hit" | |
277 | o28.Parent = o26 | |
278 | o28.SoundId = "rbxassetid://214755079" | |
279 | o28.Volume = 1 | |
280 | o30 = Instance.new("Animation") | |
281 | o30.Name = "Chop" | |
282 | o30.Parent = o1 | |
283 | o30.AnimationId = "rbxassetid://32659699" | |
284 | o31 = Instance.new("Animation") | |
285 | o31.Name = "Slice" | |
286 | o31.Parent = o1 | |
287 | o31.AnimationId = "rbxassetid://28090109" | |
288 | o1.Parent = owner.Backpack | |
289 | for i,v in pairs (o1:GetChildren()) do | |
290 | if v:IsA("Animation") then | |
291 | else | |
292 | v.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
293 | v.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
294 | v.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
295 | v.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
296 | v.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
297 | v.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
298 | end | |
299 | end | |
300 | ||
301 | repeat wait() until o1:FindFirstChild("Handle") | |
302 | ||
303 | local Welds = {} | |
304 | ||
305 | function ClearOldWelds(tbl) | |
306 | for _,v in pairs(tbl) do | |
307 | if v:IsA('Weld') then | |
308 | v:Destroy() | |
309 | end | |
310 | end | |
311 | end | |
312 | ||
313 | function Equipped() | |
314 | for i,v in pairs (o1:GetChildren()) do | |
315 | if v:IsA("Animation") then | |
316 | else | |
317 | v.Anchored = false | |
318 | end | |
319 | end | |
320 | local Handle = o1:FindFirstChild('Handle') | |
321 | if not Handle then return end | |
322 | local tble = Handle:GetChildren() | |
323 | for _,v in pairs(o1:GetChildren()) do | |
324 | if v:IsA('Part') or v:IsA('WedgePart') and v ~= Handle then | |
325 | local c1 | |
326 | for _1,v1 in pairs(Welds) do | |
327 | if _1 == v then | |
328 | c1 = v1 | |
329 | break | |
330 | end | |
331 | end | |
332 | ||
333 | if not c1 then | |
334 | Welds[v] = v.CFrame:inverse()*Handle.CFrame | |
335 | v.Anchored = true | |
336 | c1 = Welds[v] | |
337 | end | |
338 | ||
339 | local Weld = Instance.new('Weld') | |
340 | Weld.Part0 = Handle | |
341 | Weld.Part1 = v | |
342 | Weld.C0 = CFrame.new() | |
343 | Weld.C1 = c1 | |
344 | Weld.Parent = Handle | |
345 | ||
346 | end | |
347 | end | |
348 | ClearOldWelds(tble) | |
349 | Handle.Anchored=false | |
350 | end | |
351 | ||
352 | Equipped() | |
353 | o1.Equipped:connect(Equipped) | |
354 | - | o11.Name = "GOREPART" |
354 | + | |
355 | - | o11.Parent = workspace |
355 | + | |
356 | - | o11.BrickColor = BrickColor.new("Maroon") |
356 | + | |
357 | - | o11.Position = Hit.Position |
357 | + | |
358 | - | o11.Rotation = Vector3.new(-180, 1.29089606, 180) |
358 | + | |
359 | - | o11.FormFactor = Enum.FormFactor.Symmetric |
359 | + | |
360 | - | o11.Size = Vector3.new(1, 2, 1) |
360 | + | |
361 | - | o11.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
361 | + | |
362 | - | o11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
362 | + | |
363 | - | o11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
363 | + | |
364 | - | o11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
364 | + | |
365 | - | o11.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
365 | + | |
366 | - | o11.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
366 | + | |
367 | - | o11.Color = Color3.new(0.458824, 0, 0) |
367 | + | |
368 | function onEquipped(mouse2) | |
369 | mouse2.KeyDown:connect(onkeyDown) | |
370 | mouse = mouse2 | |
371 | end | |
372 | o1.Equipped:connect(onEquipped) | |
373 | WhackAnim = Tool:WaitForChild("Whack") | |
374 | ChopAnim = Tool:WaitForChild("Chop") | |
375 | SliceAnim = Tool:WaitForChild("Slice") | |
376 | SlashSound = Handle:WaitForChild("SlashSound") | |
377 | - | o11.Name = "GOREPART" |
377 | + | |
378 | - | o11.Parent = workspace |
378 | + | |
379 | - | o11.BrickColor = BrickColor.new("Maroon") |
379 | + | |
380 | - | o11.Position = Hit.Position |
380 | + | |
381 | - | o11.Rotation = Vector3.new(-180, 1.29089606, 180) |
381 | + | |
382 | - | o11.FormFactor = Enum.FormFactor.Symmetric |
382 | + | |
383 | - | o11.Size = Vector3.new(1, 2, 1) |
383 | + | |
384 | - | o11.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
384 | + | |
385 | - | o11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
385 | + | |
386 | - | o11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
386 | + | |
387 | - | o11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
387 | + | |
388 | - | o11.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
388 | + | |
389 | - | o11.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
389 | + | |
390 | - | o11.Color = Color3.new(0.458824, 0, 0) |
390 | + | |
391 | Creator_Tag.Parent = humanoid | |
392 | end | |
393 | function onkeyDown(key) | |
394 | if Tool.Enabled then | |
395 | if key == "q" then | |
396 | Slice = Humanoid:LoadAnimation(SliceAnim) | |
397 | if Slice then | |
398 | Slice:Play() | |
399 | SlashSound:Play() | |
400 | wait(1) | |
401 | SlashSound:Play() | |
402 | end | |
403 | Tool.Enabled = true | |
404 | end | |
405 | end | |
406 | ||
407 | if Tool.Enabled then | |
408 | - | o11.Name = "GOREPART" |
408 | + | |
409 | - | o11.Parent = workspace |
409 | + | |
410 | - | o11.BrickColor = BrickColor.new("Maroon") |
410 | + | |
411 | - | o11.Position = Hit.Position |
411 | + | |
412 | - | o11.Rotation = Vector3.new(-180, 1.29089606, 180) |
412 | + | |
413 | - | o11.FormFactor = Enum.FormFactor.Symmetric |
413 | + | |
414 | - | o11.Size = Vector3.new(1, 2, 1) |
414 | + | |
415 | - | o11.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
415 | + | |
416 | - | o11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
416 | + | |
417 | - | o11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
417 | + | |
418 | - | o11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
418 | + | |
419 | - | o11.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
419 | + | |
420 | - | o11.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
420 | + | |
421 | - | o11.Color = Color3.new(0.458824, 0, 0) |
421 | + | |
422 | v:Destroy() | |
423 | end | |
424 | end | |
425 | end | |
426 | ||
427 | function Blow(Hit) | |
428 | if Hit.Name == "Head" then | |
429 | Hit.Anchored= false Hit.Size = Vector3.new(2, 0.2, 1) | |
430 | Hit.BrickColor = BrickColor.new("Maroon") | |
431 | o1 = Instance.new("Sound") | |
432 | o1.Parent = Hit | |
433 | o1.SoundId = "rbxassetid://429400881" | |
434 | o1:Play() | |
435 | end | |
436 | if Hit.Name == "Right Arm" then | |
437 | Hit:Destroy() | |
438 | o1 = Instance.new("Sound") | |
439 | o1.Parent = o11 | |
440 | - | o11.Name = "GOREPART" |
440 | + | |
441 | - | o11.Parent = workspace |
441 | + | |
442 | - | o11.BrickColor = BrickColor.new("Maroon") |
442 | + | |
443 | - | o11.Position = Hit.Position |
443 | + | |
444 | - | o11.Rotation = Vector3.new(-180, 1.29089606, 180) |
444 | + | |
445 | - | o11.FormFactor = Enum.FormFactor.Symmetric |
445 | + | |
446 | - | o11.Size = Vector3.new(1, 2, 1) |
446 | + | |
447 | - | o11.BackSurface = Enum.SurfaceType.SmoothNoOutlines |
447 | + | |
448 | - | o11.BottomSurface = Enum.SurfaceType.SmoothNoOutlines |
448 | + | |
449 | - | o11.FrontSurface = Enum.SurfaceType.SmoothNoOutlines |
449 | + | |
450 | - | o11.LeftSurface = Enum.SurfaceType.SmoothNoOutlines |
450 | + | |
451 | - | o11.RightSurface = Enum.SurfaceType.SmoothNoOutlines |
451 | + | |
452 | - | o11.TopSurface = Enum.SurfaceType.SmoothNoOutlines |
452 | + | |
453 | - | o11.Color = Color3.new(0.458824, 0, 0) |
453 | + | |
454 | Hit:Destroy() | |
455 | o1 = Instance.new("Sound") | |
456 | o1.Parent = o11 | |
457 | o1.SoundId = "rbxassetid://429400881" | |
458 | o1:Play() | |
459 | ||
460 | end | |
461 | if Hit.Name == "Left Arm" then | |
462 | Hit:Destroy() | |
463 | o1 = Instance.new("Sound") | |
464 | o1.Parent = o11 | |
465 | o1.SoundId = "rbxassetid://429400881" | |
466 | o1:Play() | |
467 | ||
468 | end | |
469 | ||
470 | if Hit.Name == "Left Leg" then | |
471 | Hit:Destroy() | |
472 | o1 = Instance.new("Sound") | |
473 | o1.Parent = o11 | |
474 | o1.SoundId = "rbxassetid://429400881" | |
475 | o1:Play() | |
476 | ||
477 | end | |
478 | if Hit.Name == "Left Arm" then | |
479 | ||
480 | Hit:Destroy() | |
481 | o1 = Instance.new("Sound") | |
482 | o1.Parent = o11 | |
483 | o1.SoundId = "rbxassetid://429400881" | |
484 | o1:Play() | |
485 | ||
486 | end | |
487 | if Hit.Name == "Torso" then | |
488 | o11 = Instance.new("Part") | |
489 | o2 = Instance.new("Part") | |
490 | o2.Name = "GOREPART" | |
491 | o2.Parent = workspace | |
492 | o2.BrickColor = BrickColor.new("Maroon") | |
493 | o2.Position = Hit.Position | |
494 | o2.Rotation = Vector3.new(-180, 1.29089832, 180) | |
495 | o2.CanCollide = true | |
496 | o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
497 | o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
498 | o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
499 | o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
500 | o2.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
501 | o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
502 | o2.Size = Vector3.new(2, 1, 1) | |
503 | o2.LeftSurface = Enum.SurfaceType.Weld | |
504 | o2.RightSurface = Enum.SurfaceType.Weld | |
505 | o2.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
506 | o1 = Instance.new("Part") | |
507 | o1.Name = "GOREPART" | |
508 | o1.Parent = workspace | |
509 | o1.BrickColor = BrickColor.new("Maroon") | |
510 | o1.Position = Hit.Position | |
511 | o1.Rotation = Vector3.new(-180, 1.29089832, 180) | |
512 | o1.CanCollide = true | |
513 | o1.BackSurface = Enum.SurfaceType.SmoothNoOutlines | |
514 | o1.BottomSurface = Enum.SurfaceType.SmoothNoOutlines | |
515 | o1.FrontSurface = Enum.SurfaceType.SmoothNoOutlines | |
516 | o1.LeftSurface = Enum.SurfaceType.SmoothNoOutlines | |
517 | o1.RightSurface = Enum.SurfaceType.SmoothNoOutlines | |
518 | o1.TopSurface = Enum.SurfaceType.SmoothNoOutlines | |
519 | o1.Size = Vector3.new(2, 1, 1) | |
520 | o1.LeftSurface = Enum.SurfaceType.Weld | |
521 | o1.RightSurface = Enum.SurfaceType.Weld | |
522 | o1.Color = Color3.new(0.105882, 0.164706, 0.207843) | |
523 | ||
524 | ||
525 | Hit:Destroy() | |
526 | o1 = Instance.new("Sound") | |
527 | o1.Parent = o11 | |
528 | o1.SoundId = "rbxassetid://429400881" | |
529 | o1:Play() | |
530 | ||
531 | end --registers the Hit, deals damage to the player, and if the humanoid has 0 health a kill is added into the killstreak. | |
532 | if Hit and Hit.Parent then | |
533 | local character = Hit.Parent | |
534 | local humanoid = character:FindFirstChild("Humanoid") | |
535 | if Humanoid and Humanoid ~= humanoid and humanoid and Humanoid.Health > 0 and humanoid.Health > 0 then | |
536 | local Right_Arm = Character:FindFirstChild("Right Arm") | |
537 | if Right_Arm then | |
538 | - | Player = Players:GetPlayerFromCharacter(Character) |
538 | + | |
539 | if (Joint and (Joint.Part0 == Handle or Joint.Part1 == Handle)) then | |
540 | humanoid:TakeDamage(Damage) --deal regular damage or instakill normal health players if a ninja | |
541 | UntagHumanoid(humanoid) | |
542 | TagHumanoid(humanoid, Player) | |
543 | end | |
544 | end | |
545 | end | |
546 | end | |
547 | end | |
548 | ||
549 | function Activated() --when you swing | |
550 | if Tool.Enabled then | |
551 | Tool.Enabled = false | |
552 | Whack = Humanoid:LoadAnimation(WhackAnim) | |
553 | if Whack then | |
554 | Whack:Play() | |
555 | SlashSound:Play() | |
556 | end | |
557 | wait(ReloadTime) | |
558 | Tool.Enabled = true | |
559 | end | |
560 | end | |
561 | ||
562 | function Equipped(mouse) --get everything settled up | |
563 | Character = Tool.Parent | |
564 | Player = owner | |
565 | Humanoid = Character:FindFirstChild("Humanoid") | |
566 | Torso = Character:FindFirstChild("Torso") | |
567 | if not Humanoid or not Torso then | |
568 | return | |
569 | end | |
570 | ||
571 | if not Tool.Enabled then | |
572 | wait(ReloadTime) | |
573 | Tool.Enabled = true | |
574 | end | |
575 | end | |
576 | ||
577 | function Unequipped() | |
578 | if Whack then | |
579 | Whack:Stop() | |
580 | end | |
581 | if Slice then | |
582 | Slice:Stop() | |
583 | end | |
584 | if Chop then | |
585 | Chop:Stop() | |
586 | end | |
587 | end | |
588 | ||
589 | ||
590 | Mouse_Icon = "rbxasset://textures/GunCursor.png" | |
591 | Reloading_Icon = "rbxasset://textures/GunWaitCursor.png" | |
592 | ||
593 | Tool = o1 | |
594 | ||
595 | Mouse = nil | |
596 | ||
597 | function UpdateIcon() | |
598 | if Mouse then | |
599 | Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon | |
600 | end | |
601 | end | |
602 | ||
603 | function OnEquipped(ToolMouse) | |
604 | Mouse = ToolMouse | |
605 | UpdateIcon() | |
606 | end | |
607 | ||
608 | function OnChanged(Property) | |
609 | if Property == "Enabled" then | |
610 | UpdateIcon() | |
611 | end | |
612 | end | |
613 | ||
614 | Tool.Equipped:connect(OnEquipped) | |
615 | Tool.Changed:connect(OnChanged) | |
616 | ||
617 | Tool.Activated:connect(Activated) | |
618 | Tool.Equipped:connect(Equipped) | |
619 | Tool.Unequipped:connect(Unequipped) | |
620 | ||
621 | Tool.CHOPPART.Touched:connect(Blow) |