View difference between Paste ID: WGyJg7ma and UDX8Xs3T
SHOW: | | - or go back to the newest paste.
1
--Converted with ttyyuu12345's model to script plugin v4
2
function sandbox(var,func)
3
	local env = getfenv(func)
4
	local newenv = setmetatable({},{
5
		__index = function(self,k)
6
			if k=="script" then
7
				return var
8
			else
9
				return env[k]
10
			end
11
		end,
12
	})
13
	setfenv(func,newenv)
14
	return func
15
end
16
cors = {}
17
mas = Instance.new("Model",game:GetService("Lighting"))
18
Script0 = Instance.new("Script")
19
LocalScript1 = Instance.new("LocalScript")
20
Script0.Name = "FakeMouseMainConversion"
21
Script0.Parent = mas
22
table.insert(cors,sandbox(Script0,function()
23
wait'0.5'
24
local RealPlayer = script.Parent.Parent
25
local FakeMouse = script.FakeMouse:Clone();
26
FakeMouse.Parent = RealPlayer.Character;
27
script.FakeMouse:Destroy()
28
do
29
	local GUID = {}
30
	do
31
	    GUID.IDs = {};
32
	    function GUID:new(len)
33
	        local id;
34
	        if(not len)then
35
	            id = (tostring(function() end))
36
	            id = id:gsub("function: ","")
37
	        else
38
	            local function genID(len)
39
	                local newID = ""
40
	                for i = 1,len do
41
	                    newID = newID..string.char(math.random(48,90))
42
	                end
43
	                return newID
44
	            end
45
	            repeat id = genID(len) until not GUID.IDs[id]
46
				local oid = id;
47
				id = {Trash=function() GUID.IDs[oid]=nil; end;Get=function() return oid; end}
48
	            GUID.IDs[oid]=true;
49
	        end
50
	        return id
51
	    end
52
	end
53
54
	local AHB = Instance.new("BindableEvent")
55
	
56
	local FPS = 30
57
	
58
	local TimeFrame = 0
59
	
60
	local LastFrame = tick()
61
	local Frame = 1/FPS
62
	
63
	game:service'RunService'.Heartbeat:connect(function(s,p)
64
		TimeFrame = TimeFrame + s
65
		if(TimeFrame >= Frame)then
66
			for i = 1,math.floor(TimeFrame/Frame) do
67
				AHB:Fire()
68
			end
69
			LastFrame=tick()
70
			TimeFrame=TimeFrame-Frame*math.floor(TimeFrame/Frame)
71
		end
72
	end)
73
74
75
	function swait(dur)
76
		if(dur == 0 or typeof(dur) ~= 'number')then
77
			AHB.Event:wait()
78
		else
79
			for i = 1, dur*FPS do
80
				AHB.Event:wait()
81
			end
82
		end
83
	end
84
	
85
	local oPlayer = RealPlayer
86
	local Player = oPlayer
87
	
88
	local loudnesses={}
89
	script.Parent = Player.Character
90
	local CoAS = {Actions={}}
91
	local Event = Instance.new("RemoteEvent")
92
	Event.Name = "UserInputEvent"
93
	Event.Parent = Player.Character
94
	local Func = Instance.new("RemoteFunction")
95
	Func.Name = "GetClientProperty"
96
	Func.Parent = Player.Character
97
	local fakeEvent = function()
98
		local t = {_fakeEvent=true,Waited={},Connected={}}
99
		t.Connect = function(self,f)
100
			local ft={}
101
			ft={Disconnected=false;disconnect=function(s) if(self.Function==ft)then self.Function=nil end s.Disconnected=true end}
102
			ft.Disconnect=ft.disconnect
103
				
104
			ft.Func=function(...)
105
				for id,_ in next, t.Waited do 
106
					t.Waited[id] = true 
107
				end 
108
				return f(...)
109
			end; 
110
			
111
			table.insert(self.Connected,ft)
112
			return ft;
113
		end
114
		t.connect = t.Connect
115
		t.Wait = function() 
116
			local guid = GUID:new(25)
117
			local waitingId = guid:Get()
118
			t.Waited[waitingId]=false
119
			repeat swait() until t.Waited[waitingId]==true  
120
			t.Waited[waitingId]=nil;
121
			guid:Trash()
122
		end
123
		t.wait = t.Wait
124
		return t
125
	end
126
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
127
	local UsIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
128
	local Run = {RenderStepped=fakeEvent()}
129
	
130
	function CoAS:BindAction(name,fun,touch,...)
131
		CoAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
132
	end
133
	function CoAS:UnbindAction(name)
134
		CoAS.Actions[name] = nil
135
	end
136
	local function te(self,ev,...)
137
		local t = self[ev]
138
		if t and t._fakeEvent and t.Connected then
139
			for i,v in next, t.Connected do
140
				if(v.Func and not v.Disconnected)then
141
					v.Func(...)
142
				else
143
					t.Connected[i]=nil
144
				end
145
			end
146
		end
147
	end
148
	m.TrigEvent = te
149
	UsIS.TrigEvent = te
150
	Run.TrigEvent = te
151
	Event.OnServerEvent:Connect(function(plr,io)
152
	    if plr~=Player then return end
153
		--[[table.foreach(io,print)
154
		print'---']]
155
		if io.Mouse then
156
			m.Target = io.Target
157
			m.Hit = io.Hit
158
		elseif io.KeyEvent then
159
			m:TrigEvent('Key'..io.KeyEvent,io.Key)
160
		elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
161
	        if io.UserInputState == Enum.UserInputState.Begin then
162
				m:TrigEvent("Button1Down")
163
			else
164
				m:TrigEvent("Button1Up")
165
			end
166
		end
167
		if(not io.KeyEvent and not io.Mouse)then
168
			
169
			for n,t in pairs(CoAS.Actions) do
170
				for _,k in pairs(t.Keys) do
171
					if k==io.KeyCode then
172
						t.Function(t.Name,io.UserInputState,io)
173
					end
174
				end
175
			end
176
	        if io.UserInputState == Enum.UserInputState.Begin then
177
				UsIS:TrigEvent("InputBegan",io,false)
178
			else
179
				UsIS:TrigEvent("InputEnded",io,false)
180
	        end
181
	    end
182
	end)
183
		
184
	Func.OnServerInvoke = function(plr,inst,play)
185
		if plr~=Player then return end
186
		if(inst and typeof(inst) == 'Instance' and inst:IsA'Sound')then
187
			loudnesses[inst]=play	
188
		end
189
	end
190
	
191
	function GetClientProperty(inst,prop)
192
		if(prop == 'PlaybackLoudness' and loudnesses[inst])then 
193
			return loudnesses[inst] 
194
		elseif(prop == 'PlaybackLoudness')then
195
			return Func:InvokeClient(Player,'RegSound',inst)
196
		end
197
		return Func:InvokeClient(Player,inst,prop)
198
	end
199
	local oldGame = game;
200
							local oldPlayer = Player;
201
	local fakePlayer = newproxy(true)
202
	getmetatable(fakePlayer).__index = function(s,i)
203
		if(i == 'GetMouse')then
204
			return function() return m; end
205
		end
206
		return Player[i]
207
	end
208
	getmetatable(fakePlayer).__newindex = function(s,i,v)
209
		Player[i]=v
210
	end
211
	getmetatable(fakePlayer).__call=function(self,...)
212
		if(self == fakePlayer)then self = Player end
213
		local wh = {...}
214
		local name = table.remove(wh,1)
215
		for i,v in next, wh do
216
			wh[i]=v
217
		end
218
		if(name == 'GetMouse')then
219
			return m;
220
		end
221
		return self(name,unpack(wh))
222
	end
223
	getmetatable(fakePlayer).__namecall=function(self,...)
224
		if(self == fakePlayer)then self = Player end
225
		local tuple={...}
226
		local name = table.remove(tuple,#tuple)
227
	
228
		if(name == 'GetMouse')then
229
			return m;
230
		else
231
			return self[name](self,unpack(tuple))
232
		end
233
	end
234
	local oll = LoadLibrary;
235
	function LoadLibrary(libtard)
236
		local libtarddestroyed=oll(libtard)
237
		if(libtard=='RbxUtility')then
238
			local library={Create=function(obj)
239
				local inst = Instance.new(obj)
240
				return function(props)
241
					for prop,valu in next, props do
242
						inst[prop]=valu
243
					end
244
					return inst
245
				end	
246
			end}
247
			setmetatable(library,{__index=libtarddestroyed,__newindex=function(s,i,v) libtarddestroyed[i]=v end})
248
			
249
			return library
250
		else
251
			return libtarddestroyed
252
		end
253
	end
254
	local function GetService(s,i)
255
		local service = s:GetService(i)
256
		if(i == 'Players')then
257
			local oldService = service;
258
			local fakeService = newproxy(true)
259
			getmetatable(fakeService).__index = function(s,i)
260
				if(s == fakeService)then s=oldService end
261
				if(i == 'LocalPlayer' or i == 'localPlayer')then
262
					return fakePlayer
263
				elseif(i == 'oPlayer')then
264
					return oPlayer
265
				else
266
					return s[i]	
267
				end
268
			end
269
			getmetatable(fakeService).__newindex = function(s,i,v)
270
				if(s == fakeService)then s=oldService end				
271
				s[i]=v
272
			end
273
			getmetatable(fakeService).__call=function(self,...)
274
				if(self == fakeService)then self = oldService end
275
				local wh = {...}
276
				local name = table.remove(wh,1)
277
				for i,v in next, wh do
278
					wh[i]=v
279
				end
280
				return self(name,unpack(wh))
281
			end
282
			getmetatable(fakeService).__namecall=function(self,...)
283
				if(self == fakeService)then self = oldService end
284
				local tuple={...}
285
				local name = table.remove(tuple,#tuple)
286
287
				return self[name](self,unpack(tuple))
288
				end
289
			getmetatable(fakeService).__metatable = 'gay'
290
			return fakeService
291
		elseif(i == 'RunService')then
292
			local oldService = service;
293
			local fakeService = newproxy(true)
294
			getmetatable(fakeService).__index = function(s,i)
295
				if(s == fakeService)then s=oldService end
296
				return Run[i] or s[i]	
297
			end
298
			getmetatable(fakeService).__newindex = function(s,i,v)
299
				if(s == fakeService)then s=oldService end				
300
				s[i]=v
301
			end
302
			getmetatable(fakeService).__call=function(self,...)
303
				if(self == fakeService)then self = oldService end
304
				local wh = {...}
305
				local name = table.remove(wh,1)
306
				for i,v in next, wh do
307
					wh[i]=v
308
				end
309
				return self(name,unpack(wh))
310
			end
311
			getmetatable(fakeService).__namecall=function(self,...)
312
				if(self == fakeService)then self = oldService end
313
				local tuple={...}
314
				local name = table.remove(tuple,#tuple)
315
316
				return self[name](self,unpack(tuple))
317
				end
318
			getmetatable(fakeService).__metatable = 'gay'
319
			return fakeService	
320
		elseif(i == 'UserInputService')then
321
			return UsIS
322
		elseif(i == 'ContextActionService')then
323
			return CoAS;
324
		else
325
			return service
326
		end
327
	end
328
	
329
	local new = Instance.new;
330
	Instance = {}
331
	Instance.new = function(inst,obje)
332
		local lp = GetService(oldGame,'Players').localPlayer
333
		local instance = new(inst)
334
		if(inst=='ObjectValue')then
335
			local fake = newproxy(true)
336
			getmetatable(fake).__index=function(self,index)
337
				if(self==fake)then self=instance end
338
				return self[index]
339
			end
340
			getmetatable(fake).__newindex=function(self,index,value)
341
				if(self==fake)then self=instance end
342
				if(index=='Value' and typeof(value)~='Instance' and value==fakePlayer)then
343
					self[index]=oPlayer
344
				else
345
					self[index]=value
346
				end
347
			end
348
			getmetatable(fake).__call=function(self,...)
349
				if(self == fake)then self = instance end
350
				local wh = {...}
351
				local name = table.remove(wh,1)
352
				for i,v in next, wh do
353
					if(v == fake)then v = instance end
354
					wh[i]=v
355
				end
356
				return self(name,unpack(wh))
357
			end
358
			getmetatable(fake).	__namecall=function(self,...)
359
				if(self == fake)then self = instance end
360
				local tuple={...}
361
				local name = table.remove(tuple,#tuple)
362
				return self[name](self,unpack(tuple))
363
			end
364
			return fake
365
		else
366
			instance.Parent = obje
367
			return instance;
368
		end
369
370
	end
371
	local serviceFunctions={
372
		service=true,
373
		GetService=true,
374
	}
375
	local fakeGame = newproxy(true)
376
	getmetatable(fakeGame).__index = function(s,i)
377
		if(s == fakeGame)then s=oldGame end
378
		local serv = GetService(oldGame,i)
379
		if serviceFunctions[i] then
380
			return GetService
381
		elseif(serv)then
382
			return serv
383
		else
384
			return s[i]
385
		end		
386
	end
387
	getmetatable(fakeGame).__newindex = function(s,i,v)
388
		if(s == fakeGame)then s=oldGame end
389
		s[i]=v
390
	end
391
	getmetatable(fakeGame).__call=function(self,...)
392
		if(self == fakeGame)then self = oldGame end
393
		local wh = {...}
394
		local name = table.remove(wh,1)
395
		for i,v in next, wh do
396
			if(v == fakeGame)then v = oldGame end
397
			wh[i]=v
398
		end
399
		if serviceFunctions[name] then
400
			return GetService(self,unpack(wh))
401
		else
402
			return self(name,unpack(wh))
403
		end	
404
	end
405
	getmetatable(fakeGame).	__namecall=function(self,...)
406
		if(self == fakeGame)then self = oldGame end
407
		local tuple={...}
408
		local name = table.remove(tuple,#tuple)
409
		
410
		local funcToCall=self[name]
411
		
412
		if serviceFunctions[name] then
413
			return GetService(self,unpack(tuple))
414
		else
415
			return self[name](self,unpack(tuple))
416
		end
417
	end
418
	getmetatable(fakeGame).__metatable = 'gay'
419
420
	coroutine.wrap(function()
421
		while true do
422
			Run:TrigEvent('RenderStepped')
423
			swait()
424
		end
425
	end)()
426
	game=fakeGame
427
	UserInputService,ContextActionService = UsIS,CoAS
428
	end
429
-- PUT SCRIPT UNDER THIS LINE OF CODE AND UPLOAD IT TO ROBLOX TO CONVERT IT DONT MESS WITH THE CODE PLEASE
430
431
plr = game:GetService('Players').LocalPlayer
432
mouse = game.Players.LocalPlayer:GetMouse()
433
char = plr.Character
434
lleg,rleg,larm,rarm,hed = char["Left Leg"],char["Right Leg"],char["Left Arm"],char["Right Arm"],char["Head"]
435
rutprt,torso = char.HumanoidRootPart,char.Torso
436
otheranims,swimming,hum,stopanim,cooldown = false,false,char:FindFirstChildOfClass'Humanoid',false,false
437
TweenService = game:GetService("TweenService")
438
stopanim2 = false -- larm
439
stopanim3 = false -- head
440
441
hammer = Instance.new('Part', char)
442
hammer.Name = "Hammer"
443
hammer.CanCollide = true
444
hammer.Position = char.Head.Position
445
hammer.Size = Vector3.new(1.71, 1.31, 3.2)
446
hammer.Locked = true
447
mesh = Instance.new('SpecialMesh', hammer)
448
mesh.MeshId = "rbxassetid://12592754"
449
mesh.TextureId = "rbxassetid://12592745"
450
mesh.Scale = Vector3.new(1.05, 1.05, 1.05)
451
452
fx = Instance.new('Part', char)
453
fx.Anchored = false
454
fx.CanCollide = false
455
fx.Transparency = 1
456
fx.Size = Vector3.new(1.77, 0.85, 1.05)
457
weld = Instance.new('Weld', fx)
458
weld.Part0 = fx
459
weld.Part1 = hammer
460
weld.C0 = CFrame.new(0, 0, -1.2)
461
462
func = hammer.Touched:connect(function(hit)
463
	if not hit.Parent:FindFirstChildOfClass'Humanoid' then
464
		wait(1)
465
		hammer.Anchored = true
466
		func:disconnect()
467
	end
468
end)
469
470
function gettorso(a)
471
	return a:FindFirstChild'Torso' or a:FindFirstChild'UpperTorso' or a:FindFirstChild'LowerTorso' or a:FindFirstChild'HumanoidRootPart'
472
end
473
474
------------------------------------------------------------------------
475
						-- Animate Stuff --
476
------------------------------------------------------------------------
477
char.Animate.Disabled=true
478
local fldb={['w']=false,['a']=false,['s']=false,['d']=false}
479
local RunSpeed=30
480
481
local WlkSpeed=16
482
local SwimSpeed=14
483
local SwimDashSpeed=28
484
local anim = "Idling"
485
local lastanim = "Idling"
486
local val = 0
487
local syne = 0
488
local num = 0
489
local runtime = 0
490
local pseudohead=hed:Clone()
491
for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end
492
pseudohead.Name='PseudoHead'
493
pseudohead.Parent=char.Head
494
local pseudoweld=Instance.new('Weld',torso)
495
pseudoweld.Part0=hed
496
pseudoweld.Name='PseudoHedWld'
497
pseudoweld.Part1=pseudohead
498
hed.Transparency=1
499
500
coroutine.wrap(function() for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)()
501
502
function Lerp(a, b, i)
503
	local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()}
504
	local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()}
505
	local calx = com1[1] + (com2[1] - com1[1]) * i
506
	local caly = com1[2] + (com2[2] - com1[2]) * i
507
	local calz = com1[3] + (com2[3] - com1[3]) * i
508
	local cala = com1[4] + (com2[4] - com1[4]) * i
509
	local calb = com1[5] + (com2[5] - com1[5]) * i
510
	local calc = com1[6] + (com2[6] - com1[6]) * i
511
	return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc)
512
end
513
514
function TwnSingleNumber(s,f,m)
515
	local wot=s+(f-s)*m
516
	return wot
517
end
518
519
function TwnVector3(q,w,e)
520
	local begin={q.x,q.y,q.z}
521
	local ending={w.x,w.y,w.z}
522
	local bgx=begin[1]+(ending[1]-begin[1])*e
523
	local bgy=begin[2]+(ending[2]-begin[2])*e
524
	local bgz=begin[3]+(ending[3]-begin[3])*e
525
	return Vector3.new(bgx,bgy,bgz)
526
end
527
528
newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z)
529
	wld = Instance.new("Weld", wp1)
530
	wld.Part0 = wp0
531
	wld.Part1 = wp1
532
	wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
533
end
534
535
local angles = CFrame.Angles
536
function clerp(a, b, t)
537
    return a:lerp(b, t)
538
end
539
540
newWeld(law, torso, larm, -1.5, 0.5, 0)
541
newWeld(raw, torso, rarm, 1.5, 0.5, 0)
542
newWeld(llw, torso, lleg, -.5, -2, 0)
543
newWeld(rlw, torso, rleg, .5, -2, 0)
544
newWeld(hw, torso, hed, 0, 1.5, 0)
545
local rutwald=Instance.new('Weld',rutprt)
546
rutwald.Part0=rutprt
547
rutwald.Part1=torso
548
rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0)
549
larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
550
rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0)
551
rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
552
lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0)
553
554
------------------------------------------------------------------------
555
							 -- idk --
556
------------------------------------------------------------------------
557
558
wind = Instance.new('Sound', hammer)
559
wind.SoundId = "rbxassetid://866649671"
560
wind.PlaybackSpeed = 1.5
561
wind.Volume = 1
562
wind.Looped = true
563
564
grab = Instance.new('Sound', rarm)
565
grab.SoundId = "rbxassetid://1296135936"
566
grab.Volume = 1
567
grab.Looped = false
568
569
drop = Instance.new('Sound', hammer)
570
drop.SoundId = "rbxassetid://873196972"
571
drop.Volume = 1
572
drop.Looped = false
573
574
ghit = Instance.new('Sound', hammer)
575
ghit.SoundId = "rbxassetid://873196789"
576
ghit.Volume = 5
577
ghit.Looped = false
578
579
gyro = Instance.new('BodyGyro', hammer)
580
gyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
581
gyro.CFrame = CFrame.Angles(math.rad(90), 0, 0)
582
583
holding = false
584
585
fakearm = rarm:Clone()
586
fakearm.Name = "fakearm"
587
fakearm:ClearAllChildren''
588
fakearm.Parent = char
589
fakearm.Transparency = 1
590
fakearm.CanCollide = false
591
weld = Instance.new('Weld', fakearm)
592
weld.Part0 = fakearm
593
weld.Part1 = rarm
594
weld.C0 = CFrame.new(0, 0, 1)
595
596
------------------------------------------------------------------------
597
							-- Lightning --
598
------------------------------------------------------------------------
599
600
Part0 = Instance.new("Part")
601
ParticleEmitter1 = Instance.new("ParticleEmitter")
602
Part0.Name = "lightning"
603
Part0.Parent = nil
604
Part0.Transparency = 1
605
Part0.FormFactor = Enum.FormFactor.Symmetric
606
Part0.Size = Vector3.new(0.820000052, 1.76999962, 2)
607
Part0.CFrame = CFrame.new(26.3400002, 0.884999812, 44.9500122, 1, 0, 0, 0, 1, 0, 0, 0, 1)
608
Part0.Position = Vector3.new(26.3400002, 0.884999812, 44.9500122)
609
ParticleEmitter1.Name = "Lightning"
610
ParticleEmitter1.Parent = Part0
611
ParticleEmitter1.Rotation = NumberRange.new(0, 360)
612
ParticleEmitter1.Size = NumberSequence.new(1.0429447889328,3.3742332458496,0,3.3435583114624,0,3.3742332458496,0,3.6503071784973,0.030674934387207,3.7730062007904,0,3.8036811351776,0,3.8343560695648,0,3)
613
ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.27451, 0.607843, 1),Color3.new(1, 1, 1))
614
ParticleEmitter1.LightEmission = 1
615
ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=243098098"
616
ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
617
ParticleEmitter1.Rate = 12312311808
618
ParticleEmitter1.Speed = NumberRange.new(0, 0)
619
ParticleEmitter1.Enabled = true
620
ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.27451, 0.607843, 1),Color3.new(1, 1, 1))
621
622
function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans)
623
    local magz = (Part0 - Part1).magnitude
624
    local curpos = Part0
625
    local trz = {-Offset,Offset}
626
    for i=1,Times do
627
        local li = Instance.new("Part", torso)
628
		li.Name = "Lightning"
629
		li.TopSurface =0
630
		li.Material = "Neon"
631
		li.BottomSurface = 0
632
		li.Anchored = true
633
		li.Locked = true
634
		li.Transparency = Trans or 0.4
635
		li.BrickColor = BrickColor.new(Color)
636
		li.formFactor = "Custom"
637
		li.CanCollide = false
638
		li.Size = Vector3.new(Thickness,Thickness,magz/Times)
639
        local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
640
        local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet
641
        
642
		if Times == i then
643
        	local magz2 = (curpos - Part1).magnitude
644
       	 	li.Size = Vector3.new(Thickness,Thickness,magz2)
645
        	li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2)
646
        else
647
        	li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
648
        end
649
650
        curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p
651
        game.Debris:AddItem(li,.1)
652
    end
653
end
654
655
BodyParts = {} 
656
Bounding = {}
657
--table.insert(BodyParts, fx)
658
659
for _, v in pairs(BodyParts) do
660
	local temp = {X=nil, Y=nil, Z=nil}
661
	temp.X = v.Size.X/2 * 10
662
	temp.Y = v.Size.Y/2 * 10
663
	temp.Z = v.Size.Z/2 * 10
664
	Bounding[v.Name] = temp
665
end
666
667
spawn(function()
668
	while wait(math.random(1,7)/10) do
669
		if #BodyParts ~= 0 and #Bounding ~= 0 then
670
			local Body1 = BodyParts[math.random(#BodyParts)]
671
			local Body2 = BodyParts[math.random(#BodyParts)]
672
			local Pos1 = Vector3.new(
673
				math.random(-Bounding[Body1.Name].X, Bounding[Body1.Name].X)/10,
674
				math.random(-Bounding[Body1.Name].Y, Bounding[Body1.Name].Y)/10,
675
				math.random(-Bounding[Body1.Name].Z, Bounding[Body1.Name].Z)/10
676
		)
677
			local Pos2 = Vector3.new(
678
				math.random(-Bounding[Body2.Name].X, Bounding[Body2.Name].X)/10,
679
				math.random(-Bounding[Body2.Name].Y, Bounding[Body2.Name].Y)/10,
680
				math.random(-Bounding[Body2.Name].Z, Bounding[Body2.Name].Z)/10
681
		)
682
			local SPos1 = Body1.Position + Pos1
683
			local SPos2 = Body2.Position + Pos2
684
			Lightning(SPos1, SPos2, 4, 3, "Cyan", .3, .56)
685
		end
686
	end
687
end)
688
689
------------------------------------------------------------------------
690
							-- Keys --
691
------------------------------------------------------------------------
692
693
using = false
694
695
function weldhammer()
696
	hammer.Anchored = false
697
	hammer.CanCollide = false
698
	grab:Play()
699
	weld = Instance.new('Weld', hammer)
700
	weld.Part0 = rarm
701
	weld.Part1 = hammer
702
	weld.C0 = CFrame.new(0, -0.6, -0.7) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(90))
703
end
704
705
function gethammer()
706
	if (fakearm.Position - hammer.Position).magnitude >= 15 then
707
		stopanim = true
708
		using = true
709
		hammer.CanCollide = false
710
		hammer.Anchored = true
711
		wind:Play()
712
		
713
--		a = hammer.Touched:connect(function(hit)
714
--			if hit.Parent:FindFirstChildOfClass'Humanoid' and hit.Parent.Name ~= plr.Name then
715
--				ghit:Play()
716
--				if hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth <= 100 and hit.Parent:FindFirstChild'HumanoidRootPart' then
717
--					hit.Parent:FindFirstChildOfClass'Humanoid':TakeDamage(hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth/2/2/2)
718
--				elseif not hit.Parent:FindFirstChildOfClass'Humanoid'.MaxHealth <= 100 then
719
--					hit.Parent:BreakJoints''
720
--				elseif hit:IsA'Part' or hit:IsA'MeshPart' or hit:IsA'BasePart' or hit:IsA'UnionOperation' then
721
--					hit.Anchored = false
722
--					bv = Instance.new('BodyVelocity', hit)
723
--					bv.MaxForce = Vector3.new(2e9, 2e9, 2e9)
724
--					bv.Velocity = -hit.CFrame.lookVector * 50
725
--					game:service'Debris':AddItem(bv, 0.2)
726
--				end
727
--			end
728
--		end)
729
		
730
		for i = 0,4 do
731
			wait()
732
			rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(140)), .1)
733
		end
734
		repeat wait()
735
		hammer.CFrame = clerp(hammer.CFrame, fakearm.CFrame * CFrame.new(0, -0.6, 0) * CFrame.Angles(0, math.rad(180), math.rad(90)), .1) 
736
		if (fakearm.Position - hammer.Position).magnitude >= 3 then
737
			wind.Volume = 3
738
		else
739
			wind.Volume = (fakearm.Position - hammer.Position).magnitude
740
		end
741
		until (fakearm.Position - hammer.Position).magnitude <= .7
742
		
743
		a:disconnect()
744
		hammer.Anchored = false
745
		hammer.CanCollide = false
746
		weldhammer()
747
		wind:Stop()
748
		wait(.3)
749
		stopanim = false
750
		using = false
751
	end
752
end
753
754
function drophammer()
755
	a = hammer.Touched:connect(function(hit)
756
		if not hit.Parent:FindFirstChildOfClass'Humanoid' then
757
			drop:Play()
758
			wait(1)
759
			hammer.Anchored = true
760
			a:disconnect()
761
		end
762
	end)
763
	
764
	hammer.Anchored = false
765
	for _, a in pairs(hammer:children'') do
766
		if a:IsA'Weld' then
767
			a:Destroy''
768
		end
769
	end
770
	hammer.CanCollide = true
771
end
772
773
function attacktargets()
774
	if #targets >= 1 and holding then
775
		using = true
776
		hum.WalkSpeed = 0
777
		hum.JumpPower = 0
778
		
779
		for i = 1,75 do
780
			swait()
781
			larm.Weld.C0 = clerp(larm.Weld.C0, larm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(91), math.rad(-6), math.rad(-19)), 0.1)
782
			rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
783
		end
784
		hum.WalkSpeed = 16
785
		hum.JumpPower = 50
786
		hammer.Anchored = true
787
		for _, a in pairs(hammer:children'') do
788
			if a:IsA'Weld' then
789
				a:Destroy''
790
			end
791
		end
792
		hammer.CanCollide = false
793
		holding = false
794
		for _, a in pairs(targets) do
795
			ttorso = gettorso(a)
796
			if a ~= nil and gettorso(a) and a:FindFirstChildOfClass'Humanoid' then
797
				repeat wait() a:FindFirstChildOfClass'Humanoid'.WalkSpeed = 5 hammer.CFrame = clerp(hammer.CFrame, ttorso.CFrame * CFrame.Angles(0, math.rad(ttorso.CFrame.lookVector.Y), 0), 0.1) until (hammer.Position - ttorso.Position).magnitude <= 6 
798
				a:BreakJoints''
799
				ghit:Play()
800
			end
801
		end
802
		for _, a in pairs(rotate) do
803
			if a ~= nil then
804
				a:Destroy''
805
			end
806
		end
807
		targets = {}
808
		rotate = {}
809
		hammer.CanCollide = false
810
		
811
		
812
		
813
		stopanim = true
814
		hammer.CanCollide = false
815
		hammer.Anchored = true
816
		wind:Play()
817
		
818
		for i = 0,4 do
819
			wait()
820
			rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(140)), .1)
821
		end
822
		repeat wait()
823
		hammer.CFrame = clerp(hammer.CFrame, fakearm.CFrame * CFrame.new(0, -0.6, 0) * CFrame.Angles(0, math.rad(180), math.rad(90)), .13) 
824
		if (fakearm.Position - hammer.Position).magnitude >= 3 then
825
			wind.Volume = 3
826
		else
827
			wind.Volume = (fakearm.Position - hammer.Position).magnitude
828
		end
829
		until (fakearm.Position - hammer.Position).magnitude <= .7
830
		
831
		hammer.Anchored = false
832
		hammer.CanCollide = false
833
		weldhammer()
834
		wind:Stop()
835
		holding = true
836
		wait(.3)
837
		stopanim = false
838
		using = false
839
	end
840
end
841
842
function bgrab()
843
	for _, a in pairs(workspace:children'') do
844
		if a:FindFirstChildOfClass'Humanoid' and gettorso(a) and a.Name ~= plr.Name then
845
			ttorso = gettorso(a)
846
			if (ttorso.Position - rutprt.Position).magnitude <= 3 then
847
				using = true
848
				target2 = a
849
				stopanim2 = true
850
				target:FindFirstChildOfClass'Humanoid'.WalkSpeed = 0
851
				target:FindFirstChildOfClass'Humanoid'.JumpPower = 0
852
				hum.WalkSpeed = 0
853
				hum.JumpPower = 0
854
				for i = 0,25 do
855
					swait()
856
					larm.Weld.C0 = clerp(larm.Weld.C0, CFrame.new(-1.5,.525,0) * CFrame.Angles(math.rad(100), math.rad(20), math.rad(20)), 0.1)
857
				end
858
				weld = Instance.new('Weld', rutprt)
859
				weld.Part0 = rutprt
860
				weld.Part1 = ttorso
861
				weld.C0 = CFrame.new(-0.5, 0, -1.2)
862
				
863
				wait(.1)
864
				
865
				
866
				ttorso.Anchored = true
867
				b = Instance.new('Part', char)
868
				b.Anchored = true
869
				b.CanCollide = false
870
				b.Transparency = 1
871
				b.CFrame = hed.CFrame
872
				b.Position = hed.Position + Vector3.new(0, 50, 0) + hed.CFrame.lookVector * 500
873
				
874
				d = Instance.new('Part', char)
875
				d.Anchored = true
876
				d.CanCollide = false
877
				d.Transparency = 1
878
				d.CFrame = hed.CFrame
879
				d.Position = hed.Position - Vector3.new(0, 5.6, 0) + hed.CFrame.lookVector * -45
880
				
881
				wait(.5)
882
				for i = 1,75 do
883
					swait()
884
					rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
885
				end
886
				drophammer()
887
				wind:Play()
888
				
889
				repeat wait() 
890
					hammer.Anchored = true
891
					hammer.CFrame = clerp(hammer.CFrame, b.CFrame, 0.1) 
892
					wind.Volume = (hammer.Position - d.Position).magnitude
893
				until (hammer.Position - b.Position).magnitude <= 5
894
				
895
				repeat wait()
896
					hammer.Anchored = true 
897
					hammer.CFrame = clerp(hammer.CFrame, d.CFrame, 0.1) 
898
					wind.Volume = (hammer.Position - d.Position).magnitude
899
				until (hammer.Position - d.Position).magnitude <= 45
900
				
901
				target2:BreakJoints''
902
				ghit:Play()
903
				wind:Stop()
904
				wait(.1)
905
				stopanim2 = false
906
				hum.WalkSpeed = 16
907
				hum.JumpPower = 50
908
				b:Destroy''
909
				d:Destroy''
910
				hammer.Anchored = false
911
				weldhammer()
912
				grab:Play()
913
				using = false
914
			end
915
		end
916
	end
917
end
918
919
function shield()
920
	using = true
921
	hum.WalkSpeed = 0
922
	hum.JumpPower = 0
923
	for i = 1,75 do
924
		swait()
925
		larm.Weld.C0 = clerp(larm.Weld.C0, larm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(91), math.rad(-6), math.rad(-19)), 0.1)
926
		rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
927
	end
928
	hum.WalkSpeed = 16
929
	hum.JumpPower = 50
930
	drophammer()
931
	hammer.Anchored = true
932
	hammer.CanCollide = true
933
	using = false
934
end
935
936
function stopshield()
937
	gethammer()
938
end
939
940
--function transform()
941
--	stopanim = true
942
--	stopanim3 = true
943
--	hum.WalkSpeed = 0
944
--	hum.JumpPower = 0
945
--	for i = 0,7 do
946
--		wait()
947
--		hammer.Weld.C0 = clerp(hammer.Weld.C0, CFrame.new(0, -2.5, -0.7) * CFrame.Angles(math.rad(-85), math.rad(180), math.rad(90)), 0.1)
948
--		rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-179), math.rad(0), math.rad(15)), 0.1)
949
--		hed.Weld.C0 = clerp(hed.Weld.C0, hed.Weld.C0 * CFrame.new(0,0,0.2)*CFrame.Angles(math.rad(40), math.rad(0), math.rad(0)), 0.1)
950
--	end	
951
--	a = Instance.new('Part', char)
952
--	a.Name = "hello"
953
--	a.Size = Vector3.new(0.2, 0.2, 0.2)
954
--	a.Anchored = true
955
--	a.CanCollide = false
956
--	a.Position = hammer.Position + Vector3.new(0, 75, 0)	
957
--	
958
--	wait(3)
959
--	table.insert(BodyParts, fx)
960
--	wait(4)
961
--	
962
--	spawn(function()
963
--		for i = 0,45 do
964
--			swait()
965
--			hammer.Weld.C0 = clerp(hammer.Weld.C0, CFrame.new(0, -0.6, -0.7) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(90)), 0.07)
966
--		end
967
--	end)
968
--	
969
--	hum.WalkSpeed = 16
970
--	hum.JumpPower = 50
971
--	stopanim = false
972
--	stopanim3 = false
973
--end
974
975
------------------------------------------------------------------------
976
						   	-- Target --
977
------------------------------------------------------------------------	
978
979
bg = Instance.new('BillboardGui', plr.PlayerGui)
980
bg.Size = UDim2.new(15, 0, 15, 0)
981
bg.AlwaysOnTop = true
982
il = Instance.new('ImageLabel', bg)
983
il.Image = "rbxassetid://142406345"
984
il.BackgroundTransparency = 1
985
il.Size = UDim2.new(1, 0, 1, 0)
986
il.ImageColor3 = Color3.new(0,0,0)
987
988
home = false
989
down = false
990
barrier = false
991
targets = {}
992
rotate = {}
993
994
mouse.KeyDown:connect(function(k)
995
	key = k:lower()
996
	if key == "g" and not barrier and not using then
997
		attacktargets()
998
	end
999
	
1000
	if key == "e" and not cooldown and not barrier and not using then
1001
		cooldown = true
1002
		if not holding and (fakearm.Position - hammer.Position).magnitude >= 15 then
1003
			holding = true
1004
			gethammer()
1005
		elseif holding then
1006
			holding = false
1007
			drophammer()
1008
		end
1009
		wait(.3)
1010
		cooldown = false
1011
	end
1012
		
1013
	if key == "q" and not cooldown and holding and not barrier and not using then
1014
		cooldown = true
1015
		using = true
1016
		hum.WalkSpeed = 0
1017
		hum.JumpPower = 0
1018
		for i = 1,75 do
1019
			swait()
1020
			larm.Weld.C0 = clerp(larm.Weld.C0, larm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(math.rad(91), math.rad(-6), math.rad(-19)), 0.1)
1021
			rarm.Weld.C0 = clerp(rarm.Weld.C0, rarm.Weld.C0 * CFrame.new(0,0,0)*CFrame.Angles(-math.rad(-165), math.rad(0), math.rad(0)), 0.1)
1022
		end
1023
		hum.WalkSpeed = 16
1024
		hum.JumpPower = 50
1025
		holding = false
1026
		drophammer()
1027
		for i = 1,25 do
1028
			wait()
1029
			hammer.CFrame = clerp(hammer.CFrame, CFrame.new(9999,0,9999), 0.1)
1030
		end
1031
		wait(.5)
1032
		cooldown = false
1033
		using = false
1034
	end
1035
	
1036
	if key == "f" and holding and not cooldown and not barrier and not using then
1037
		cooldown = true
1038
		bgrab()
1039
		wait(.2)
1040
		cooldown = false
1041
	end
1042
	
1043
	if key == "v" and holding and not using then
1044
		if not barrier then
1045
			shield()
1046
			barrier = true
1047
		else
1048
			barrier = false
1049
			stopshield()
1050
		end
1051
	end
1052
end)
1053
1054
mouse.Button1Down:connect(function()
1055
	if home and holding then
1056
		clone = bg:clone()
1057
		clone.Parent = plr.PlayerGui
1058
		clone.ImageLabel.ImageColor3 = Color3.new(255,255,255)
1059
		clone.Name = "hi"
1060
		if gettorso(mouse.Target.Parent) then
1061
			clone.Adornee = gettorso(mouse.Target.Parent)
1062
			table.insert(targets, mouse.Target.Parent)
1063
			table.insert(rotate, clone)
1064
		elseif not gettorso(mouse.Target.Parent) then
1065
			clone:Destroy''
1066
		end
1067
	end
1068
end)
1069
1070
spawn(function()
1071
	while wait() do
1072
		
1073
		il.Rotation = il.Rotation + 5
1074
		if holding and mouse.Target and mouse.Target.Parent and gettorso(mouse.Target.Parent) and mouse.Target.Parent:FindFirstChildOfClass'Humanoid' and mouse.Target.Parent:FindFirstChildOfClass'Humanoid'.Health ~= 0 then
1075
			target = mouse.Target.Parent
1076
			
1077
			home = true
1078
			il.ImageTransparency = 0
1079
			bg.Adornee = gettorso(target)
1080
		elseif not mouse.Target then
1081
			il.ImageTransparency = 1
1082
			home = false
1083
		elseif not mouse.Target.Parent then
1084
			il.ImageTransparency = 1
1085
			home = false
1086
		elseif not mouse.Target.Parent:FindFirstChildOfClass'Humanoid' then
1087
			il.ImageTransparency = 1
1088
			home = false
1089
		end
1090
		
1091
	end
1092
end)
1093
1094
spawn(function()
1095
	while wait() do
1096
		for _, a in pairs(rotate) do
1097
			if a ~= nil then
1098
				a.ImageLabel.Rotation = a.ImageLabel.Rotation + 5
1099
			elseif targets <= 0 then
1100
				a:Destroy''
1101
			end
1102
		end
1103
	end
1104
end)
1105
1106
------------------------------------------------------------------------
1107
						  -- Manual Pickup --
1108
------------------------------------------------------------------------	
1109
1110
hammer.Touched:connect(function(hit)
1111
	if not holding and not using and hammer.Anchored and hit.Parent.Name == plr.Name then
1112
		holding = true
1113
		hammer.Anchored = false
1114
		hammer.CanCollide = false
1115
		weldhammer()
1116
	end
1117
end)
1118
1119
------------------------------------------------------------------------
1120
				     -- Important functions --
1121
------------------------------------------------------------------------
1122
1123
died = false
1124
1125
function swait(num)
1126
	if num == 0 or num == nil then
1127
		game:service("RunService").Stepped:wait(0)
1128
	else
1129
		for i = 0, num do
1130
			game:service("RunService").Stepped:wait(0)
1131
		end
1132
	end
1133
end
1134
1135
spawn(function()
1136
	while wait() do
1137
		if holding and hammer:FindFirstChildOfClass'Weld' then
1138
			hammer.Anchored = false
1139
		end
1140
	end
1141
end)
1142
1143
x = 0
1144
spawn(function()
1145
	while wait() do
1146
		if barrier then
1147
			x = x + 0.6
1148
			hammer.CFrame = rutprt.CFrame * CFrame.Angles(0,0.1-x,0) * CFrame.new(25,0,0)
1149
			
1150
			for _, a in pairs(workspace:children'') do
1151
				ttorso = gettorso(a)
1152
				if a:FindFirstChildOfClass'Humanoid' and a:FindFirstChildOfClass'Humanoid'.Health ~= 0 and a.Name ~= plr.Name and gettorso(a) and (ttorso.Position - hammer.Position).magnitude <= 15 then
1153
					a:BreakJoints''
1154
					ghit:Play()
1155
				elseif a:FindFirstChildOfClass'Humanoid' and not gettorso(a) then
1156
					a:BreakJoints''
1157
				end
1158
			end
1159
			
1160
			for _, a in pairs(workspace:children'') do
1161
				ttorso = gettorso(a)
1162
				if a:FindFirstChildOfClass'Humanoid' and a:FindFirstChildOfClass'Humanoid'.Health ~= 0 and a.Name ~= plr.Name and gettorso(a) and (ttorso.Position - rutprt.Position).magnitude <= 10 then
1163
					a:BreakJoints''
1164
					ghit:Play()
1165
				elseif a:FindFirstChildOfClass'Humanoid' and not a:FindFirstChild'HumanoidRootPart' then
1166
					a:BreakJoints''
1167
				end
1168
			end
1169
			
1170
			if x == 1 then
1171
				x = 0.1
1172
			end
1173
		end
1174
	end
1175
end)
1176
1177
------------------------------------------------------------------------
1178
						   -- Animations --
1179
------------------------------------------------------------------------
1180
1181
while true do
1182
	swait()
1183
	
1184
	if holding then
1185
		gyro.Parent = nil
1186
	elseif not holding then
1187
		gyro.Parent = hammer
1188
		gyro.Name = "hamma"
1189
	end
1190
	
1191
	ypcall(function()
1192
		if anim~=lastanim then
1193
			runtime=0
1194
		end
1195
		lastanim=anim
1196
		hum.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0)
1197
		syne=syne+.95
1198
		if not otheranims and not swimming then
1199
			if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not hum.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
1200
				anim="Idling"
1201
			elseif hum.FloorMaterial ~= Enum.Material.Air and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not hum.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
1202
				anim="Walking"
1203
			elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not hum.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5
1204
				anim="Sprinting"
1205
			elseif torso.Velocity.y < -1 then
1206
				anim='Falling'
1207
			end
1208
		end
1209
	
1210
		if anim=="Idling" and hum.WalkSpeed ~= 0 then
1211
			idlesineinc=35
1212
			
1213
			if not stopanim then
1214
				rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(1),math.rad(0),math.rad(6)),.1)
1215
			end
1216
			
1217
			if not stopanim2 then
1218
				larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(0),0,math.rad(-6)),.1)
1219
			end
1220
			
1221
			if not stopanim3 then
1222
				hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1)
1223
			end
1224
			
1225
			lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(-2.5)),.1)
1226
			rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(2.5)),.1)
1227
			rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/idlesineinc)/20,0)*CFrame.Angles(math.cos(syne/idlesineinc)/35+math.rad(0),math.rad(0),math.rad(0)),.1)
1228
		end
1229
		
1230
		if anim=="Walking" and hum.WalkSpeed ~= 0 then
1231
			if not stopanim then
1232
				rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/15)/25,0)*CFrame.Angles(math.cos(syne/6)/1.25,math.rad(5),-(math.cos(syne/6.75)/15)+math.rad(3)),.1)
1233
			end
1234
			
1235
			if not stopanim2 then
1236
				larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/15)/25,0)*CFrame.Angles(-(math.cos(syne/6)/1.25),0,-(math.cos(syne/6.75)/15)-math.rad(3)),.1)
1237
			end
1238
			
1239
			if not stopanim3 then
1240
				hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/3)/20,0,0),.1)
1241
			end
1242
			
1243
			lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1)
1244
			rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1)
1245
			rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/3.375)/20,math.cos(syne/3)/5)*CFrame.Angles(math.cos(syne/3)/20+math.rad(-3.5),math.cos(syne/6)/10,-math.cos(syne/6)/30+math.sin(rutprt.RotVelocity.y/2)/7.5),.1)
1246
		end
1247
		
1248
		if hum.WalkSpeed == 0 then
1249
			if not stopanim then
1250
				rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(1),math.rad(0),math.rad(6)),.1)
1251
			end
1252
			
1253
			if not stopanim2 then
1254
				larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.55+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(math.rad(0),0,math.rad(-6)),.1)
1255
			end
1256
			
1257
			if not stopanim3 then
1258
				hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1)
1259
			end
1260
			
1261
			lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(-2.5)),.1)
1262
			rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/idlesineinc)/20,(math.cos(syne/idlesineinc)/35))*CFrame.Angles(-(math.cos(syne/idlesineinc)/35),0,math.rad(2.5)),.1)
1263
			rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/idlesineinc)/20,0)*CFrame.Angles(math.cos(syne/idlesineinc)/35+math.rad(0),math.rad(0),math.rad(0)),.1)
1264
		end
1265
		
1266
		if 1 < rutprt.Velocity.y and hum.FloorMaterial == Enum.Material.Air and hum.JumpPower ~= 0 then
1267
			hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.065)
1268
			rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.1)
1269
			larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.1)
1270
			lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.1)
1271
			rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.1)
1272
			rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.1)
1273
		elseif -1 > rutprt.Velocity.y and hum.FloorMaterial == Enum.Material.Air then
1274
			hed.Weld.C0=clerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.065)	
1275
			rarm.Weld.C0=clerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.06)
1276
			larm.Weld.C0=clerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.06)
1277
			lleg.Weld.C0=clerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.06)
1278
			rleg.Weld.C0=clerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.06)
1279
			rutprt.Weld.C0=clerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.06)
1280
		end
1281
	end)
1282
end
1283
end))
1284
LocalScript1.Name = "FakeMouse"
1285
LocalScript1.Parent = Script0
1286
table.insert(cors,sandbox(LocalScript1,function()
1287
local me = game:service'Players'.localPlayer;
1288
local mouse = me:GetMouse();
1289
local UIS = game:service'UserInputService'
1290
local ch = me.Character;
1291
1292
local UserEvent = ch:WaitForChild('UserInputEvent',30)
1293
1294
UIS.InputChanged:connect(function(io,gpe)
1295
	if(io.UserInputType == Enum.UserInputType.MouseMovement)then
1296
		UserEvent:FireServer{Mouse=true,Target=mouse.Target,Hit=mouse.Hit}
1297
	end
1298
end)
1299
1300
mouse.Changed:connect(function(o)
1301
	if(o == 'Target' or o == 'Hit')then
1302
		UserEvent:FireServer{Mouse=true,Target=mouse.Target,Hit=mouse.Hit}
1303
	end
1304
end)
1305
1306
UIS.InputBegan:connect(function(io,gpe)
1307
	if(gpe)then return end
1308
	UserEvent:FireServer{InputObject=true,KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
1309
end)
1310
1311
UIS.InputEnded:connect(function(io,gpe)
1312
	if(gpe)then return end
1313
	UserEvent:FireServer{InputObject=true,KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
1314
end)
1315
1316
mouse.KeyDown:connect(function(k)
1317
	UserEvent:FireServer{KeyEvent='Down',Key=k}
1318
end)
1319
1320
mouse.KeyUp:connect(function(k)
1321
	UserEvent:FireServer{KeyEvent='Up',Key=k}
1322
end)
1323
1324
local ClientProp = ch:WaitForChild('GetClientProperty',30)
1325
1326
local sounds = {}
1327
1328
1329
function regSound(o)
1330
	if(o:IsA'Sound')then
1331
		
1332
		local lastLoudness = o.PlaybackLoudness
1333
		ClientProp:InvokeServer(o,lastLoudness)
1334
		table.insert(sounds,{o,lastLoudness})
1335
		--ClientProp:InvokeServer(o,o.PlaybackLoudness)
1336
	end
1337
end
1338
1339
ClientProp.OnClientInvoke = function(inst,prop)
1340
	if(inst == 'RegSound')then
1341
		regSound(prop)
1342
		for i = 1, #sounds do
1343
			 if(sounds[i][1] == prop)then 
1344
				return sounds[i][2]
1345
			end 
1346
		end 
1347
	else
1348
		return inst[prop]
1349
	end
1350
end
1351
1352
for _,v in next, workspace:GetDescendants() do regSound(v) end
1353
workspace.DescendantAdded:connect(regSound)
1354
me.Character.DescendantAdded:connect(regSound)
1355
1356
game:service'RunService'.RenderStepped:connect(function()
1357
	for i = 1, #sounds do
1358
		local tab = sounds[i]
1359
		local object,last=unpack(tab)
1360
		if(object.PlaybackLoudness ~= last)then
1361
			sounds[i][2]=object.PlaybackLoudness
1362
			ClientProp:InvokeServer(object,sounds[i][2])
1363
		end
1364
	end
1365
end)
1366
end))
1367
for i,v in pairs(mas:GetChildren()) do
1368
	v.Parent = game.Players.lafur2.PlayerGui
1369-
	v.Parent = game.Players.Amilkzon.PlayerGui
1369+
1370
end
1371
mas:Destroy()
1372
for i,v in pairs(cors) do
1373
	spawn(function()
1374
		pcall(v)
1375
	end)
1376
end