SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code V2 by Mokiros") | |
7 | local RealPlayer = RealPlayer | |
8 | script.Parent = RealPlayer.Character | |
9 | ||
10 | --Fake event to make stuff like Mouse.KeyDown work | |
11 | local Disconnect_Function = function(this) | |
12 | this[1].Functions[this[2]] = nil | |
13 | end | |
14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
15 | local FakeEvent_Metatable = {__index={ | |
16 | Connect = function(this,f) | |
17 | local i = tostring(math.random(0,10000)) | |
18 | while this.Functions[i] do | |
19 | i = tostring(math.random(0,10000)) | |
20 | end | |
21 | this.Functions[i] = f | |
22 | return setmetatable({this,i},Disconnect_Metatable) | |
23 | end | |
24 | }} | |
25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
26 | local function fakeEvent() | |
27 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
28 | end | |
29 | ||
30 | --Creating fake input objects with fake variables | |
31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
37 | end} | |
38 | --Merged 2 functions into one by checking amount of arguments | |
39 | CAS.UnbindAction = CAS.BindAction | |
40 | ||
41 | --This function will trigger the events that have been :Connect()'ed | |
42 | local function TriggerEvent(self,ev,...) | |
43 | for _,f in pairs(self[ev].Functions) do | |
44 | f(...) | |
45 | end | |
46 | end | |
47 | FakeMouse.TriggerEvent = TriggerEvent | |
48 | UIS.TriggerEvent = TriggerEvent | |
49 | ||
50 | --Client communication | |
51 | local Event = Instance.new("RemoteEvent") | |
52 | Event.Name = "UserInput_Event" | |
53 | Event.OnServerEvent:Connect(function(plr,io) | |
54 | if plr~=RealPlayer then return end | |
55 | FakeMouse.Target = io.Target | |
56 | FakeMouse.Hit = io.Hit | |
57 | if not io.isMouse then | |
58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
61 | end | |
62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
64 | end | |
65 | for _,t in pairs(CAS.Actions) do | |
66 | for _,k in pairs(t.Keys) do | |
67 | if k==io.KeyCode then | |
68 | t.Function(t.Name,io.UserInputState,io) | |
69 | end | |
70 | end | |
71 | end | |
72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
74 | end | |
75 | end) | |
76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
77 | local Mouse = owner:GetMouse() | |
78 | local UIS = game:GetService("UserInputService") | |
79 | local input = function(io,RobloxHandled) | |
80 | if RobloxHandled then return end | |
81 | --Since InputObject is a client-side instance, we create and pass table instead | |
82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
83 | end | |
84 | UIS.InputBegan:Connect(input) | |
85 | UIS.InputEnded:Connect(input) | |
86 | ||
87 | local h,t | |
88 | --Give the server mouse data every second frame, but only if the values changed | |
89 | --If player is not moving their mouse, client won't fire events | |
90 | local HB = game:GetService("RunService").Heartbeat | |
91 | while true do | |
92 | if h~=Mouse.Hit or t~=Mouse.Target then | |
93 | h,t=Mouse.Hit,Mouse.Target | |
94 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
95 | end | |
96 | --Wait 2 frames | |
97 | for i=1,2 do | |
98 | HB:Wait() | |
99 | end | |
100 | end]==],script) | |
101 | ||
102 | ----Sandboxed game object that allows the usage of client-side methods and services | |
103 | --Real game object | |
104 | local RealGame = game | |
105 | ||
106 | --Metatable for fake service | |
107 | local FakeService_Metatable = { | |
108 | __index = function(self,k) | |
109 | local s = rawget(self,"_RealService") | |
110 | if s then | |
111 | return typeof(s[k])=="function" | |
112 | and function(_,...)return s[k](s,...)end or s[k] | |
113 | end | |
114 | end, | |
115 | __newindex = function(self,k,v) | |
116 | local s = rawget(self,"_RealService") | |
117 | if s then s[k]=v end | |
118 | end | |
119 | } | |
120 | local function FakeService(t,RealService) | |
121 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
122 | return setmetatable(t,FakeService_Metatable) | |
123 | end | |
124 | ||
125 | --Fake game object | |
126 | local FakeGame = { | |
127 | GetService = function(self,s) | |
128 | return rawget(self,s) or RealGame:GetService(s) | |
129 | end, | |
130 | Players = FakeService({ | |
131 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
132 | },"Players"), | |
133 | UserInputService = FakeService(UIS,"UserInputService"), | |
134 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
135 | RunService = FakeService({ | |
136 | _btrs = {}, | |
137 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
138 | BindToRenderStep = function(self,name,_,fun) | |
139 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
140 | end, | |
141 | UnbindFromRenderStep = function(self,name) | |
142 | self._btrs[name]:Disconnect() | |
143 | end, | |
144 | },"RunService") | |
145 | } | |
146 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
147 | FakeGame.service = FakeGame.GetService | |
148 | FakeService(FakeGame,game) | |
149 | --Changing owner to fake player object to support owner:GetMouse() | |
150 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
151 | end | |
152 | ||
153 | local oc = oc or function(...) return ... end | |
154 | ||
155 | function weld(p0,p1,c0,c1,par) | |
156 | local w = Instance.new("Weld",p0 or par) | |
157 | w.Part0 = p0 | |
158 | w.Part1 = p1 | |
159 | w.C0 = c0 or CFrame.new() | |
160 | w.C1 = c1 or CFrame.new() | |
161 | return w | |
162 | end | |
163 | ||
164 | function lerp(a, b, t) | |
165 | return a + (b - a)*t | |
166 | end | |
167 | ||
168 | do | |
169 | local function QuaternionFromCFrame(cf) local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() local trace = m00 + m11 + m22 if trace > 0 then local s = math.sqrt(1 + trace) local recip = 0.5/s return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 else local i = 0 if m11 > m00 then i = 1 end if m22 > (i == 0 and m00 or m11) then i = 2 end if i == 0 then local s = math.sqrt(m00-m11-m22+1) local recip = 0.5/s return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip elseif i == 1 then local s = math.sqrt(m11-m22-m00+1) local recip = 0.5/s return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip elseif i == 2 then local s = math.sqrt(m22-m00-m11+1) local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip end end end | |
170 | ||
171 | local function QuaternionToCFrame(px, py, pz, x, y, z, w) local xs, ys, zs = x + x, y + y, z + z local wx, wy, wz = w*xs, w*ys, w*zs local xx = x*xs local xy = x*ys local xz = x*zs local yy = y*ys local yz = y*zs local zz = z*zs return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) end | |
172 | ||
173 | local function QuaternionSlerp(a, b, t) local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] local startInterp, finishInterp; if cosTheta >= 0.0001 then if (1 - cosTheta) > 0.0001 then local theta = math.acos(cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((1-t)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = 1-t finishInterp = t end else if (1+cosTheta) > 0.0001 then local theta = math.acos(-cosTheta) local invSinTheta = 1/math.sin(theta) startInterp = math.sin((t-1)*theta)*invSinTheta finishInterp = math.sin(t*theta)*invSinTheta else startInterp = t-1 finishInterp = t end end return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp end | |
174 | ||
175 | function clerp(a,b,t) | |
176 | local qa = {QuaternionFromCFrame(a)} | |
177 | local qb = {QuaternionFromCFrame(b)} | |
178 | local ax, ay, az = a.x, a.y, a.z | |
179 | local bx, by, bz = b.x, b.y, b.z | |
180 | ||
181 | local _t = 1-t | |
182 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
183 | end | |
184 | end | |
185 | local his = {} | |
186 | ||
187 | function ctween(tar,prop,c2,t,b) | |
188 | local function doIt() | |
189 | local now = tick() | |
190 | his[tar] = now | |
191 | local c1 = tar[prop] | |
192 | for i=1,t do | |
193 | if his[tar] ~= now then return end | |
194 | tar[prop] = clerp(c1,c2,1/t*i) | |
195 | wait(1/60) | |
196 | end | |
197 | end | |
198 | if b then coroutine.wrap(doIt)() else doIt() end | |
199 | end | |
200 | ||
201 | function tickwave(time,length,offset) | |
202 | return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length | |
203 | end | |
204 | ||
205 | function playSound(id,parent,volume,pitch) | |
206 | local sound = Instance.new("Sound",parent or workspace) | |
207 | sound.SoundId = "http://www.roblox.com/asset?id="..id | |
208 | sound.Volume = volume or 1 | |
209 | sound.Pitch = pitch or 1 | |
210 | coroutine.wrap(function() | |
211 | wait() | |
212 | sound:Play() | |
213 | wait(10) | |
214 | sound:Stop() | |
215 | sound:Destroy() | |
216 | end)() | |
217 | return sound | |
218 | end | |
219 | ||
220 | local plr = game.Players.LocalPlayer | |
221 | local char = plr.Character | |
222 | local mouse = plr:GetMouse() | |
223 | ||
224 | local nk = char.Torso.Neck | |
225 | local nk0 = CFrame.new(0,1,0) * CFrame.Angles(-math.pi/2,0,math.pi) | |
226 | local ra,la = char["Right Arm"], char["Left Arm"] | |
227 | ra:BreakJoints() | |
228 | la:BreakJoints() | |
229 | local rs = weld(char.Torso,ra,CFrame.new(1.25,.5,0), CFrame.new(-.25,.5,0),stuff) | |
230 | local ls = weld(char.Torso,la,CFrame.new(-1.25,.5,0), CFrame.new(.25,.5,0),stuff) | |
231 | ls.Part1.FrontSurface = "Hinge" | |
232 | rs.Part1.FrontSurface = "Hinge" | |
233 | local rs0 = rs.C0 | |
234 | local ls0 = ls.C0 | |
235 | ||
236 | local color1 = BrickColor.new("Dark gray") | |
237 | local color2 = BrickColor.new("Navy blue") | |
238 | ||
239 | local stuff = Instance.new("Model",char) | |
240 | pcall(function() char["Hammur"]:Destroy() end) | |
241 | stuff.Name = "Hammur" | |
242 | wait(.5) | |
243 | local handle = Instance.new("Part") | |
244 | handle.FormFactor = "Custom" | |
245 | handle.BrickColor = color1 | |
246 | handle.Reflectance = .25 | |
247 | - | handle.Size = Vector3.new(.5,5,.5) |
247 | + | handle.Size = Vector3.new(.5,8,.5) |
248 | handle.TopSurface = "Smooth" | |
249 | handle.BottomSurface = "Smooth" | |
250 | handle.CanCollide = false | |
251 | handle.Parent = stuff | |
252 | ||
253 | - | local grip = weld(char["Right Arm"],handle,CFrame.new(0,-.95,0)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,-1.4,0)) |
253 | + | local grip = weld(char["Right Arm"],handle,CFrame.new(0,-.95,0)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,-3.4,0)) |
254 | local grip0 = grip.C0 | |
255 | local hamend = handle:Clone() | |
256 | Instance.new("BlockMesh",hamend) | |
257 | hamend.Parent = stuff | |
258 | hamend.Size = Vector3.new(2,2,3.5) | |
259 | local hamwel = weld(handle,hamend,CFrame.new(0,3,0)) | |
260 | local hamsd1 = hamend:Clone() | |
261 | hamsd1.Mesh.Scale = Vector3.new(1,1,1) | |
262 | hamsd1.Parent = stuff | |
263 | hamsd1.Size = Vector3.new(2.3,2.3,.3) | |
264 | weld(hamend,hamsd1,CFrame.new(0,0,1.75)) | |
265 | local hamsd2 = hamsd1:Clone() | |
266 | hamsd2.Parent = stuff | |
267 | weld(hamend,hamsd2,CFrame.new(0,0,-1.75)) | |
268 | local hamp = hamsd1:Clone() | |
269 | hamp.Parent = stuff | |
270 | hamp.Size = Vector3.new(.2,.2,3.5) | |
271 | weld(hamend,hamp,CFrame.new(.95,.95,0)) | |
272 | hamp = hamp:Clone() | |
273 | hamp.Parent = stuff | |
274 | weld(hamend,hamp,CFrame.new(.95,-.95,0)) | |
275 | hamp = hamp:Clone() | |
276 | hamp.Parent = stuff | |
277 | weld(hamend,hamp,CFrame.new(-.95,-.95,0)) | |
278 | hamp = hamp:Clone() | |
279 | hamp.Parent = stuff | |
280 | weld(hamend,hamp,CFrame.new(-.95,.95,0)) | |
281 | hamp = hamp:Clone() | |
282 | hamp.BrickColor = color2 | |
283 | hamp.Reflectance = .2 | |
284 | hamp.Size = Vector3.new(.2,.2,2.5) | |
285 | hamp.Parent = stuff | |
286 | weld(hamend,hamp,CFrame.new(0,.95,0)) | |
287 | hamp = hamp:Clone() | |
288 | hamp.Parent = stuff | |
289 | weld(hamend,hamp,CFrame.new(0,-.95,0)) | |
290 | hamp = hamp:Clone() | |
291 | hamp.Parent = stuff | |
292 | weld(hamend,hamp,CFrame.new(.95,0,0)) | |
293 | hamp = hamp:Clone() | |
294 | hamp.Parent = stuff | |
295 | weld(hamend,hamp,CFrame.new(-.95,0,0)) | |
296 | hamp = handle:Clone() | |
297 | hamp.BrickColor = color2 | |
298 | hamp.Reflectance = .2 | |
299 | hamp.Parent = stuff | |
300 | hamp.Size = Vector3.new(.4,.2,.4) | |
301 | Instance.new("CylinderMesh",hamp) | |
302 | weld(hamend,hamp,CFrame.new(0,-.955,1.2)) | |
303 | hamp = hamp:Clone() | |
304 | hamp.Parent = stuff | |
305 | weld(hamend,hamp,CFrame.new(0,-.955,-1.2)) | |
306 | hamp = hamp:Clone() | |
307 | hamp.Parent = stuff | |
308 | weld(hamend,hamp,CFrame.new(0,.955,1.2)) | |
309 | hamp = hamp:Clone() | |
310 | hamp.Parent = stuff | |
311 | weld(hamend,hamp,CFrame.new(0,.955,-1.2)) | |
312 | hamp = hamp:Clone() | |
313 | hamp.Parent = stuff | |
314 | weld(hamend,hamp,CFrame.new(.955,0,-1.2) * CFrame.Angles(0,0,math.rad(90))) | |
315 | hamp = hamp:Clone() | |
316 | hamp.Parent = stuff | |
317 | weld(hamend,hamp,CFrame.new(.955,0,1.2) * CFrame.Angles(0,0,math.rad(90))) | |
318 | hamp = hamp:Clone() | |
319 | hamp.Parent = stuff | |
320 | weld(hamend,hamp,CFrame.new(-.955,0,-1.2) * CFrame.Angles(0,0,math.rad(90))) | |
321 | hamp = hamp:Clone() | |
322 | hamp.Parent = stuff | |
323 | weld(hamend,hamp,CFrame.new(-.955,0,1.2) * CFrame.Angles(0,0,math.rad(90))) | |
324 | hamp = hamp:Clone() | |
325 | hamp.Parent = stuff | |
326 | weld(hamend,hamp,CFrame.new(.6,.955,0)) | |
327 | hamp = hamp:Clone() | |
328 | hamp.Parent = stuff | |
329 | weld(hamend,hamp,CFrame.new(-.6,.955,0)) | |
330 | hamp = hamp:Clone() | |
331 | hamp.Parent = stuff | |
332 | weld(hamend,hamp,CFrame.new(.6,-.955,0)) | |
333 | hamp = hamp:Clone() | |
334 | hamp.Parent = stuff | |
335 | weld(hamend,hamp,CFrame.new(-.6,-.955,0)) | |
336 | hamp = hamp:Clone() | |
337 | hamp.Parent = stuff | |
338 | weld(hamend,hamp,CFrame.new(-.955,.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
339 | hamp = hamp:Clone() | |
340 | hamp.Parent = stuff | |
341 | weld(hamend,hamp,CFrame.new(-.955,-.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
342 | hamp = hamp:Clone() | |
343 | hamp.Parent = stuff | |
344 | weld(hamend,hamp,CFrame.new(.955,.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
345 | hamp = hamp:Clone() | |
346 | hamp.Parent = stuff | |
347 | weld(hamend,hamp,CFrame.new(.955,-.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
348 | local luacyl = hamp:Clone() | |
349 | luacyl.BrickColor = BrickColor.Blue() | |
350 | luacyl.Parent = stuff | |
351 | luacyl.Mesh.Scale = Vector3.new(1,.2,1) | |
352 | luacyl.Size = Vector3.new(2,.2,2) | |
353 | weld(hamsd1,luacyl,CFrame.new(0,0,.14) * CFrame.Angles(math.rad(90),0,0)) | |
354 | hamp = luacyl:Clone() | |
355 | hamp.BrickColor = BrickColor.White() | |
356 | hamp.Parent = stuff | |
357 | hamp.Size = Vector3.new(.7,.2,.7) | |
358 | weld(luacyl,hamp,CFrame.new(.35,.01,-.35)) | |
359 | local luamoon = luacyl:Clone() | |
360 | luamoon.Parent = stuff | |
361 | luamoon.Size = Vector3.new(.7,.2,.7) | |
362 | local mnw = weld(luacyl,luamoon,CFrame.new(1.2,.02,-1.2)) | |
363 | for r = 1,180,10 do | |
364 | local r2 = 2 * (math.pi/180*r) | |
365 | local l = hamsd1:Clone() | |
366 | l.Parent = stuff | |
367 | l.BrickColor = luacyl.BrickColor | |
368 | l.Size = Vector3.new(.3,.2,.2) | |
369 | l.Mesh.Scale = Vector3.new(1,.3,.3) | |
370 | weld(luacyl,l,CFrame.new(Vector3.new(math.sin(r2)*1.7,0,math.cos(r2)*1.7),Vector3.new())) | |
371 | end | |
372 | local luamoon2 = luacyl:Clone() | |
373 | luamoon2.Parent = stuff | |
374 | luamoon2.Size = Vector3.new(.7,.6,.7) | |
375 | luamoon2.Transparency = "0.7" | |
376 | local mnw = weld(luacyl,luamoon,CFrame.new(1.2,.02,-1.2)) | |
377 | for r = 1,180,10 do | |
378 | local r2 = 2 * (math.pi/180*r) | |
379 | local l = hamsd1:Clone() | |
380 | l.Parent = stuff | |
381 | l.BrickColor = luacyl.BrickColor | |
382 | l.Size = Vector3.new(.3,.2,.2) | |
383 | l.Mesh.Scale = Vector3.new(1,.3,.3) | |
384 | weld(luacyl,l,CFrame.new(Vector3.new(math.sin(r2)*1.7,0,math.cos(r2)*1.7),Vector3.new())) | |
385 | end | |
386 | hamp = hamend:Clone() | |
387 | hamp.BrickColor = color2 | |
388 | hamp.Reflectance = .2 | |
389 | hamp.Size = Vector3.new(.2,.2,3.5) | |
390 | hamp.Mesh.Scale = Vector3.new(.25,.25,1) | |
391 | hamp.Parent = stuff | |
392 | weld(hamend,hamp,CFrame.new(-1.05,.95,0)) | |
393 | hamp = hamp:Clone() | |
394 | hamp.Parent = stuff | |
395 | weld(hamend,hamp,CFrame.new(-.95,1.05,0)) | |
396 | hamp = hamp:Clone() | |
397 | hamp.Parent = stuff | |
398 | weld(hamend,hamp,CFrame.new(1.05,.95,0)) | |
399 | hamp = hamp:Clone() | |
400 | hamp.Parent = stuff | |
401 | weld(hamend,hamp,CFrame.new(.95,1.05,0)) | |
402 | hamp = hamp:Clone() | |
403 | hamp.Parent = stuff | |
404 | weld(hamend,hamp,CFrame.new(1.05,-.95,0)) | |
405 | hamp = hamp:Clone() | |
406 | hamp.Parent = stuff | |
407 | weld(hamend,hamp,CFrame.new(.95,-1.05,0)) | |
408 | hamp = hamp:Clone() | |
409 | hamp.Parent = stuff | |
410 | weld(hamend,hamp,CFrame.new(-1.05,-.95,0)) | |
411 | hamp = hamp:Clone() | |
412 | hamp.Parent = stuff | |
413 | weld(hamend,hamp,CFrame.new(-.95,-1.05,0)) | |
414 | for x = -1,1 do | |
415 | for y = -1,1 do | |
416 | hamp = hamp:Clone() | |
417 | hamp.Mesh.Scale = Vector3.new(1,1,1) | |
418 | hamp.Size = Vector3.new(.5,.5,.2) | |
419 | hamp.Parent = stuff | |
420 | weld(hamsd2,hamp,CFrame.new(x*.7,y*.7,-.1)) | |
421 | end | |
422 | end | |
423 | ||
424 | rs.C0 = rs0 * CFrame.Angles(math.rad(70),math.rad(50),math.rad(-20)) | |
425 | ls.C0 = ls0 * CFrame.new(.4,.2,-.3) * CFrame.Angles(math.rad(110),math.rad(0),math.rad(00)) * CFrame.Angles(0,math.rad(60),0) | |
426 | ||
427 | function endScript() | |
428 | pcall(function() runcon:disconnect() end) | |
429 | pcall(function() kdcon:disconnect() end) | |
430 | pcall(function() kucon:disconnect() end) | |
431 | pcall(game.Destroy,stuff) | |
432 | pcall(game.Destroy,bg) | |
433 | pcall(game.Destroy,bv) | |
434 | end | |
435 | ||
436 | local spintime = 3 | |
437 | local idling = true | |
438 | ||
439 | runcon = game:GetService("RunService").Stepped:connect(oc(function() | |
440 | if not stuff:IsDescendantOf(workspace) then | |
441 | endScript() | |
442 | end | |
443 | local an = (tick()%spintime)*360/spintime | |
444 | mnw.C0 = CFrame.Angles(0,math.rad(an),0) * CFrame.new(0,.04,1.7) | |
445 | if idling then | |
446 | rs.C0 = clerp(rs.C0,rs0 * CFrame.Angles(math.rad(70+tickwave(3,5)),math.rad(50),math.rad(-20)),.4) | |
447 | ls.C0 = clerp(ls.C0,ls0 * CFrame.new(.4,.2,-.3) * CFrame.Angles(math.rad(115+tickwave(3,5)),math.rad(0),math.rad(-5)) * CFrame.Angles(0,math.rad(60),0),.4) | |
448 | nk.C0 = clerp(nk.C0,nk0 * CFrame.Angles(tickwave(4,-.1),0,0),.4) | |
449 | grip.C0 = clerp(grip.C0,grip0,.4) | |
450 | end | |
451 | end)) | |
452 | ||
453 | function cfot(tar,cf,t) | |
454 | coroutine.wrap(function() | |
455 | for i=1,t do | |
456 | tar.CFrame = tar.CFrame * cf | |
457 | wait(1/30) | |
458 | end | |
459 | end)() | |
460 | end | |
461 | ||
462 | function DoDamage(hum,dmg) | |
463 | if hum.Health == 0 then return end | |
464 | local a,b = ypcall(function() | |
465 | --hum:TakeDamage(dmg) | |
466 | hum.Health = hum.Health - dmg | |
467 | if not hum.Parent:FindFirstChild("Torso") then return end | |
468 | local m = Instance.new("Model",workspace) | |
469 | m.Name = -dmg | |
470 | local h = Instance.new("Humanoid",m) | |
471 | h.MaxHealth = 0 | |
472 | local p = Instance.new("Part",m) | |
473 | p.Name = "Head" | |
474 | p.FormFactor = "Custom" | |
475 | p.Size = Vector3.new(.2,.2,.2) | |
476 | p.Transparency = 0.97 | |
477 | p.CanCollide = false | |
478 | p.Anchored = true | |
479 | p:BreakJoints() | |
480 | game.Debris:AddItem(m,5) | |
481 | p.CFrame = CFrame.new(hum.Parent.Torso.Position) * CFrame.new(math.random(-2,2),2.5,math.random(-2,2)) | |
482 | local rAm = math.random(3,6)/100 | |
483 | coroutine.wrap(function() | |
484 | for i=1,300 do | |
485 | p.CFrame = p.CFrame * CFrame.new(0,rAm,0) | |
486 | wait() | |
487 | end | |
488 | p:Destroy() | |
489 | end)() | |
490 | end) | |
491 | if not a then print(b) end | |
492 | end | |
493 | ||
494 | local stuff = Instance.new("Model",char) | |
495 | pcall(function() char["Hammur"]:Destroy() end) | |
496 | stuff.Name = "Hammur" | |
497 | wait(.5) | |
498 | local handle = Instance.new("Part") | |
499 | handle.FormFactor = "Custom" | |
500 | handle.BrickColor = color1 | |
501 | handle.Reflectance = .25 | |
502 | handle.Size = Vector3.new(.5,8,.5) | |
503 | handle.TopSurface = "Smooth" | |
504 | handle.BottomSurface = "Smooth" | |
505 | handle.CanCollide = false | |
506 | handle.Parent = stuff | |
507 | - | playSound(105374058,hamend,1,1) |
507 | + | |
508 | local grip2 = weld(char["Left Arm"],handle,CFrame.new(0,-.95,0)*CFrame.Angles(math.rad(-90),0,0),CFrame.new(0,-3.4,0)) | |
509 | local grip2 = grip.C0 | |
510 | local hamend2 = handle:Clone() | |
511 | Instance.new("BlockMesh",hamend) | |
512 | hamend2.Parent = stuff | |
513 | - | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(60)),13) |
513 | + | hamend2.Size = Vector3.new(2,2,3.5) |
514 | local hamwel = weld(handle,hamend,CFrame.new(0,3,0)) | |
515 | local hamsd2 = hamend:Clone() | |
516 | hamsd2.Mesh.Scale = Vector3.new(1,1,1) | |
517 | hamsd2.Parent = stuff | |
518 | hamsd2.Size = Vector3.new(2.3,2.3,.3) | |
519 | weld(hamend2,hamsd3,CFrame.new(0,0,1.75)) | |
520 | local hamsd2 = hamsd2:Clone() | |
521 | - | hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-20 |
521 | + | hamsd3.Parent = stuff |
522 | weld(hamend2,hamsd3,CFrame.new(0,0,-1.75)) | |
523 | local hamp2 = hamsd3:Clone() | |
524 | hamp2.Parent = stuff | |
525 | hamp2.Size = Vector3.new(.2,.2,3.5) | |
526 | weld(hamend2,hamp2,CFrame.new(.95,.95,0)) | |
527 | hamp2 = hamp2:Clone() | |
528 | hamp2.Parent = stuff | |
529 | weld2(hamend,hamp,CFrame.new(.95,-.95,0)) | |
530 | hamp2 = hamp2:Clone() | |
531 | hamp2.Parent = stuff | |
532 | weld(hamend,hamp,CFrame.new(-.95,-.95,0)) | |
533 | hamp2 = hamp2:Clone() | |
534 | hamp2.Parent = stuff | |
535 | weld(hamend,hamp,CFrame.new(-.95,.95,0)) | |
536 | hamp2 = hamp2:Clone() | |
537 | hamp2.BrickColor = color2 | |
538 | hamp2.Reflectance = .2 | |
539 | hamp2.Size = Vector3.new(.2,.2,2.5) | |
540 | hamp2.Parent = stuff | |
541 | weld(hamend,hamp,CFrame.new(0,.95,0)) | |
542 | hamp2 = hamp2:Clone() | |
543 | hamp2.Parent = stuff | |
544 | weld(hamend,hamp,CFrame.new(0,-.95,0)) | |
545 | hamp = hamp:Clone() | |
546 | hamp.Parent = stuff | |
547 | weld(hamend,hamp,CFrame.new(.95,0,0)) | |
548 | - | playSound(105374058,hamend,1,1) |
548 | + | |
549 | hamp.Parent = stuff | |
550 | weld(hamend,hamp,CFrame.new(-.95,0,0)) | |
551 | hamp = handle:Clone() | |
552 | hamp.BrickColor = color2 | |
553 | hamp.Reflectance = .2 | |
554 | hamp.Parent = stuff | |
555 | hamp.Size = Vector3.new(.4,.2,.4) | |
556 | - | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(-30)),13) |
556 | + | |
557 | weld(hamend,hamp,CFrame.new(0,-.955,1.2)) | |
558 | hamp = hamp:Clone() | |
559 | hamp.Parent = stuff | |
560 | weld(hamend,hamp,CFrame.new(0,-.955,-1.2)) | |
561 | hamp = hamp:Clone() | |
562 | hamp.Parent = stuff | |
563 | weld(hamend,hamp,CFrame.new(0,.955,1.2)) | |
564 | - | hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-20 |
564 | + | |
565 | hamp.Parent = stuff | |
566 | weld(hamend,hamp,CFrame.new(0,.955,-1.2)) | |
567 | hamp = hamp:Clone() | |
568 | hamp.Parent = stuff | |
569 | weld(hamend,hamp,CFrame.new(.955,0,-1.2) * CFrame.Angles(0,0,math.rad(90))) | |
570 | hamp = hamp:Clone() | |
571 | hamp.Parent = stuff | |
572 | weld(hamend,hamp,CFrame.new(.955,0,1.2) * CFrame.Angles(0,0,math.rad(90))) | |
573 | hamp = hamp:Clone() | |
574 | hamp.Parent = stuff | |
575 | weld(hamend,hamp,CFrame.new(-.955,0,-1.2) * CFrame.Angles(0,0,math.rad(90))) | |
576 | hamp = hamp:Clone() | |
577 | hamp.Parent = stuff | |
578 | weld(hamend,hamp,CFrame.new(-.955,0,1.2) * CFrame.Angles(0,0,math.rad(90))) | |
579 | hamp = hamp:Clone() | |
580 | - | ctween(rs,"C0",rs0*CFrame.new(-.9,0,-.9) * CFrame.Angles(math.rad(50),math.rad(5),math.rad(-50)),7) |
580 | + | |
581 | weld(hamend,hamp,CFrame.new(.6,.955,0)) | |
582 | hamp = hamp:Clone() | |
583 | hamp.Parent = stuff | |
584 | weld(hamend,hamp,CFrame.new(-.6,.955,0)) | |
585 | hamp = hamp:Clone() | |
586 | hamp.Parent = stuff | |
587 | weld(hamend,hamp,CFrame.new(.6,-.955,0)) | |
588 | hamp = hamp:Clone() | |
589 | hamp.Parent = stuff | |
590 | weld(hamend,hamp,CFrame.new(-.6,-.955,0)) | |
591 | hamp = hamp:Clone() | |
592 | hamp.Parent = stuff | |
593 | weld(hamend,hamp,CFrame.new(-.955,.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
594 | hamp = hamp:Clone() | |
595 | hamp.Parent = stuff | |
596 | weld(hamend,hamp,CFrame.new(-.955,-.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
597 | hamp = hamp:Clone() | |
598 | - | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(70),math.rad(0),math.rad(-30)),7,true) |
598 | + | |
599 | weld(hamend,hamp,CFrame.new(.955,.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
600 | hamp = hamp:Clone() | |
601 | hamp.Parent = stuff | |
602 | weld(hamend,hamp,CFrame.new(.955,-.6,0) * CFrame.Angles(0,0,math.rad(90))) | |
603 | local luacyl = hamp:Clone() | |
604 | luacyl.BrickColor = BrickColor.Blue() | |
605 | luacyl.Parent = stuff | |
606 | luacyl.Mesh.Scale = Vector3.new(1,.2,1) | |
607 | luacyl.Size = Vector3.new(2,.2,2) | |
608 | weld(hamsd1,luacyl,CFrame.new(0,0,.14) * CFrame.Angles(math.rad(90),0,0)) | |
609 | hamp = luacyl:Clone() | |
610 | hamp.BrickColor = BrickColor.White() | |
611 | hamp.Parent = stuff | |
612 | hamp.Size = Vector3.new(.7,.2,.7) | |
613 | weld(luacyl,hamp,CFrame.new(.35,.01,-.35)) | |
614 | local luamoon = luacyl:Clone() | |
615 | luamoon.Parent = stuff | |
616 | luamoon.Size = Vector3.new(.7,.2,.7) | |
617 | local mnw = weld(luacyl,luamoon,CFrame.new(1.2,.02,-1.2)) | |
618 | for r = 1,180,10 do | |
619 | local r2 = 2 * (math.pi/180*r) | |
620 | local l = hamsd1:Clone() | |
621 | l.Parent = stuff | |
622 | l.BrickColor = luacyl.BrickColor | |
623 | l.Size = Vector3.new(.3,.2,.2) | |
624 | l.Mesh.Scale = Vector3.new(1,.3,.3) | |
625 | weld(luacyl,l,CFrame.new(Vector3.new(math.sin(r2)*1.7,0,math.cos(r2)*1.7),Vector3.new())) | |
626 | end | |
627 | local luamoon2 = luacyl:Clone() | |
628 | luamoon2.Parent = stuff | |
629 | luamoon2.Size = Vector3.new(.7,.6,.7) | |
630 | luamoon2.Transparency = "0.7" | |
631 | local mnw = weld(luacyl,luamoon,CFrame.new(1.2,.02,-1.2)) | |
632 | for r = 1,180,10 do | |
633 | local r2 = 2 * (math.pi/180*r) | |
634 | local l = hamsd1:Clone() | |
635 | l.Parent = stuff | |
636 | l.BrickColor = luacyl.BrickColor | |
637 | l.Size = Vector3.new(.3,.2,.2) | |
638 | l.Mesh.Scale = Vector3.new(1,.3,.3) | |
639 | weld(luacyl,l,CFrame.new(Vector3.new(math.sin(r2)*1.7,0,math.cos(r2)*1.7),Vector3.new())) | |
640 | end | |
641 | hamp = hamend:Clone() | |
642 | hamp.BrickColor = color2 | |
643 | hamp.Reflectance = .2 | |
644 | hamp.Size = Vector3.new(.2,.2,3.5) | |
645 | hamp.Mesh.Scale = Vector3.new(.25,.25,1) | |
646 | hamp.Parent = stuff | |
647 | weld(hamend,hamp,CFrame.new(-1.05,.95,0)) | |
648 | hamp = hamp:Clone() | |
649 | hamp.Parent = stuff | |
650 | weld(hamend,hamp,CFrame.new(-.95,1.05,0)) | |
651 | hamp = hamp:Clone() | |
652 | hamp.Parent = stuff | |
653 | weld(hamend,hamp,CFrame.new(1.05,.95,0)) | |
654 | hamp = hamp:Clone() | |
655 | hamp.Parent = stuff | |
656 | weld(hamend,hamp,CFrame.new(.95,1.05,0)) | |
657 | hamp = hamp:Clone() | |
658 | hamp.Parent = stuff | |
659 | weld(hamend,hamp,CFrame.new(1.05,-.95,0)) | |
660 | hamp = hamp:Clone() | |
661 | hamp.Parent = stuff | |
662 | weld(hamend,hamp,CFrame.new(.95,-1.05,0)) | |
663 | hamp = hamp:Clone() | |
664 | hamp.Parent = stuff | |
665 | weld(hamend,hamp,CFrame.new(-1.05,-.95,0)) | |
666 | hamp = hamp:Clone() | |
667 | hamp.Parent = stuff | |
668 | weld(hamend,hamp,CFrame.new(-.95,-1.05,0)) | |
669 | for x = -1,1 do | |
670 | for y = -1,1 do | |
671 | hamp = hamp:Clone() | |
672 | hamp.Mesh.Scale = Vector3.new(1,1,1) | |
673 | hamp.Size = Vector3.new(.5,.5,.2) | |
674 | hamp.Parent = stuff | |
675 | weld(hamsd2,hamp,CFrame.new(x*.7,y*.7,-.1)) | |
676 | end | |
677 | end | |
678 | ||
679 | rs.C0 = rs0 * CFrame.Angles(math.rad(70),math.rad(50),math.rad(-20)) | |
680 | ls.C0 = ls0 * CFrame.new(.4,.2,-.3) * CFrame.Angles(math.rad(110),math.rad(0),math.rad(00)) * CFrame.Angles(0,math.rad(60),0) | |
681 | ||
682 | function endScript() | |
683 | pcall(function() runcon:disconnect() end) | |
684 | pcall(function() kdcon:disconnect() end) | |
685 | pcall(function() kucon:disconnect() end) | |
686 | pcall(game.Destroy,stuff) | |
687 | pcall(game.Destroy,bg) | |
688 | pcall(game.Destroy,bv) | |
689 | end | |
690 | ||
691 | local spintime = 3 | |
692 | local idling = true | |
693 | ||
694 | runcon = game:GetService("RunService").Stepped:connect(oc(function() | |
695 | if not stuff:IsDescendantOf(workspace) then | |
696 | endScript() | |
697 | end | |
698 | local an = (tick()%spintime)*360/spintime | |
699 | mnw.C0 = CFrame.Angles(0,math.rad(an),0) * CFrame.new(0,.04,1.7) | |
700 | if idling then | |
701 | rs.C0 = clerp(rs.C0,rs0 * CFrame.Angles(math.rad(70+tickwave(3,5)),math.rad(50),math.rad(-20)),.4) | |
702 | ls.C0 = clerp(ls.C0,ls0 * CFrame.new(.4,.2,-.3) * CFrame.Angles(math.rad(115+tickwave(3,5)),math.rad(0),math.rad(-5)) * CFrame.Angles(0,math.rad(60),0),.4) | |
703 | nk.C0 = clerp(nk.C0,nk0 * CFrame.Angles(tickwave(4,-.1),0,0),.4) | |
704 | grip.C0 = clerp(grip.C0,grip0,.4) | |
705 | end | |
706 | end)) | |
707 | ||
708 | function cfot(tar,cf,t) | |
709 | coroutine.wrap(function() | |
710 | for i=1,t do | |
711 | tar.CFrame = tar.CFrame * cf | |
712 | wait(1/30) | |
713 | end | |
714 | end)() | |
715 | end | |
716 | ||
717 | function DoDamage(hum,dmg) | |
718 | if hum.Health == 0 then return end | |
719 | local a,b = ypcall(function() | |
720 | --hum:TakeDamage(dmg) | |
721 | hum.Health = hum.Health - dmg | |
722 | if not hum.Parent:FindFirstChild("Torso") then return end | |
723 | local m = Instance.new("Model",workspace) | |
724 | m.Name = -dmg | |
725 | local h = Instance.new("Humanoid",m) | |
726 | h.MaxHealth = 0 | |
727 | local p = Instance.new("Part",m) | |
728 | p.Name = "Head" | |
729 | p.FormFactor = "Custom" | |
730 | p.Size = Vector3.new(.2,.2,.2) | |
731 | p.Transparency = 0.97 | |
732 | p.CanCollide = false | |
733 | p.Anchored = true | |
734 | p:BreakJoints() | |
735 | game.Debris:AddItem(m,5) | |
736 | p.CFrame = CFrame.new(hum.Parent.Torso.Position) * CFrame.new(math.random(-2,2),2.5,math.random(-2,2)) | |
737 | local rAm = math.random(3,6)/100 | |
738 | coroutine.wrap(function() | |
739 | for i=1,300 do | |
740 | p.CFrame = p.CFrame * CFrame.new(0,rAm,0) | |
741 | wait() | |
742 | end | |
743 | p:Destroy() | |
744 | end)() | |
745 | end) | |
746 | if not a then print(b) end | |
747 | end | |
748 | ||
749 | local atdeb = false | |
750 | local basiccombo = 0 | |
751 | local basiccombotimer = 0 | |
752 | bg = Instance.new("BodyGyro",char.Torso) | |
753 | bg.maxTorque = Vector3.new(1,0,1)*9e10 | |
754 | bg.P = 10000 | |
755 | bg.D = 500 | |
756 | bv = Instance.new("BodyVelocity",char.Torso) | |
757 | bv.maxForce = Vector3.new() | |
758 | bv.P = 50000 | |
759 | ||
760 | kucon = mouse.KeyUp:connect(oc(function(k) | |
761 | if k == "0" and sprint then | |
762 | pcall(function() char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed / 1.5 end) | |
763 | sprint = false | |
764 | end | |
765 | end)) | |
766 | ||
767 | kdcon = mouse.KeyDown:connect(oc(function(k) | |
768 | if k == "0" and not sprint then | |
769 | pcall(function() char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed * 1.5 end) | |
770 | sprint = true | |
771 | end | |
772 | if k == "f" then | |
773 | if atdeb then return end | |
774 | atdeb = true | |
775 | idling = false | |
776 | ||
777 | --- bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(7),0,0) | |
778 | -- ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-20),0,0),7,true) | |
779 | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(150),math.rad(0),math.rad(-90)),7) | |
780 | ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(30)),13,true) | |
781 | ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-35),0,0),13,true) | |
782 | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.12) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(10)),50) | |
783 | playSound(92597296,hamend,1,1.07) | |
784 | local s = playSound(96626016,hamend) | |
785 | s.Volume = 0 | |
786 | local hitcon | |
787 | hitcon = hamend.Touched:connect(function(hit) | |
788 | s.Volume = 1 | |
789 | if not hit.Anchored then | |
790 | hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-40 | |
791 | end | |
792 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
793 | if hum and not hum:IsDescendantOf(char) then | |
794 | DoDamage(hum,30) | |
795 | hum.PlatformStand = true | |
796 | wait(.6) | |
797 | hum.PlatformStand = false | |
798 | end | |
799 | end) | |
800 | bg.maxTorque = Vector3.new(1,1,3)*9e10 | |
801 | ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(35),math.rad(0),math.rad(30)),4,true) | |
802 | ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(35),0,0),4,true) | |
803 | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(35),math.rad(0),math.rad(-30)),4) | |
804 | if workspace:FindPartOnRay(Ray.new(hamend.Position,hamend.CFrame.lookVector*3),char) then | |
805 | s.Volume = 1 | |
806 | end | |
807 | wait(.2) | |
808 | bg.maxTorque = Vector3.new(1,0,3)*9e10 | |
809 | hitcon:disconnect() | |
810 | atdeb = false | |
811 | idling = true | |
812 | end | |
813 | if k == "q" then | |
814 | if atdeb then return end | |
815 | atdeb = true | |
816 | idling = false | |
817 | ||
818 | bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(7),0,0) | |
819 | ctween(grip,"C0",grip0*CFrame.Angles(math.rad(-30),math.rad(-25),math.rad(-15)),9,true) | |
820 | ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(150),math.rad(0),math.rad(30)),7,true) | |
821 | ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-20),0,0),7,true) | |
822 | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(150),math.rad(0),math.rad(-30)),7) | |
823 | ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(30)),13,true) | |
824 | ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(-35),0,0),13,true) | |
825 | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(160),math.rad(0),math.rad(-30)),20) | |
826 | playSound(92597296,hamend,1,1.07) | |
827 | local s = playSound(96626016,hamend) | |
828 | s.Volume = 0 | |
829 | local hitcon | |
830 | hitcon = hamend.Touched:connect(function(hit) | |
831 | s.Volume = 1 | |
832 | if not hit.Anchored then | |
833 | hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-100 | |
834 | end | |
835 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
836 | if hum and not hum:IsDescendantOf(char) then | |
837 | DoDamage(hum,30) | |
838 | hum.PlatformStand = true | |
839 | wait(.6) | |
840 | hum.PlatformStand = false | |
841 | end | |
842 | end) | |
843 | bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(7),0,0) | |
844 | wait(.05) | |
845 | bg.cframe = char.Torso.CFrame * CFrame.Angles(math.rad(-20),0,0) | |
846 | bg.maxTorque = Vector3.new(1,1,1)*9e10 | |
847 | ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(55),math.rad(5),math.rad(50)),7,true) | |
848 | ctween(nk,"C0",nk0 * CFrame.Angles(math.rad(5),0,0),4,true) | |
849 | ctween(rs,"C0",rs0*CFrame.new(-.9,0,-.20) * CFrame.Angles(math.rad(50),math.rad(5),math.rad(-50)),7) | |
850 | if workspace:FindPartOnRay(Ray.new(hamend.Position,hamend.CFrame.lookVector*3),char) then | |
851 | s.Volume = 1 | |
852 | end | |
853 | wait(.2) | |
854 | bg.maxTorque = Vector3.new(1,0,1)*9e10 | |
855 | hitcon:disconnect() | |
856 | atdeb = false | |
857 | idling = true | |
858 | end | |
859 | if k == "r" then | |
860 | if atdeb then return end | |
861 | atdeb = true | |
862 | idling = false | |
863 | ctween(ls,"C0",ls0*CFrame.new(.7,0,-.7) * CFrame.Angles(math.rad(70),math.rad(0),math.rad(30)),7,true) | |
864 | ctween(grip,"C0",grip0*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-60))*CFrame.Angles(0,math.rad(180),0),9,true) | |
865 | bg.maxTorque = Vector3.new(1,1,1)*9e10 | |
866 | bg.cframe = char.Torso.CFrame | |
867 | ctween(rs,"C0",rs0*CFrame.new(-.7,0,-.7) * CFrame.Angles(math.rad(70),math.rad(0),math.rad(-10)),7,true) | |
868 | local s = playSound(92597296,hamend,1,1.07) | |
869 | s.Looped = true | |
870 | local sndmd = {} | |
871 | local hitcon | |
872 | hitcon = hamend.Touched:connect(function(hit) | |
873 | if not sndmd[hit] then sndmd[hit] = playSound(10730819,hamend) end | |
874 | ||
875 | if not hit.Anchored then | |
876 | hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*60 | |
877 | end | |
878 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
879 | if hum and not hum:IsDescendantOf(char) then | |
880 | DoDamage(hum,math.random(4,6)) | |
881 | hum.Sit = true | |
882 | wait(2) | |
883 | hum.Sit = false | |
884 | end | |
885 | end) | |
886 | for i=1,20 do | |
887 | bg.cframe = bg.cframe * CFrame.Angles(0,math.rad(-1440/20),0) | |
888 | wait(.1) | |
889 | end | |
890 | hitcon:disconnect() | |
891 | bg.maxTorque = Vector3.new(1,0,1)*9e10 | |
892 | s:Stop() | |
893 | s:Destroy() | |
894 | atdeb = false | |
895 | idling = true | |
896 | end | |
897 | if k == "e" then | |
898 | if atdeb then return end | |
899 | basiccombo = (tick()-basiccombotimer > .5 or basiccombo == 2) and 1 or basiccombo + 1 | |
900 | idling = false | |
901 | atdeb = true | |
902 | if basiccombo == 1 then | |
903 | ctween(ls,"C0",ls0 * CFrame.new(.2,.2,-.1) * CFrame.Angles(math.rad(120),math.rad(0),math.rad(5)) * CFrame.Angles(0,math.rad(60),0),7,true) | |
904 | ctween(rs,"C0",rs0*CFrame.new(0,0,-.3) * CFrame.Angles(math.rad(120),math.rad(70),math.rad(-30)),7) | |
905 | bg.maxTorque = Vector3.new(1,1,1)*9e10 | |
906 | bg.cframe = char.Torso.CFrame * CFrame.Angles(0,math.rad(-40),0) | |
907 | playSound(92597296,hamend,1,1.2) | |
908 | local ac | |
909 | local hitcon | |
910 | hitcon = hamend.Touched:connect(function(hit) | |
911 | if not ac then ac = playSound(10730819,hamend,1,1) end | |
912 | if not hit.Anchored then | |
913 | hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*50 | |
914 | end | |
915 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
916 | if hum and not hum:IsDescendantOf(char) then | |
917 | DoDamage(hum,10) | |
918 | end | |
919 | end) | |
920 | ctween(ls,"C0",ls0 * CFrame.new(1,.2,-1) * CFrame.Angles(math.rad(115),math.rad(0),math.rad(40)) * CFrame.Angles(0,math.rad(60),0),6,true) | |
921 | ctween(rs,"C0",rs0*CFrame.new(0,0,-.3) * CFrame.Angles(math.rad(120),math.rad(80),math.rad(-30))* CFrame.Angles(math.rad(-50),0,0),6,true) | |
922 | wait(.1) | |
923 | bg.cframe = char.Torso.CFrame * CFrame.Angles(0,math.rad(40),0) | |
924 | hitcon:disconnect() | |
925 | elseif basiccombo == 2 then | |
926 | ctween(ls,"C0",ls0*CFrame.new(1,0,-1) * CFrame.Angles(math.rad(5),math.rad(0),math.rad(70)),10,true) | |
927 | ctween(grip,"C0",grip0*CFrame.Angles(math.rad(10),0,0),12,true) | |
928 | ctween(rs,"C0",rs0*CFrame.new(0,0,0) * CFrame.Angles(math.rad(-5),math.rad(0),math.rad(0)),10,true) | |
929 | wait(.2) | |
930 | playSound(92597296,hamend,1,.7) | |
931 | wait(.1) | |
932 | bg.maxTorque = Vector3.new(1,1,1)*9e10 | |
933 | bg.cframe = char.Torso.CFrame | |
934 | bv.maxForce = Vector3.new(1,0,1)*9e5 | |
935 | bv.velocity = bg.cframe.lookVector * 70 | |
936 | coroutine.wrap(function() for i=1,25 do bv.velocity = bv.velocity*.9 wait(1/30) end bv.maxForce = Vector3.new() end)() | |
937 | local thrustcon | |
938 | thrustcon = hamend.Touched:connect(function(hit) | |
939 | if not hit.Anchored then | |
940 | hit.Velocity = hit.Velocity + hamend.CFrame.lookVector*-40 | |
941 | end | |
942 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
943 | if hum and not hum:IsDescendantOf(char) then | |
944 | DoDamage(hum,5) | |
945 | --thrustcon:disconnect() | |
946 | hum.Sit = true | |
947 | ctween(grip,"C0",grip0*CFrame.Angles(math.rad(30),0,0),5,true) | |
948 | if not ac then ac = playSound(92597296,hamend,1,1.15) end | |
949 | local tor = hum.Parent:FindFirstChild("Torso") | |
950 | if tor and not tor:FindFirstChild("torv") then | |
951 | --tor.Velocity = bg.cframe.lookVector*30 + Vector3.new(0,100,0) | |
952 | local torv = Instance.new("BodyVelocity",tor) | |
953 | torv.maxForce = Vector3.new(1,1,1)*9e9 | |
954 | torv.P = 2000 | |
955 | torv.velocity = bg.cframe.lookVector*20 + Vector3.new(0,120,0) | |
956 | torv.Name = "torv" | |
957 | local torav = Instance.new("BodyAngularVelocity",tor) | |
958 | torav.maxTorque = Vector3.new(1,1,1)*9e9 | |
959 | torav.P = 5000 | |
960 | torav.angularvelocity = Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*2 | |
961 | coroutine.wrap(function() | |
962 | for i=1,torv.velocity.Y/196.22*30 do | |
963 | hum.Sit = true | |
964 | torv.velocity = torv.velocity - Vector3.new(0,196.22/30,0) | |
965 | wait(1/30) | |
966 | end | |
967 | torv:Destroy() | |
968 | torav:Destroy() | |
969 | tor.Velocity = Vector3.new() | |
970 | end)() | |
971 | end | |
972 | end | |
973 | end) | |
974 | ctween(ls,"C0",ls0*CFrame.new(1,0,-1) * CFrame.Angles(math.rad(80),math.rad(0),math.rad(50)),12,true) | |
975 | ctween(grip,"C0",grip0*CFrame.Angles(math.rad(-70),0,0),12,true) | |
976 | ctween(rs,"C0",rs0*CFrame.new(-.6,0,-.7) * CFrame.Angles(math.rad(90),math.rad(0),math.rad(-10)),12,true) | |
977 | Delay(.3,function() thrustcon:disconnect() end) | |
978 | ||
979 | end | |
980 | wait(.1) | |
981 | bg.maxTorque = Vector3.new(1,0,1)*9e10 | |
982 | ||
983 | basiccombotimer = tick() | |
984 | atdeb = false | |
985 | idling = true | |
986 | ||
987 | end -- 96626016, 92597296 | |
988 | bg.cframe = CFrame.new(char.Torso.Position,char.Torso.Position+char.Torso.CFrame.lookVector*Vector3.new(1,0,1)) | |
989 | end)) | |
990 | ||
991 | char.Humanoid.MaxHealth = 220 | |
992 | char.Humanoid.WalkSpeed = 20 | |
993 | wait(.3) | |
994 | char.Humanoid.Health = 220 |