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,game,owner = owner,game | |
3 | local RealPlayer = Player | |
4 | do | |
5 | print("FE Compatibility code V2 by Mokiros") | |
6 | local RealPlayer = RealPlayer | |
7 | script.Parent = RealPlayer.Character | |
8 | ||
9 | --Fake event to make stuff like Mouse.KeyDown work | |
10 | local Disconnect_Function = function(this) | |
11 | this[1].Functions[this[2]] = nil | |
12 | end | |
13 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
14 | local FakeEvent_Metatable = {__index={ | |
15 | Connect = function(this,f) | |
16 | local i = tostring(math.random(0,10000)) | |
17 | while this.Functions[i] do | |
18 | i = tostring(math.random(0,10000)) | |
19 | end | |
20 | this.Functions[i] = f | |
21 | return setmetatable({this,i},Disconnect_Metatable) | |
22 | end | |
23 | }} | |
24 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
25 | local function fakeEvent() | |
26 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
27 | end | |
28 | ||
29 | --Creating fake input objects with fake variables | |
30 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
31 | FakeMouse.keyUp = FakeMouse.KeyUp | |
32 | FakeMouse.keyDown = FakeMouse.KeyDown | |
33 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
34 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
35 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
36 | end} | |
37 | --Merged 2 functions into one by checking amount of arguments | |
38 | CAS.UnbindAction = CAS.BindAction | |
39 | ||
40 | --This function will trigger the events that have been :Connect()'ed | |
41 | local function TriggerEvent(self,ev,...) | |
42 | for _,f in pairs(self[ev].Functions) do | |
43 | f(...) | |
44 | end | |
45 | end | |
46 | FakeMouse.TriggerEvent = TriggerEvent | |
47 | UIS.TriggerEvent = TriggerEvent | |
48 | ||
49 | --Client communication | |
50 | local Event = Instance.new("RemoteEvent") | |
51 | Event.Name = "UserInput_Event" | |
52 | Event.OnServerEvent:Connect(function(plr,io) | |
53 | if plr~=RealPlayer then return end | |
54 | FakeMouse.Target = io.Target | |
55 | FakeMouse.Hit = io.Hit | |
56 | if not io.isMouse then | |
57 | local b = io.UserInputState == Enum.UserInputState.Begin | |
58 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
59 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
60 | end | |
61 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
62 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
63 | end | |
64 | for _,t in pairs(CAS.Actions) do | |
65 | for _,k in pairs(t.Keys) do | |
66 | if k==io.KeyCode then | |
67 | t.Function(t.Name,io.UserInputState,io) | |
68 | end | |
69 | end | |
70 | end | |
71 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
72 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
73 | end | |
74 | end) | |
75 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
76 | local Mouse = owner:GetMouse() | |
77 | local UIS = game:GetService("UserInputService") | |
78 | local input = function(io,RobloxHandled) | |
79 | if RobloxHandled then return end | |
80 | --Since InputObject is a client-side instance, we create and pass table instead | |
81 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
82 | end | |
83 | UIS.InputBegan:Connect(input) | |
84 | UIS.InputEnded:Connect(input) | |
85 | ||
86 | local h,t | |
87 | --Give the server mouse data every second frame, but only if the values changed | |
88 | --If player is not moving their mouse, client won't fire events | |
89 | local HB = game:GetService("RunService").Heartbeat | |
90 | while true do | |
91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
92 | h,t=Mouse.Hit,Mouse.Target | |
93 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
94 | end | |
95 | --Wait 2 frames | |
96 | for i=1,2 do | |
97 | HB:Wait() | |
98 | end | |
99 | end]==],script) | |
100 | ||
101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
102 | --Real game object | |
103 | local RealGame = game | |
104 | ||
105 | --Metatable for fake service | |
106 | local FakeService_Metatable = { | |
107 | __index = function(self,k) | |
108 | local s = rawget(self,"_RealService") | |
109 | if s then | |
110 | return typeof(s[k])=="function" | |
111 | and function(_,...)return s[k](s,...)end or s[k] | |
112 | end | |
113 | end, | |
114 | __newindex = function(self,k,v) | |
115 | local s = rawget(self,"_RealService") | |
116 | if s then s[k]=v end | |
117 | end | |
118 | } | |
119 | local function FakeService(t,RealService) | |
120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
121 | return setmetatable(t,FakeService_Metatable) | |
122 | end | |
123 | ||
124 | --Fake game object | |
125 | local FakeGame = { | |
126 | GetService = function(self,s) | |
127 | return rawget(self,s) or RealGame:GetService(s) | |
128 | end, | |
129 | Players = FakeService({ | |
130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
131 | },"Players"), | |
132 | UserInputService = FakeService(UIS,"UserInputService"), | |
133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
134 | RunService = FakeService({ | |
135 | _btrs = {}, | |
136 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
137 | BindToRenderStep = function(self,name,_,fun) | |
138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
139 | end, | |
140 | UnbindFromRenderStep = function(self,name) | |
141 | self._btrs[name]:Disconnect() | |
142 | end, | |
143 | },"RunService") | |
144 | } | |
145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
146 | FakeGame.service = FakeGame.GetService | |
147 | FakeService(FakeGame,game) | |
148 | --Changing owner to fake player object to support owner:GetMouse() | |
149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
150 | end | |
151 | ||
152 | plr = owner | |
153 | mouse = plr:GetMouse() | |
154 | char = plr.Character | |
155 | ra = char["Right Arm"] | |
156 | la = char["Left Arm"] | |
157 | rl = char["Right Leg"] | |
158 | ll = char["Left Leg"] | |
159 | local hum = char.Humanoid | |
160 | local RS = char.Torso["Right Shoulder"] | |
161 | local LS = char.Torso["Left Shoulder"] | |
162 | local RH = char.Torso["Right Hip"] | |
163 | local LH = char.Torso["Left Hip"] | |
164 | local neck = char.Torso["Neck"] | |
165 | local anim = char.Animate | |
166 | local rootj = char.HumanoidRootPart.RootJoint | |
167 | local sine = 0 | |
168 | local RSnor = RS.C0 | |
169 | local LSnor = LS.C0 | |
170 | local RHnor = RH.C0 | |
171 | local LHnor = LH.C0 | |
172 | local rootjnor = rootj.C0 | |
173 | local necknor = neck.C0 | |
174 | ||
175 | --Converted with ttyyuu12345's model to script plugin v4 | |
176 | function sandbox(var,func) | |
177 | local env = getfenv(func) | |
178 | local newenv = setmetatable({},{ | |
179 | __index = function(self,k) | |
180 | if k=="script" then | |
181 | return var | |
182 | else | |
183 | return env[k] | |
184 | end | |
185 | end, | |
186 | }) | |
187 | setfenv(func,newenv) | |
188 | return func | |
189 | end | |
190 | cors = {} | |
191 | mas = Instance.new("Model",game:GetService("Lighting")) | |
192 | Model0 = Instance.new("Model") | |
193 | Part1 = Instance.new("Part") | |
194 | Part2 = Instance.new("Part") | |
195 | Part3 = Instance.new("Part") | |
196 | Part4 = Instance.new("Part") | |
197 | Part5 = Instance.new("Part") | |
198 | Part6 = Instance.new("Part") | |
199 | Part7 = Instance.new("Part") | |
200 | Weld8 = Instance.new("Weld") | |
201 | Weld9 = Instance.new("Weld") | |
202 | Weld10 = Instance.new("Weld") | |
203 | Weld11 = Instance.new("Weld") | |
204 | Weld12 = Instance.new("Weld") | |
205 | Weld13 = Instance.new("Weld") | |
206 | Weld14 = Instance.new("Weld") | |
207 | Weld15 = Instance.new("Weld") | |
208 | Weld16 = Instance.new("Weld") | |
209 | Part17 = Instance.new("Part") | |
210 | Decal18 = Instance.new("Decal") | |
211 | Decal19 = Instance.new("Decal") | |
212 | Part20 = Instance.new("Part") | |
213 | Part21 = Instance.new("Part") | |
214 | Decal22 = Instance.new("Decal") | |
215 | Model0.Name = "oofhammer" | |
216 | Model0.Parent = mas | |
217 | Part1.Parent = Model0 | |
218 | Part1.CFrame = CFrame.new(-110.812485, 2.74998403, 89.2499847, 0, 0.999993384, 0, 4.37113883e-08, 0, -1, -1, 0, -4.37113883e-08) | |
219 | Part1.Orientation = Vector3.new(90, 90, 0) | |
220 | Part1.Position = Vector3.new(-110.812485, 2.74998403, 89.2499847) | |
221 | Part1.Rotation = Vector3.new(90, 0, -90) | |
222 | Part1.Color = Color3.new(0.643137, 0.741176, 0.278431) | |
223 | Part1.Size = Vector3.new(1.375, 0.875, 0.625) | |
224 | Part1.BottomSurface = Enum.SurfaceType.Smooth | |
225 | Part1.BrickColor = BrickColor.new("Br. yellowish green") | |
226 | Part1.TopSurface = Enum.SurfaceType.Smooth | |
227 | Part1.brickColor = BrickColor.new("Br. yellowish green") | |
228 | Part1.Shape = Enum.PartType.Cylinder | |
229 | Part2.Parent = Model0 | |
230 | Part2.CFrame = CFrame.new(-110.812485, 2.74998403, 86.6874847, 0, 0.999993384, 0, 4.37113883e-08, 0, -1, -1, 0, -4.37113883e-08) | |
231 | Part2.Orientation = Vector3.new(90, 90, 0) | |
232 | Part2.Position = Vector3.new(-110.812485, 2.74998403, 86.6874847) | |
233 | Part2.Rotation = Vector3.new(90, 0, -90) | |
234 | Part2.Color = Color3.new(0.0627451, 0.164706, 0.862745) | |
235 | Part2.Size = Vector3.new(1.25, 0.25, 0.25) | |
236 | Part2.BottomSurface = Enum.SurfaceType.Smooth | |
237 | Part2.BrickColor = BrickColor.new("Lapis") | |
238 | Part2.TopSurface = Enum.SurfaceType.Smooth | |
239 | Part2.brickColor = BrickColor.new("Lapis") | |
240 | Part2.Shape = Enum.PartType.Cylinder | |
241 | Part3.Name = "Hitbox" | |
242 | Part3.Parent = Model0 | |
243 | Part3.CFrame = CFrame.new(-110.749985, 2.81248403, 85.1874847, 0, 1, 0, -1, 0, 0, 0, 0, 1) | |
244 | Part3.Orientation = Vector3.new(0, 0, -90) | |
245 | Part3.Position = Vector3.new(-110.749985, 2.81248403, 85.1874847) | |
246 | Part3.Rotation = Vector3.new(0, 0, -90) | |
247 | Part3.Color = Color3.new(0.960784, 0.803922, 0.188235) | |
248 | Part3.Size = Vector3.new(3.25, 2, 1.75) | |
249 | Part3.BottomSurface = Enum.SurfaceType.Smooth | |
250 | Part3.BrickColor = BrickColor.new("Bright yellow") | |
251 | Part3.TopSurface = Enum.SurfaceType.Smooth | |
252 | Part3.brickColor = BrickColor.new("Bright yellow") | |
253 | Part3.Shape = Enum.PartType.Cylinder | |
254 | Part4.Parent = Model0 | |
255 | Part4.CFrame = CFrame.new(-110.749985, 4.43748379, 85.2499847, 0, 0.999993384, 0, -1, 0, 0, 0, 0, 1) | |
256 | Part4.Orientation = Vector3.new(0, 0, -90) | |
257 | Part4.Position = Vector3.new(-110.749985, 4.43748379, 85.2499847) | |
258 | Part4.Rotation = Vector3.new(0, 0, -90) | |
259 | Part4.Color = Color3.new(0.960784, 0.803922, 0.188235) | |
260 | Part4.Size = Vector3.new(0.5, 2.375, 2.125) | |
261 | Part4.BottomSurface = Enum.SurfaceType.Smooth | |
262 | Part4.BrickColor = BrickColor.new("Bright yellow") | |
263 | Part4.TopSurface = Enum.SurfaceType.Smooth | |
264 | Part4.brickColor = BrickColor.new("Bright yellow") | |
265 | Part4.Shape = Enum.PartType.Cylinder | |
266 | Part5.Name = "HandlePart" | |
267 | Part5.Parent = Model0 | |
268 | Part5.CFrame = CFrame.new(-110.812485, 2.74998403, 87.9374847, 0, 0.999993384, 0, 4.37113883e-08, 0, -1, -1, 0, -4.37113883e-08) | |
269 | Part5.Orientation = Vector3.new(90, 90, 0) | |
270 | Part5.Position = Vector3.new(-110.812485, 2.74998403, 87.9374847) | |
271 | Part5.Rotation = Vector3.new(90, 0, -90) | |
272 | Part5.Color = Color3.new(0.643137, 0.741176, 0.278431) | |
273 | Part5.Transparency = 1 | |
274 | Part5.Size = Vector3.new(4, 0.25, 0.25) | |
275 | Part5.BottomSurface = Enum.SurfaceType.Smooth | |
276 | Part5.BrickColor = BrickColor.new("Br. yellowish green") | |
277 | Part5.TopSurface = Enum.SurfaceType.Smooth | |
278 | Part5.brickColor = BrickColor.new("Br. yellowish green") | |
279 | Part5.Shape = Enum.PartType.Cylinder | |
280 | Part6.Parent = Model0 | |
281 | Part6.CFrame = CFrame.new(-110.749985, 2.74998403, 85.9999847, 0, 0.999993384, 0, 4.37113883e-08, 0, -1, -1, 0, -4.37113883e-08) | |
282 | Part6.Orientation = Vector3.new(90, 90, 0) | |
283 | Part6.Position = Vector3.new(-110.749985, 2.74998403, 85.9999847) | |
284 | Part6.Rotation = Vector3.new(90, 0, -90) | |
285 | Part6.Color = Color3.new(0.0627451, 0.164706, 0.862745) | |
286 | Part6.Size = Vector3.new(0.375, 0.875, 0.625) | |
287 | Part6.BottomSurface = Enum.SurfaceType.Smooth | |
288 | Part6.BrickColor = BrickColor.new("Lapis") | |
289 | Part6.TopSurface = Enum.SurfaceType.Smooth | |
290 | Part6.brickColor = BrickColor.new("Lapis") | |
291 | Part6.Shape = Enum.PartType.Cylinder | |
292 | Part7.Parent = Model0 | |
293 | Part7.CFrame = CFrame.new(-110.812485, 2.74998403, 88.0624847, 0, 0.999993384, 0, 4.37113883e-08, 0, -1, -1, 0, -4.37113883e-08) | |
294 | Part7.Orientation = Vector3.new(90, 90, 0) | |
295 | Part7.Position = Vector3.new(-110.812485, 2.74998403, 88.0624847) | |
296 | Part7.Rotation = Vector3.new(90, 0, -90) | |
297 | Part7.Color = Color3.new(0.643137, 0.741176, 0.278431) | |
298 | Part7.Size = Vector3.new(1.5, 0.25, 0.25) | |
299 | Part7.BottomSurface = Enum.SurfaceType.Smooth | |
300 | Part7.BrickColor = BrickColor.new("Br. yellowish green") | |
301 | Part7.TopSurface = Enum.SurfaceType.Smooth | |
302 | Part7.brickColor = BrickColor.new("Br. yellowish green") | |
303 | Part7.Shape = Enum.PartType.Cylinder | |
304 | Weld8.Name = "BTWeld" | |
305 | Weld8.Parent = Part7 | |
306 | Weld8.C1 = CFrame.new(1.1875, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
307 | Weld8.Part0 = Part7 | |
308 | Weld8.Part1 = Part1 | |
309 | Weld8.part1 = Part1 | |
310 | Weld9.Name = "BTWeld" | |
311 | Weld9.Parent = Part7 | |
312 | Weld9.C1 = CFrame.new(0.187515259, -1.00001597, -0.687515259, 0, 0.999993384, 0, 4.37113883e-08, 0, -1, -1, 0, -4.37113883e-08) | |
313 | Weld9.Part0 = Part7 | |
314 | Weld9.Part1 = Part21 | |
315 | Weld9.part1 = Part21 | |
316 | Weld10.Name = "BTWeld" | |
317 | Weld10.Parent = Part7 | |
318 | Weld10.C1 = CFrame.new(-1.375, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
319 | Weld10.Part0 = Part7 | |
320 | Weld10.Part1 = Part2 | |
321 | Weld10.part1 = Part2 | |
322 | Weld11.Name = "BTWeld" | |
323 | Weld11.Parent = Part7 | |
324 | Weld11.C1 = CFrame.new(0.0625, -0.0625, 2.875, -4.37113883e-08, 0, 1, 0, 0.999993384, 0, -1, 0, -4.37113883e-08) | |
325 | Weld11.Part0 = Part7 | |
326 | Weld11.Part1 = Part3 | |
327 | Weld11.part1 = Part3 | |
328 | Weld12.Name = "BTWeld" | |
329 | Weld12.Parent = Part7 | |
330 | Weld12.C1 = CFrame.new(1.68749976, -0.0625, 2.8125, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08) | |
331 | Weld12.Part0 = Part7 | |
332 | Weld12.Part1 = Part4 | |
333 | Weld12.part1 = Part4 | |
334 | Weld13.Name = "BTWeld" | |
335 | Weld13.Parent = Part7 | |
336 | Weld13.C1 = CFrame.new(-1.4375, -0.0625, 2.8125, -4.37113883e-08, 0, 1, 0, 1, 0, -1, 0, -4.37113883e-08) | |
337 | Weld13.Part0 = Part7 | |
338 | Weld13.Part1 = Part20 | |
339 | Weld13.part1 = Part20 | |
340 | Weld14.Name = "BTWeld" | |
341 | Weld14.Parent = Part7 | |
342 | Weld14.C1 = CFrame.new(0.0625, -2.8125, 0.0625002384, 0, -1, 0, 1, 0, 0, 0, 0, 1) | |
343 | Weld14.Part0 = Part7 | |
344 | Weld14.Part1 = Part17 | |
345 | Weld14.part1 = Part17 | |
346 | Weld15.Name = "BTWeld" | |
347 | Weld15.Parent = Part7 | |
348 | Weld15.C1 = CFrame.new(-0.125, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
349 | Weld15.Part0 = Part7 | |
350 | Weld15.Part1 = Part5 | |
351 | Weld15.part1 = Part5 | |
352 | Weld16.Name = "BTWeld" | |
353 | Weld16.Parent = Part7 | |
354 | Weld16.C1 = CFrame.new(-2.0625, -0.0625, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
355 | Weld16.Part0 = Part7 | |
356 | Weld16.Part1 = Part6 | |
357 | Weld16.part1 = Part6 | |
358 | Part17.Name = "XXX" | |
359 | Part17.Parent = Model0 | |
360 | Part17.CFrame = CFrame.new(-110.749985, 2.8124845, 85.2499847, -0.999993384, 0, 0, 0, 4.37113883e-08, -1, -0, -1, -4.37113883e-08) | |
361 | Part17.Orientation = Vector3.new(90, 180, 0) | |
362 | Part17.Position = Vector3.new(-110.749985, 2.8124845, 85.2499847) | |
363 | Part17.Rotation = Vector3.new(90, 0, -180) | |
364 | Part17.Color = Color3.new(1, 1, 0) | |
365 | Part17.Size = Vector3.new(2, 1.375, 1.125) | |
366 | Part17.BottomSurface = Enum.SurfaceType.Smooth | |
367 | Part17.BrickColor = BrickColor.new("New Yeller") | |
368 | Part17.TopSurface = Enum.SurfaceType.Smooth | |
369 | Part17.brickColor = BrickColor.new("New Yeller") | |
370 | Part17.Shape = Enum.PartType.Cylinder | |
371 | Decal18.Name = "Bighead Face" | |
372 | Decal18.Parent = Part17 | |
373 | Decal18.Texture = "http://www.roblox.com/asset/?id=3154087082" | |
374 | Decal18.Face = Enum.NormalId.Right | |
375 | Decal19.Name = "Bighead Face" | |
376 | Decal19.Parent = Part17 | |
377 | Decal19.Texture = "http://www.roblox.com/asset/?id=3154087082" | |
378 | Decal19.Face = Enum.NormalId.Left | |
379 | Part20.Parent = Model0 | |
380 | Part20.CFrame = CFrame.new(-110.749985, 1.31248403, 85.2499847, 0, 0.999993384, 0, -1, 0, 0, 0, 0, 1) | |
381 | Part20.Orientation = Vector3.new(0, 0, -90) | |
382 | Part20.Position = Vector3.new(-110.749985, 1.31248403, 85.2499847) | |
383 | Part20.Rotation = Vector3.new(0, 0, -90) | |
384 | Part20.Color = Color3.new(0.960784, 0.803922, 0.188235) | |
385 | Part20.Size = Vector3.new(0.5, 2.375, 2.125) | |
386 | Part20.BottomSurface = Enum.SurfaceType.Smooth | |
387 | Part20.BrickColor = BrickColor.new("Bright yellow") | |
388 | Part20.TopSurface = Enum.SurfaceType.Smooth | |
389 | Part20.brickColor = BrickColor.new("Bright yellow") | |
390 | Part20.Shape = Enum.PartType.Cylinder | |
391 | Part21.Name = "Arm" | |
392 | Part21.Parent = Model0 | |
393 | Part21.CFrame = CFrame.new(-111, 3.75, 88.75, 0.999986768, 0, 0, 0, 1, 0, 0, 0, 1) | |
394 | Part21.Position = Vector3.new(-111, 3.75, 88.75) | |
395 | Part21.Color = Color3.new(0.803922, 0.803922, 0.803922) | |
396 | Part21.Size = Vector3.new(1, 2, 1) | |
397 | Part21.BottomSurface = Enum.SurfaceType.Smooth | |
398 | Part21.BrickColor = BrickColor.new("Mid gray") | |
399 | Part21.TopSurface = Enum.SurfaceType.Smooth | |
400 | Part21.brickColor = BrickColor.new("Mid gray") | |
401 | Decal22.Name = "Bighead Face" | |
402 | Decal22.Parent = nil | |
403 | Decal22.Texture = "http://www.roblox.com/asset/?id=3154087082" | |
404 | for i,v in pairs(mas:GetChildren()) do | |
405 | v.Parent = char | |
406 | pcall(function() v:MakeJoints() end) | |
407 | end | |
408 | mas:Destroy() | |
409 | for i,v in pairs(cors) do | |
410 | spawn(function() | |
411 | pcall(v) | |
412 | end) | |
413 | end | |
414 | ||
415 | ezweld = function(p, a, b, cf) | |
416 | local weld = Instance.new("Weld",p) | |
417 | weld.Part0 = a | |
418 | weld.Part1 = b | |
419 | weld.C0 = cf | |
420 | return weld | |
421 | end | |
422 | ||
423 | Swait,swait = function(number) | |
424 | if number == 0 or number == nil then | |
425 | game:GetService("RunService").Heartbeat:Wait() | |
426 | else | |
427 | for i = 1,number do | |
428 | game:GetService("RunService").Heartbeat:Wait() | |
429 | end | |
430 | end | |
431 | end | |
432 | ||
433 | clerp = function(toclerp, cf, number) | |
434 | local joint = toclerp | |
435 | joint.C0 = joint.C0:Lerp(cf, number) | |
436 | end | |
437 | clerp2 = function(toclerp, cf) | |
438 | local joint = toclerp | |
439 | joint.C0 = cf | |
440 | end | |
441 | ||
442 | Hammer = Model0 | |
443 | Hammer.Arm.Transparency = 1 | |
444 | ||
445 | for _,v in pairs (Hammer:children()) do | |
446 | v.CanCollide = false | |
447 | v.Anchored = false | |
448 | end | |
449 | ||
450 | local Grip = ezweld(char, Hammer.HandlePart, ra, CFrame.new(0, 0, -0.95) * CFrame.Angles(0, -77, 77)) | |
451 | Gripnor = Grip.C0 | |
452 | ||
453 | Cos = math.cos | |
454 | hum.Animator:Destroy() | |
455 | attack = false | |
456 | HOLD = false | |
457 | IT = Instance.new | |
458 | movelegs = true | |
459 | ||
460 | function Cso(ID, PARENT, VOLUME, PITCH) | |
461 | local NSound = nil | |
462 | coroutine.resume(coroutine.create(function() | |
463 | NSound = IT("Sound", PARENT) | |
464 | NSound.Volume = VOLUME | |
465 | NSound.Pitch = PITCH | |
466 | NSound.SoundId = "http://www.roblox.com/asset/?id="..ID | |
467 | Swait() | |
468 | NSound:play() | |
469 | game:GetService("Debris"):AddItem(NSound, 10) | |
470 | end)) | |
471 | return NSound | |
472 | end | |
473 | ||
474 | function spherefx(position, color, material, grow) | |
475 | coroutine.resume(coroutine.create(function() | |
476 | local sphere = Instance.new("Part",char) | |
477 | sphere.Shape = "Ball" | |
478 | sphere.BrickColor = BrickColor.new(color) | |
479 | sphere.Anchored = true | |
480 | sphere.CanCollide = false | |
481 | sphere.Position = position | |
482 | sphere.Size = Vector3.new(4, 4, 4) | |
483 | sphere.Material = material | |
484 | for i = 1,15 do | |
485 | Swait() | |
486 | sphere.Transparency = sphere.Transparency + grow | |
487 | sphere.Size = sphere.Size + Vector3.new(grow, grow, grow) | |
488 | end | |
489 | sphere:Destroy() | |
490 | end)) | |
491 | end | |
492 | ||
493 | MODE = "Damage" | |
494 | Debris = game:GetService("Debris") | |
495 | ||
496 | function Damage(hitbox, lifetime, dmg) | |
497 | coroutine.resume(coroutine.create(function() | |
498 | local hitter = hitbox.Touched:connect(function(hit) | |
499 | for _,v in pairs (hit.Parent:children()) do | |
500 | if v:IsA("Humanoid") and v.Parent ~= char and not v.Parent:FindFirstChild("I GNOMED YOU") and MODE == "Damage" then | |
501 | v.Health = v.Health - 15 | |
502 | local gnome = Instance.new("NumberValue",v.Parent) | |
503 | gnome.Name = "I GNOMED YOU" | |
504 | Debris:AddItem(gnome, 0.1) | |
505 | end | |
506 | if v:IsA("Humanoid") and v.Parent ~= char and MODE == "Break" then | |
507 | v.Parent:BreakJoints() | |
508 | v.MaxHealth = 0 | |
509 | v.Health = 0 | |
510 | end | |
511 | if v:IsA("Humanoid") and v.Parent ~= char and MODE == "Kick" then | |
512 | local tokick = game:GetService("Players"):GetPlayerFromCharacter(v.Parent) | |
513 | if tokick then | |
514 | tokick:Kick("You have been kicked by the OOFINATOR") | |
515 | else | |
516 | local chara = v.Parent | |
517 | if chara then | |
518 | chara:ClearAllChildren() | |
519 | end | |
520 | end | |
521 | end | |
522 | end | |
523 | end) | |
524 | wait(lifetime) | |
525 | hitter:disconnect() | |
526 | end)) | |
527 | end | |
528 | ||
529 | function SLAM() | |
530 | attack = true | |
531 | movelegs = true | |
532 | HOLD = true | |
533 | repeat | |
534 | Damage(Model0.Hitbox, 1.7, 15) | |
535 | for i = 1,12 do | |
536 | Swait() | |
537 | clerp(RS, RSnor * CFrame.new() * CFrame.Angles(0, 0, 90), 0.15) | |
538 | clerp(LS, LSnor * CFrame.new() * CFrame.Angles(0 + 0.1 * Cos(sine / 20), 0, 0.15 - 0.2 * Cos(sine / 20)), 0.15) | |
539 | clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 20)), 0.15) | |
540 | --clerp(LH, LHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
541 | --clerp(RH, RHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
542 | clerp(Grip, Gripnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
543 | end | |
544 | Cso(2150821806, char.Head, 10, 1) | |
545 | for i = 1,12 do | |
546 | Swait() | |
547 | clerp(RS, RSnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
548 | clerp(LS, LSnor * CFrame.new() * CFrame.Angles(0 + 0.1 * Cos(sine / 20), 0, 0.15 - 0.2 * Cos(sine / 20)), 0.15) | |
549 | clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 20)), 0.15) | |
550 | --clerp(LH, LHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
551 | --clerp(RH, RHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
552 | clerp(Grip, Gripnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
553 | end | |
554 | spherefx(Model0.Hitbox.Position, "New Yeller", "Neon", 0.1) | |
555 | until HOLD == false | |
556 | attack = false | |
557 | HOLD = false | |
558 | movelegs = true | |
559 | end | |
560 | ||
561 | function SPIN() | |
562 | attack = true | |
563 | HOLD = true | |
564 | movelegs = true | |
565 | local spinme = 0 | |
566 | local weeesmack = Model0.Hitbox.Touched:connect(function(hit) | |
567 | for _,v in pairs (hit.Parent:children()) do | |
568 | if v:IsA("Humanoid") and v.Parent ~= char and not v.Parent:FindFirstChild("I GNOMED YOU") and MODE == "Damage" then | |
569 | v.Health = v.Health + 50 | |
570 | local gnome = Instance.new("NumberValue",v.Parent) | |
571 | gnome.Name = "I GNOMED YOU" | |
572 | Debris:AddItem(gnome, 0.1) | |
573 | end | |
574 | if v:IsA("Humanoid") and v.Parent ~= char and MODE == "Break" then | |
575 | v.Parent:BreakJoints() | |
576 | v.MaxHealth = 0 | |
577 | v.Health = 0 | |
578 | end | |
579 | if v:IsA("Humanoid") and v.Parent ~= char and MODE == "Kick" then | |
580 | local tokick = game:GetService("Players"):GetPlayerFromCharacter(v.Parent) | |
581 | if tokick then | |
582 | tokick:Kick("You have been kicked by the OOFINATOR") | |
583 | else | |
584 | local chara = v.Parent | |
585 | if chara then | |
586 | chara:ClearAllChildren() | |
587 | end | |
588 | end | |
589 | end | |
590 | end | |
591 | end) | |
592 | repeat | |
593 | for i = 1,20 do | |
594 | Swait() | |
595 | spinme = spinme + 10 | |
596 | clerp2(rootj, rootjnor * CFrame.Angles(0, 0, spinme)) | |
597 | clerp(RS, RSnor * CFrame.new() * CFrame.Angles(0, -1, 77), 0.15) | |
598 | clerp(LS, LSnor * CFrame.new() * CFrame.Angles(0, 1, 77), 0.15) | |
599 | --clerp(LH, LHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
600 | --clerp(RH, RHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
601 | clerp(Grip, Gripnor * CFrame.new() * CFrame.Angles(77, 0, 0), 0.15) | |
602 | end | |
603 | until HOLD == false | |
604 | attack = false | |
605 | movelegs = true | |
606 | weeesmack:disconnect() | |
607 | end | |
608 | ||
609 | mouse.Button1Down:connect(function() | |
610 | if attack == false then | |
611 | SLAM() | |
612 | end | |
613 | end) | |
614 | ||
615 | mouse.Button1Up:connect(function() | |
616 | HOLD = false | |
617 | end) | |
618 | ||
619 | mouse.KeyDown:connect(function(key) | |
620 | key = key:lower() | |
621 | if key == "x" and attack == false then | |
622 | SPIN() | |
623 | end | |
624 | end) | |
625 | ||
626 | mouse.KeyUp:connect(function(key) | |
627 | key = key:lower() | |
628 | if key == "x" then | |
629 | HOLD = false | |
630 | end | |
631 | end) | |
632 | ||
633 | plr.Chatted:connect(function(msg) | |
634 | msg = msg:lower() | |
635 | if msg == "!damage" then | |
636 | MODE = "Damage" | |
637 | end | |
638 | if msg == "!break" then | |
639 | MODE = "Break" | |
640 | end | |
641 | if msg == "!kick" then | |
642 | MODE = "Kick" | |
643 | end | |
644 | end) | |
645 | ||
646 | while true do | |
647 | Swait() | |
648 | sine = sine + 1 | |
649 | local touchfloor = workspace:FindPartOnRay(Ray.new(char.HumanoidRootPart.CFrame.Position, ((CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position - Vector3.new(0, 1, 0))).LookVector).Unit * 4), char) | |
650 | if char.HumanoidRootPart.Velocity.Magnitude > 1 and touchfloor then | |
651 | animpose = "Walking" | |
652 | elseif char.HumanoidRootPart.Velocity.Y > 0.5 and touchfloor == nil then | |
653 | animpose = "Jumping" | |
654 | elseif char.HumanoidRootPart.Velocity.Y < 0.5 and touchfloor == nil then | |
655 | animpose = "Falling" | |
656 | else | |
657 | animpose = "Idle" | |
658 | end | |
659 | if animpose == "Idle" and attack == false then | |
660 | clerp(RS, RSnor * CFrame.new() * CFrame.Angles(0, 0, 78 / 2), 0.15) | |
661 | clerp(LS, LSnor * CFrame.new() * CFrame.Angles(0 + 0.1 * Cos(sine / 20), 0, 0.15 - 0.2 * Cos(sine / 20)), 0.15) | |
662 | clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 20)), 0.15) | |
663 | --clerp(LH, LHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
664 | --clerp(RH, RHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
665 | clerp(Grip, Gripnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
666 | end | |
667 | if animpose == "Idle" and movelegs == true then | |
668 | clerp(LH, LHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
669 | clerp(RH, RHnor * CFrame.new() * CFrame.Angles(0, 0, 0), 0.15) | |
670 | end | |
671 | if animpose == "Walking" and attack == false then | |
672 | clerp(RS, RSnor * CFrame.new() * CFrame.Angles(0, 0, 78 / 2), 0.15) | |
673 | clerp(LS, LSnor * CFrame.new() * CFrame.Angles(0 + 0.1 * Cos(sine / 12), 0, 0 + 1 * Cos(sine / 9)), 0.15) | |
674 | clerp(rootj, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 12)) * CFrame.Angles(-0.5, 0, 0), 0.15) | |
675 | --clerp(LH, LHnor * CFrame.new() * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / 9)), 0.15) | |
676 | --clerp(RH, RHnor * CFrame.new() * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / 9)), 0.15) | |
677 | clerp(Grip, Gripnor * CFrame.new(0, 0.15, -0.5) * CFrame.Angles(-0.5, 0, 0), 0.15) | |
678 | end | |
679 | if animpose == "Walking" and movelegs == true then | |
680 | clerp(LH, LHnor * CFrame.new() * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / 9)), 0.15) | |
681 | clerp(RH, RHnor * CFrame.new() * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / 9)), 0.15) | |
682 | end | |
683 | end |