View difference between Paste ID: Jtv7XgC4 and AvfDfeyn
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
	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
me = game.Players.rockman5
153
char = me.Character
154
Selected = false
155
Able = true
156
Arrow = nil
157
ArrowOn = false
158
Hurt = false
159
Deb = true
160
Reloading = false
161
Shooting = false
162
Slashing = false
163
necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) 
164
EffectOn = false
165
Accuracy = 1
166
SelAnim = false
167
DMG = 25
168
169
LapaCol = "Really black"
170
HandCol = "Really black"
171
MiddleCol = "Really black"
172
ViiniCol = "Really black"
173
174
Icon = "http://www.roblox.com/asset/?id=51902588"
175
176
Keys = {
177
e = false,
178
}
179
180
ModelName = "Epic Bow"
181
182
CA = CFrame.Angles
183
CN = CFrame.new
184
MR = math.rad
185
MP = math.pi
186
MRA = math.random
187
MH = math.huge
188
189
UD = UDim2.new
190
C3 = Color3.new
191
192
MaximumPower = 200
193
MaxSpecial = 100
194
Special = MaxSpecial
195
196
Sounds = {
197
Slash = {"rbxasset://sounds//swordslash.wav", 1.2, 1},
198
Shoot = {"http://www.roblox.com/asset/?id=16211041", 2, 1},
199
Stick = {"http://www.roblox.com/asset/?id=2767090", 15, 1},
200
Hit = {"http://www.roblox.com/asset/?id=10209590", 0.9, 1},
201
Block = {"rbxasset://sounds\\metal.ogg", 1.4, 1},
202
}
203
204
function RC(Pos, Dir, Max, Ignore)
205
return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999)), Ignore)
206
end
207
208
function RayC(Start, En, MaxDist, Ignore)
209
return RC(Start, (En - Start), MaxDist, Ignore)
210
end
211
212
function DetectSurface(pos, part)
213
local surface = nil
214
local pospos = part.CFrame
215
local pos2 = pospos:pointToObjectSpace(pos)
216
local siz = part.Size
217
local shaep = part.Shape
218
if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
219
surface = {"Anything", CN(pospos.p, pos)*CN(0, 0, -(pospos.p - pos).magnitude)*CA(MR(-90), 0, 0)}
220
else
221
if pos2.Y > ((siz.Y/2)-0.04) then
222
surface = {"Top", CA(0, 0, 0)}
223
elseif pos2.Y < -((siz.Y/2)-0.04) then
224
surface = {"Bottom", CA(-MP, 0, 0)}
225
elseif pos2.X > ((siz.X/2)-0.04) then
226
surface = {"Right", CA(0, 0, MR(-90))}
227
elseif pos2.X < -((siz.X/2)-0.04) then
228
surface = {"Left", CA(0, 0, MR(90))}
229
elseif pos2.Z > ((siz.Z/2)-0.04) then
230
surface = {"Back", CA(MR(90), 0, 0)}
231
elseif pos2.Z < -((siz.Z/2)-0.04) then
232
surface = {"Front", CA(MR(-90), 0, 0)}
233
end
234
end
235
return surface
236
end
237
238
function Compute(pos1, pos2)
239
local pos3 = Vector3.new(pos2.x, pos1.y, pos2.z)
240
return CN(pos1, pos3)
241
end
242
243
function Notime(func, tiem)
244
if tiem then wait(tiem) end
245
coroutine.resume(coroutine.create(function() func() end))
246
end
247
248
function waitChild(p, n)
249
local child = p:findFirstChild(n)
250
if child then return child end
251
while true do
252
child = p.ChildAdded:wait()
253
if child.Name == n then return child end
254
end
255
end
256
257
function getHumanoid(c)
258
for _,v in pairs(c:children()) do
259
if v:IsA("Humanoid") and c ~= char then if v.Health > 0 then return v end end
260
end
261
end
262
263
function SE(part, pos)
264
EffectOn = true
265
local lastP = (part.CFrame * pos).p
266
Notime(function()
267
while EffectOn do
268
wait()
269
local posnow = (part.CFrame * pos).p
270
local eff = Part(workspace, true, false, 0, 0, "White", 0.2, 1, 0.2)
271
local magn = (lastP - posnow).magnitude
272
local cf = CN(lastP, posnow) * CA(MR(-90), 0, 0)
273
local mes2 = Instance.new("SpecialMesh",eff)
274
mes2.Scale = Vector3.new(0.6, magn, 0.6)
275
eff.CFrame = cf * CN(0, magn/2, 0)
276
Notime(function()
277
for i = 0, 1, 0.1 do
278
wait()
279
eff.Transparency = i
280
eff.Reflectance = 0.15*i
281
mes2.Scale = Vector3.new(0.6-0.6*i, magn, 0.6-0.6*i)
282
end
283
eff:remove()
284
end)
285
lastP = posnow
286
end
287
end)
288
end
289
290
function EE()
291
EffectOn = false
292
end
293
294
torso = waitChild(char, "Torso")
295
Rarm = waitChild(char, "Right Arm")
296
Larm = waitChild(char, "Left Arm")
297
Rleg = waitChild(char, "Right Leg")
298
Lleg = waitChild(char, "Left Leg")
299
Hum = waitChild(char, "Humanoid")
300
neck = waitChild(torso, "Neck")
301
302
function EditGui(obj, parent, size, position, bgcolor, bordercolor, transparency, text, textcolor, auto)
303
obj.Size = size
304
obj.Position = position
305
obj.BackgroundColor3 = bgcolor
306
obj.BorderColor3 = bordercolor
307
obj.BackgroundTransparency = transparency
308
if obj:IsA("TextLabel") or obj:IsA("TextButton") then
309
obj.Text = text
310
obj.TextColor3 = textcolor
311
end
312
if obj:IsA("ImageButton") or obj:IsA("TextButton") then
313
obj.AutoButtonColor = auto
314
obj.MouseButton1Down:connect(function()
315
RemoveOptions()
316
end)
317
end
318
obj.Parent = parent
319
end
320
321
Gui = waitChild(me, "PlayerGui")
322
323
for _,v in pairs(Gui:children()) do
324
if v.Name == "Power" then v:remove() end
325
end
326
327
Sc = Instance.new("ScreenGui", Gui)
328
Sc.Name = "Power"
329
330
Main = Instance.new("TextLabel")
331
Main.Visible = false
332
EditGui(Main, Sc, UD(0, 200, 0, 65), UD(0.5, -100, 0, 120), C3(0.06, 0.06, 0.1), C3(), 0.5, "Power", C3(1, 1, 0))
333
Main.TextYAlignment = "Top"
334
Main.FontSize = "Size36"
335
Main.Font = "ArialBold"
336
Main.TextTransparency = 0.5
337
338
BarBack = Instance.new("Frame")
339
EditGui(BarBack, Main, UD(1, -10, 0, 25), UD(0, 5, 1, -30), C3(0, 0, 0), C3(), 0.5)
340
341
Bar = Instance.new("ImageLabel")
342
EditGui(Bar, BarBack, UD(0, 0, 1, 0), UD(0, 0, 0, 0), C3(1, 0.7, 0), C3(), 0.5)
343
Bar.Image = "http://www.roblox.com/asset/?id=48965808"
344
345
Spec = Instance.new("Frame")
346
EditGui(Spec, Sc, UD(0, 250, 0, 22), UD(0.04, 0, 0, 5), C3(1, 0.75, 0.1), C3(), 0)
347
348
SpecialBack = Instance.new("Frame")
349
EditGui(SpecialBack, Spec, UD(1, -10, 1, -6), UD(0, 5, 0, 3), C3(0.35, 0.1, 0.15), C3(), 0)
350
351
SpecialBar = Instance.new("ImageLabel")
352
EditGui(SpecialBar, SpecialBack, UD(Special/MaxSpecial, 0, 1, 0), UD(0, 0, 0, 0), C3(0.1, 0.65, 0.2), C3(), 0)
353
SpecialBar.Image = "http://www.roblox.com/asset/?id=48965808"
354
355
for i = 1, 3, 1 do
356
local p = Instance.new("Frame")
357
EditGui(p, SpecialBack, UD(0, 1, 1, 0), UD(i/4, 0, 0, 0), C3(0.1, 0.2, 1), C3(), 0)
358
p.BorderSizePixel = 0
359
end
360
361
SpecialText = Instance.new("TextLabel")
362
EditGui(SpecialText, SpecialBack, UD(1, 0, 1, 0), UD(0, 0, 0, 0), C3(), C3(), 1, "S P E C I A L", C3(1,1,1))
363
SpecialText.Font = "ArialBold"
364
SpecialText.FontSize = "Size14"
365
366
function Play(Sound)
367
local s = Instance.new("Sound")
368
s.SoundId = Sound[1]
369
s.Pitch = Sound[2]
370
s.Volume = Sound[3]
371
s.Parent = torso
372
s.PlayOnRemove = true
373
game.Debris:AddItem(s, 0.0001)
374
end
375
376
RSH = waitChild(torso, "Right Shoulder")
377
LSH = waitChild(torso, "Left Shoulder")
378
RH = waitChild(torso, "Right Hip")
379
LH = waitChild(torso, "Left Hip")
380
381
for i,v in pairs(char:children()) do if v.Name == ModelName then v:remove() end end
382
383
function Part(P, Anch, Coll, Tran, Ref, Col, X, Y, Z)
384
local p = Instance.new("Part")
385
p.TopSurface = 0
386
p.BottomSurface = 0
387
p.Transparency = Tran
388
p.Reflectance = Ref
389
p.CanCollide = Coll
390
p.Anchored = Anch
391
p.BrickColor = BrickColor.new(Col)
392
p.formFactor = "Custom"
393
p.Size = Vector3.new(X,Y,Z)
394
p.Parent = P
395
p.Locked = true
396
p:BreakJoints()
397
return p
398
end
399
400
function Weld(P0, P1, X, Y, Z, A, B, C)
401
local w = Instance.new("Weld")
402
w.Part0 = P0
403
w.Part1 = P1
404
w.C1 = CN(X, Y, Z) * CA(A, B, C)
405
w.Parent = P0
406
return w
407
end
408
409
Mo = Instance.new("Model")
410
Mo.Name = ModelName
411
412
FTorso = Part(Mo, false, false, 1, 0, torso.BrickColor.Name, torso.Size.X, torso.Size.Y, torso.Size.Z)
413
FWeld = Weld(torso, FTorso, 0, 0, 0, 0, 0, 0)
414
415
RABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1)
416
LABrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1)
417
RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1)
418
LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1)
419
420
RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
421
LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
422
RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
423
LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
424
425
function Atch(p)
426
RABW.Part0 = p
427
LABW.Part0 = p
428
RLBW.Part0 = p
429
LLBW.Part0 = p
430
RSH.Part0 = p
431
LSH.Part0 = p
432
RH.Part0 = p
433
LH.Part0 = p
434
end
435
436
RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
437
LAW = Weld(LABrick, nil, 0, 0.5, 0, 0, 0, 0)
438
RLW = Weld(RLBrick, nil, 0, 0.8, 0, 0, 0, 0)
439
LLW = Weld(LLBrick, nil, 0, 0.8, 0, 0, 0, 0)
440
441
HB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1)
442
HBW = Weld(Larm, HB, 0, 1, 0, 0, 0, 0)
443
HW = Weld(HB, nil, 0, 0, 0, MR(90), 0, 0)
444
445
AB = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1)
446
ABW = Weld(Rarm, AB, 0, 1, 0, 0, 0, 0)
447
AW = Weld(AB, nil, 0, 0, 0, 0, 0, 0)
448
449
TW = Weld(torso, nil, -0.7, 0, 0.5, 0, MP, 0)
450
451
Handle = Part(Mo, false, false, 0, 0, HandCol, 0.6, 1.2, 0.6)
452
Instance.new("SpecialMesh",Handle)
453
TW.Part1 = Handle
454
455
for i = -0.6, 0.61, 1.2 do
456
local p = Part(Mo, false, false, 0, 0, MiddleCol, 0.7, 0.2, 1.1)
457
Weld(Handle, p, 0, i, 0.15, 0, 0, 0)
458
Instance.new("BlockMesh", p)
459
end
460
461
local UpPoint, DownPoint
462
463
for i = -10, 95, 15 do
464
local p = Part(Mo, false, false, 0, 0, LapaCol, 0.69, 0.4, 0.2)
465
local w = Weld(Handle, p, 0, 0, 1.4, 0, 0, 0)
466
w.C0 = CN(0, 1.1, 0.75) * CA(MR(i), 0, 0)
467
Instance.new("BlockMesh", p)
468
UpPoint = p
469
end
470
471
for i = 10, -95, -15 do
472
local p = Part(Mo, false, false, 0, 0, LapaCol, 0.69, 0.4, 0.2)
473
local w = Weld(Handle, p, 0, 0, 1.4, 0, 0, 0)
474
w.C0 = CN(0, -1.1, 0.75) * CA(MR(i), 0, 0)
475
Instance.new("BlockMesh", p)
476
DownPoint = p
477
end
478
479
StringUp = Part(Mo, false, false, 0, 0, "White", 0.2, 1, 0.2)
480
StringDown = Part(Mo, false, false, 0, 0, "White", 0.2, 1, 0.2)
481
482
SUM = Instance.new("SpecialMesh", StringUp)
483
SDM = Instance.new("SpecialMesh", StringDown)
484
SUM.Scale = Vector3.new(0.4, 2.4, 0.4)
485
SDM.Scale = Vector3.new(0.4, 2.4, 0.4)
486
487
ORSU = CN(0, -1.3, 0) * CA(MR(-85), 0, 0)
488
ORSD = CN(0, 1.3, 0) * CA(MR(85), 0, 0)
489
490
SUW = Weld(UpPoint, StringUp, 0, -1.3, 0, MR(-85), 0, 0)
491
SDW = Weld(DownPoint, StringDown, 0, 1.3, 0, MR(85), 0, 0)
492
SUW.C0 = CN(0, 0.15, 0)
493
SDW.C0 = CN(0, -0.15, 0)
494
SUW.C1 = ORSU
495
SDW.C1 = ORSD
496
497
Arrow = Part(Mo, false, false, 1, 0, "Brown", 0.4, 0.4, 4.4)
498
local mesh = Instance.new("SpecialMesh",Arrow)
499
mesh.MeshId = "http://www.roblox.com/asset/?id=15887356"
500
mesh.TextureId = "http://www.roblox.com/asset/?id=15886781"
501
mesh.Scale = Vector3.new(1, 1, 2.1)
502
AW.Part1 = Arrow
503
504
505
Ring = Part(Mo, false, false, 0, 0, ViiniCol, 0.2, 0.2, 0.2)
506
RingM = Instance.new("SpecialMesh", Ring)
507
RingM.MeshId = "http://www.roblox.com/asset/?id=3270017"
508
RingM.Scale = Vector3.new(0.6, 1, 21)
509
local www = Weld(FTorso, Ring, -0.9, -0.2, -0.8, MR(90), MR(90), MR(30))
510
www.C0 = CA(MR(-10), 0, 0)
511
512
Sp = Part(Mo, false, false, 0, 0, "Black", 1, 0.2, 1)
513
local S = Instance.new("SpecialMesh",Sp)
514
S.MeshType = "Sphere"
515
S.Scale = Vector3.new(0.65, 1, 1.05)
516
Weld(Ring, Sp, 0, 1.7, 0, MR(-90), 0, 0)
517
518
function makeArrow(pos, ang)
519
local arrow = Part(Mo, false, false, 0, 0, "Brown", 0.2, 1, 0.2)
520
local mesh = Instance.new("SpecialMesh",arrow)
521
mesh.MeshId = "http://www.roblox.com/asset/?id=15887356"
522
mesh.TextureId = "http://www.roblox.com/asset/?id=15886781"
523
mesh.Scale = Vector3.new(1, 1, 2.1)
524
Weld(Ring, arrow, pos.x, pos.y, pos.z, MP, 0, ang)
525
end
526
527
makeArrow(Vector3.new(0.15, 0.1, 0.55), 0.8)
528
makeArrow(Vector3.new(-0.2, -0.1, 0.65), -0.4)
529
makeArrow(Vector3.new(-0.1, 0.1, 0.6), 1.8)
530
makeArrow(Vector3.new(-0.1, -0.15, 0.7), 1.2)
531
makeArrow(Vector3.new(0, 0.3, 0.6), 0.28)
532
makeArrow(Vector3.new(0, 0, 0.65), 0.34)
533
makeArrow(Vector3.new(0.3, 0.1, 0.55), 1.9)
534
makeArrow(Vector3.new(-0.35, 0.1, 0.67), 1.9)
535
536
Mo.Parent = char
537
538
function Normal()
539
FTorso.Transparency = 1
540
FWeld.C0 = CN()
541
torso.Transparency = 0
542
LAW.C0 = CA(0, 0, MR(30))
543
RAW.Part1 = nil
544
RAW.C0 = CN()
545
RAW.C1 = CN(0, 0.5, 0)
546
LAW.C1 = CN(0, 0.5, 0)
547
LAW.Part1 = Larm
548
RABW.Part0 = torso
549
LABW.Part0 = torso
550
RLBW.Part0 = torso
551
LLBW.Part0 = torso
552
RSH.Part0 = torso
553
LSH.Part0 = torso
554
RH.Part0 = torso
555
LH.Part0 = torso
556
AW.C0 = CN()
557
HW.C0 = CA(MR(180), 0, MR(150))
558
SUW.C0 = CN(0, 0.15, 0)
559
SDW.C0 = CN(0, -0.15, 0)
560
SUW.C1 = ORSU
561
SDW.C1 = ORSD
562
SUM.Scale = Vector3.new(0.4, 2.4, 0.4)
563
SDM.Scale = Vector3.new(0.4, 2.4, 0.4)
564
end
565
566
if script.Parent.className ~= "HopperBin" then
567
h = Instance.new("HopperBin", me.Backpack)
568
h.Name = "xBow"
569
script.Parent = h
570
end
571
572
bin = script.Parent
573
574
function ShowDmg(pos, dmg)
575
local col = "Bright red"
576
if dmg < 1 then
577
col = "Bright blue"
578
end
579
local m = Instance.new("Model")
580
m.Name = dmg
581
local p = Part(m, false, false, 0, 0, col, 0.8, 0.3, 0.8)
582
p.Name = "Head"
583
p.CFrame = CFrame.new(pos)
584
local bp = Instance.new("BodyPosition", p)
585
bp.position = pos + Vector3.new(0, 2.5, 0)
586
bp.P = 6500
587
bp.maxForce = Vector3.new(MH, MH, MH)
588
local h = Instance.new("Humanoid",m)
589
h.MaxHealth = 0
590
h.Health = 0
591
h.Name = "fffsaf"
592
m.Parent = workspace
593
game.Debris:AddItem(m, 1.5)
594
end
595
596
function Dmg(hum, dmg, pos)
597
if hum.Health > 0 then
598
hum.Health = hum.Health - dmg
599
ShowDmg(pos, dmg)
600
end
601
end
602
603
function ArrowT(hit)
604
local h = getHumanoid(hit.Parent)
605
if h and Deb and Hurt then
606
Deb = false
607
Dmg(h, MRA(3,15), Arrow.CFrame * CN(0, 0, 2.2).p)
608
end
609
end
610
611
Arrow.Touched:connect(ArrowT)
612
613
function SelectAnim()
614
LAW.Part1 = Larm
615
SelAnim = true
616
for i = 0.2, 1, 0.2 do
617
LAW.C0 = CA(MR(-25*i), 0, MR(25*i)) * CN(0, 0.2*i, 0)
618
wait()
619
end
620
HW.C0 = CN(0.4, 0.3, 0) * CA(MR(110), MR(-100), MR(180))
621
HW.Part1 = Handle
622
TW.Part1 = nil
623
for i = 0.08, 1, 0.08 do
624
LAW.C0 = CA(MR(-25+25*i), 0, MR(25-55*i)) * CN(0, 0.2-0.2*i, 0)
625
HW.C0 = CN(0.4-0.4*i, 0.3-0.3*i, 0) * CA(MR(110+70*i), MR(-20+20*i), MR(180-30*i))
626
wait()
627
end
628
SelAnim = false
629
HW.C0 = CA(MR(180), 0, MR(150))
630
end
631
632
function DeselectAnim()
633
for i = 0.12, 1, 0.12 do
634
LAW.C0 = CA(MR(-25*i), 0, MR(-30+55*i)) * CN(0, 0.2*i, 0)
635
HW.C0 = CN(0.4*i, 0.3*i, 0) * CA(MR(180-70*i), MR(-20*i), MR(150+30*i))
636
if SelAnim or Selected then return end
637
wait()
638
end
639
HW.Part1 = nil
640
TW.Part1 = Handle
641
for i = 0.12, 1, 0.12 do
642
LAW.C0 = CA(MR(-25+25*i), 0, MR(-30+55-25*i)) * CN(0, 0.2-0.2*i, 0)
643
if SelAnim or Selected then return end
644
wait()
645
end
646
if Selected == false and SelAnim == false then
647
LAW.Part1 = nil
648
end
649
end
650
651
function Slash()
652
RAW.Part1 = Rarm
653
Slashing = true
654
Play(Sounds.Slash)
655
for i = 0.15, 1, 0.15 do
656
RAW.C0 = CA(MR(180*i), MR(-20*i), MR(35*i))
657
AW.C0 = CA(MR(35*i), 0, 0) * CN(0, 0, 0.7*i)
658
wait()
659
end
660
for i = 0.33, 1, 0.33 do
661
RAW.C0 = CA(MR(180+10*i), MR(-20), MR(35+2*i))
662
AW.C0 = CA(MR(35+5*i), 0, 0) * CN(0, 0, 0.7+0.2*i)
663
wait()
664
end
665
local blockk = false
666
local hit, pos = RayC(torso.Position, torso.CFrame * CN(0, 0, -5).p, 3.2, char)
667
if hit ~= nil then
668
if getHumanoid(hit.Parent) == nil and hit.CanCollide == true then
669
blockk = true
670
end
671
end
672
SE(Arrow, CN(0, 0, 2.2))
673
if blockk == false then
674
Hurt = true
675
Deb = true
676
for i = 0.2, 1, 0.2 do
677
RAW.C0 = CA(MR(190-140*i), MR(-20-5*i), MR(37-87*i)) * CN(0, -1*i, 0)
678
AW.C0 = CA(MR(40-25*i), MR(-20*i), 0) * CN(0, 0, 0.9+0.3*i)
679
wait()
680
end
681
EE()
682
Hurt = false
683
for i = 0.33, 1, 0.33 do
684
RAW.C0 = CA(MR(50-10*i), MR(-25), MR(-50-5*i)) * CN(0, -1, 0)
685
AW.C0 = CA(MR(15-20*i), MR(-20-1*i), 0) * CN(0, 0, 1.2*i)
686
wait()
687
end
688
for i = 0.25, 1, 0.25 do
689
RAW.C0 = CA(MR(40-10*i), MR(-25+25*i), MR(-55+35*i)) * CN(0, -1+1*i, 0)
690
AW.C0 = CA(MR(-5+55*i), MR(-21+21*i), 0) * CN(0, 0, 1.2-1.2*i)
691
wait()
692
end
693
for i = 0.25, 1, 0.25 do
694
RAW.C0 = CA(MR(30-30*i), 0, MR(-20+20*i))
695
AW.C0 = CA(MR(50-50*i), 0, 0)
696
wait()
697
end
698
else
699
for i = 0.5, 1, 0.5 do
700
RAW.C0 = CA(MR(190-50*i), MR(-20-5*i), MR(37-27*i)) * CN(0, -0.2*i, 0)
701
AW.C0 = CA(MR(40-5*i), MR(-5*i), 0) * CN(0, 0, 0.9+0.1*i)
702
wait()
703
end
704
Play(Sounds.Block)
705
for i = 0.25, 1, 0.25 do
706
RAW.C0 = CA(MR(140+60*i), MR(-25+25*i), MR(10+20*i)) * CN(0, -0.2-0.3*i, 0)
707
AW.C0 = CA(MR(35+45*i), MR(-5+5*i), 0) * CN(0, 0, 1)
708
wait()
709
end
710
EE()
711
for i = 0.33, 1, 0.33 do
712
RAW.C0 = CA(MR(200+10*i), MR(5*i), MR(30+5*i)) * CN(0, -0.5, 0)
713
AW.C0 = CA(MR(80+5*i), 0, 0) * CN(0, 0, 1)
714
wait()
715
end
716
for i = 0.18, 1, 0.18 do
717
RAW.C0 = CA(MR(210-200*i), MR(5-5*i), MR(35-30*i)) * CN(0, -0.5+0.4*i, 0)
718
AW.C0 = CA(MR(85-75*i), 0, 0) * CN(0, 0, 1-0.8*i)
719
wait()
720
end
721
for i = 0.33, 1, 0.33 do
722
RAW.C0 = CA(MR(10-10*i), 0, MR(5-5*i)) * CN(0, -0.1+0.1*i, 0)
723
AW.C0 = CA(MR(10-10*i), 0, 0) * CN(0, 0, 0.2-0.2*i)
724
wait()
725
end
726
AW.C0 = CN()
727
end
728
Slashing = false
729
RAW.Part1 = nil
730
end
731
732
function Reload()
733
if ArrowOn == false then
734
RAW.Part1 = Rarm
735
Reloading = true
736
for i = 0.16, 1, 0.16 do
737
RAW.C0 = CA(MR(200*i), MR(-5*i), 0) * CN(0, -0.35*i, 0)
738
wait()
739
end
740
AW.C0 = CA(0, MR(-90), 0)
741
AW.C1 = CN(0, 0, -1.5) * CA(MR(60), 0, 0)
742
Arrow.Transparency = 0
743
ArrowOn = true
744
for i = 0.2, 1, 0.2 do
745
RAW.C0 = CA(MR(200), MR(-5), MR(40*i)) * CN(0, -0.35, 0)
746
AW.C1 = CN(0, 0, -1.5+2*i) * CA(MR(60-20*i), 0, 0)
747
wait()
748
end
749
for i = 0.33, 1, 0.33 do
750
RAW.C0 = CA(MR(200), MR(-5), MR(40+10*i)) * CN(0, -0.35+0.05*i, 0)
751
AW.C1 = CN(0, 0, 0.5+0.1*i) * CA(MR(40-5*i), 0, 0)
752
wait()
753
end
754
for i = 0.18, 1, 0.18 do
755
RAW.C0 = CA(MR(200-190*i), MR(-5+5*i), MR(50-45*i)) * CN(0, -0.3+0.25*i, 0)
756
AW.C1 = CN(0, 0, 0.6-0.5*i) * CA(MR(35-30*i), 0, 0)
757
AW.C0 = CA(0, MR(-90+80*i), 0)
758
wait()
759
end
760
for i = 0.33, 1, 0.33 do
761
RAW.C0 = CA(MR(10-10*i), 0, MR(5-5*i)) * CN(0, -0.05+0.05*i, 0)
762
AW.C1 = CN(0, 0, 0.1-0.1*i) * CA(MR(5-5*i), 0, 0)
763
AW.C0 = CA(0, MR(-10+10*i), 0)
764
wait()
765
end
766
AW.C1 = CN()
767
AW.C0 = CN()
768
RAW.C0 = CN()
769
RAW.Part1 = nil
770
Reloading = false
771
else
772
Slash()
773
end
774
end
775
776
function AddDetail(Surface, pos, bool, part, hu)
777
local caf = CN(pos) * CA(part.CFrame:toEulerAnglesXYZ()) * Surface[2]
778
if Surface[1] == "Anything" then
779
caf = Surface[2]
780
end
781
Notime(function()
782
if bool then
783
Notime(function()
784
for i = 1, MRA(2,7) do
785
local x = MRA(0.4*100, 0.9*100)/100
786
local z = MRA(0.7*100, 1.2*100)/100
787
local pp = Part(hu.Parent, false, false, 0, 0, "Bright red", 0.2, 0.2, 0.2)
788
local ms = Instance.new("SpecialMesh",pp)
789
ms.MeshType = "Sphere"
790
ms.Scale = Vector3.new(x*5, 1, z*5)
791
pp.CFrame = caf
792
local w = Weld(part, pp, 0, 0, 0, 0, 0, 0)
793
local c0 = part.CFrame:toObjectSpace(caf) * CN(MRA(-0.3*100, 0.3*100)/100, 0, MRA(-0.3*100, 0.3*100)/100) * CA(0, MR(MRA(-180,180)), 0)
794
w.C0 = c0
795
Notime(function()
796
local moar = MRA(-1.1*1000, 1.1*1000)/1000
797
for i = 0, 1, MRA(0.02*1000, 0.06*1000)/1000 do
798
wait()
799
w.C0 = c0 * CN(0, 0, -moar*i)
800
ms.Scale = Vector3.new((x*5)-(moar/3)*i, 1, (z*5)+(moar/3)*i)
801
pp.Transparency = -0.5+1.5*i
802
end
803
pp:remove()
804
end)
805
end
806
end)
807
for i = 1, MRA(4,8) do
808
Notime(function()
809
local pp2 = Part(hu.Parent, true, false, 0, 0, "Bright red", 0.2, 0.2, 0.2)
810
pp2.CFrame = caf
811
local ms2 = Instance.new("SpecialMesh",pp2)
812
ms2.MeshType = "Sphere"
813
ms2.Scale = Vector3.new(1.5, 1.5, 1.5)
814
local face = CA(MR(MRA(-40, 40)+105), MR(MRA(-40, 40)), MR(MRA(-40, 40)))
815
local center = caf * face * CN(0, -5, 0)
816
Notime(function()
817
for i = 0, 1, 0.1 do
818
pp2.Transparency = -0.7+1.7*i
819
pp2.CFrame = center * CN(0, 0, -2.5*i) * CA(MR(-55*i), 0, 0) * CN(0, 5, 0)
820
wait()
821
end
822
pp2:remove()
823
end)
824
end)
825
end
826
else
827
Notime(function()
828
for i = 1, MRA(5,8) do
829
Notime(function()
830
local t = {"Bright yellow", "New Yeller", "White", "Institutional white", "Brick yellow"}
831
local pp = Part(workspace, true, false, 0, 0, t[MRA(1, #t)], 0.2, 0.2, 0.2)
832
local mes = Instance.new("SpecialMesh",pp)
833
mes.MeshType = "Sphere"
834
mes.Scale = Vector3.new(0.5, 0.5, 1)
835
local caa = CN(caf.p) * CA(MR(MRA(-180,180)), MR(MRA(-180,180)), MR(MRA(-180,180)))
836
pp.CFrame = caa
837
for i = 0.25, 1, 0.25 do
838
wait()
839
mes.Scale = Vector3.new(0.5+0.1*i, 0.5+0.1*i, 1+2*i)
840
pp.CFrame = caa * CN(0, 0, -0.4*i)
841
end
842
for i = 0.25, 1, 0.25 do
843
wait()
844
mes.Scale = Vector3.new(0.6, 0.6, 3+1.6*i)
845
pp.CFrame = caa * CN(0, 0, -0.6-0.32*i)
846
pp.Transparency = -0.2+1.2*i
847
end
848
pp:remove()
849
end)
850
end
851
end)
852
end
853
end)
854
end
855
856
function ShootArrow(pos, power, targ)
857
local Start = Handle.Position
858
local mag = (Start - pos).magnitude/200
859
if mag > 12.5 then mag = 12.5 end
860
if targ == nil then mag = 1 end
861
local Face = CN(Start, pos) * CA(MR(MRA(-Accuracy*10000, Accuracy*10000)/10000+mag), MR(MRA(-Accuracy*10000, Accuracy*10000)/10000), MR(MRA(-Accuracy*10000, Accuracy*10000)/10000))
862
local Arr = Part(Mo, true, false, 0, 0, "Brown", 0.2, 0.2, 0.2)
863
local mes = Instance.new("SpecialMesh",Arr)
864
mes.MeshId = "http://www.roblox.com/asset/?id=15887356"
865
mes.TextureId = "http://www.roblox.com/asset/?id=15886781"
866
mes.Scale = Vector3.new(1, 1, 2.1)
867
Arr.CFrame = Face
868
local Go = 2.8+(power/30)
869
local Dist = 200+(power*2.8)
870
local Drop = 0.55/(Go*1.25)
871
local lastP = Start
872
local didhit = false
873
local omg = 0
874
local hit2, pos2 = RayC(torso.CFrame * CN(0, 0, -0.4).p, torso.CFrame * CN(0, 0, -2).p, 2.5, char)
875
local hu2 = nil
876
if hit2 then
877
local hh = getHumanoid(hit2.Parent)
878
if hh then
879
hit2 = nil
880
end
881
end
882
for i = Go, Dist, Go do
883
Drop = Drop + 1/(Go*3.5)
884
omg = omg + Drop
885
local dropping = CA(MR(-Drop), 0, 0)
886
if omg > 130 then
887
dropping = CN()
888
end
889
Face = Face * dropping * CN(0, 0, -Go)
890
Arr.CFrame = Face * CA(MR(-180), 0, 0)
891
local hit, p = RayC(lastP, Face.p, Go+0.5, char)
892
local eff = Part(Mo, true, false, 0, 0, "White", 0.2, 1, 0.2)
893
local magn = (lastP - Face.p).magnitude
894
local cf = CN(lastP, Face.p) * CA(MR(-90), 0, 0)
895
if hit then
896
magn = (lastP - p).magnitude
897
cf = CN(lastP, p) * CA(MR(-90), 0, 0)
898
end
899
local mes2 = Instance.new("SpecialMesh",eff)
900
mes2.Scale = Vector3.new(0.6, magn, 0.6)
901
eff.CFrame = cf * CN(0, magn/2, 0)
902
Notime(function()
903
for i = 0, 1, 0.12 do
904
wait()
905
eff.Transparency = i
906
eff.Reflectance = 0.15*i
907
mes2.Scale = Vector3.new(0.6-0.6*i, magn, 0.6-0.6*i)
908
end
909
eff:remove()
910
end)
911
local realhit = hit
912
if hit2 then realhit = hit2 p = pos2 end
913
if hit or hit2 then
914
local h = getHumanoid(realhit.Parent)
915
local sound = Sounds.Stick
916
if h and hit.Parent.className ~= "Hat" then
917
local d = MRA(12+DMG+(power/8), 20+DMG+(power/5.5))
918
if hit.Name == "Head" then
919
d = math.floor(d*1.4)
920
end
921
Dmg(h, d, p)
922
sound = Sounds.Hit
923
elseif h == nil and realhit.Parent.className ~= "Hat" then
924
if realhit.Anchored == false then
925
Notime(function()
926
wait(0.08)
927
local mas = realhit:GetMass()/5+2
928
local vel = (16+(power/3))/mas
929
if vel < 0 then vel = 0 end
930
realhit.Velocity = (CN(lastP, p).lookVector) * vel
931
end)
932
end
933
end
934
local a = -1.2
935
if realhit.Anchored then
936
Arr.CFrame = CN(p, lastP) * CN(0, 0, a)
937
if realhit == hit2 then
938
Arr.CFrame = CN(Start, pos2) * CN(0, 0, -1.9)
939
end
940
else
941
a = (power-200)/110
942
local w8 = 13
943
if realhit.Parent.className == "Hat" then
944
a = ((power/2)-170)/110
945
w8 = 5
946
end
947
Arr.Anchored = false
948
local w = Weld(realhit, Arr, 0, 0, 0, 0, 0, 0)
949
w.C1 = ((CN(p, lastP) * CN(0, 0, a)):toObjectSpace(realhit.CFrame))
950
if realhit == hit2 then
951
w.C1 = ((CN(Start, pos2) * CN(0, 0, -1.9)):toObjectSpace(realhit.CFrame))
952
end
953
Notime(function()
954
if power < 50 then
955
wait(w8+power/7.5)
956
local caa = Arr.CFrame
957
w:remove()
958
Arr.Size = Vector3.new(0.3, 0.3, 4)
959
Arr.CFrame = caa
960
Arr.CanCollide = true
961
end
962
end)
963
end
964
didhit = true
965
Notime(
966
function()
967
wait(26)
968
for i = 0, 1, 0.02 do
969
Arr.Transparency = i
970
wait()
971
end
972
Arr:remove()
973
end
974
)
975
Play(sound)
976
local Surface = DetectSurface(p, realhit)
977
AddDetail(Surface, p, h ~= nil and hit.Parent.className ~= "Hat", realhit, h)
978
wait(0.05)
979
break
980
end
981
lastP = Face.p
982
wait()
983
end
984
if didhit == false then
985
for i = 0, 1, 0.2 do
986
Arr.Transparency = i
987
wait()
988
end
989
Arr:remove()
990
end
991
end
992
993
function Shoot(mouse)
994
Shooting = true
995
RAW.Part1 = Rarm
996
Atch(FTorso)
997
FTorso.Transparency = 0
998
torso.Transparency = 1
999
local shoot = false
1000
Spec.BorderColor3 = C3()
1001
local amg, omg = false, false
1002
Notime(function()
1003
repeat
1004
wait()
1005
until Selected == false or omg
1006
if omg == false then
1007
omg = true
1008
Shooting = false
1009
Reloading = false
1010
Hurt = false
1011
Slashing = false
1012
Normal()
1013
EE()
1014
return
1015
end
1016
end)
1017
Notime(function()
1018
mouse.Button1Up:wait()
1019
shoot = true
1020
end)
1021
for i = 0.16, 1, 0.16 do
1022
FWeld.C0 = CA(0, MR(-80*i), 0)
1023
LAW.C0 = CA(MR(85*i), 0, MR(-30-25*i)) * CN(0.3*i, 0.4*i, -0.1*i)
1024
RAW.C0 = CA(MR(85*i), 0, MR(-70*i)) * CN(0.65*i, -1.2*i, 0)
1025
HW.C0 = CA(MR(180), 0, MR(150+60*i))
1026
AW.C0 = CA(MR(85*i), 0, 0) * CN(0, 0, 2.1*i)
1027
wait()
1028
end
1029
for i = 0.33, 1, 0.33 do
1030
FWeld.C0 = CA(0, MR(-80-10*i), 0)
1031
LAW.C0 = CA(MR(85+5*i), 0, MR(-55-5*i)) * CN(0.3, 0.4, -0.1)
1032
RAW.C0 = CA(MR(85+5*i), 0, MR(-70-5*i)) * CN(0.65+0.05*i, -1.2-0.1*i, 0)
1033
HW.C0 = CA(MR(180), 0, MR(210+5*i))
1034
AW.C0 = CA(MR(85+5*i), MR(-15*i), 0) * CN(0, 0, 2.1+0.1*i)
1035
wait()
1036
end
1037
LAW.C0 = CA(MR(90), 0, MR(-60)) * CN(0.3, 0.4, -0.1)
1038
HW.C0 = CA(MR(180), 0, MR(215))
1039
FWeld.C0 = CA(0, MR(-90), 0)
1040
for i = 0.25, 1, 0.25 do
1041
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, -1.3+1.2*i, 0)
1042
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-26*i), 0, 0)
1043
SUW.C1 = CN(0, -0.22*i, 0) * ORSU
1044
SUM.Scale = Vector3.new(0.4, 2.4+0.3*i, 0.4)
1045
SDW.C0 = CN(0, -0.15, 0) * CA(MR(26*i), 0, 0)
1046
SDM.Scale = Vector3.new(0.4, 2.4+0.3*i, 0.4)
1047
SDW.C1 = CN(0, 0.25*i, 0) * ORSD
1048
wait()
1049
end
1050
for i = 0.33, 1, 0.33 do
1051
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, -0.1+0.1*i, 0)
1052
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-26-4*i), 0, 0)
1053
SUW.C1 = CN(0, -0.22-0.03*i, 0) * ORSU
1054
SUM.Scale = Vector3.new(0.4, 2.7+0.1*i, 0.4)
1055
SDW.C0 = CN(0, -0.15, 0) * CA(MR(26+4*i), 0, 0)
1056
SDM.Scale = Vector3.new(0.4, 2.7+0.1*i, 0.4)
1057
SDW.C1 = CN(0, 0.22+0.04*i, 0) * ORSD
1058
wait()
1059
end
1060
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, 0, 0)
1061
local powe = 10
1062
Main.Visible = true
1063
Bar.Size = UD(powe/MaximumPower, 0, 1, 0)
1064
Notime(function()
1065
repeat wait() until powe >= MaximumPower or shoot
1066
wait(6)
1067
if shoot == false then
1068
shoot = true
1069
end
1070
end)
1071
repeat
1072
wait()
1073
powe = powe + 4.8
1074
if powe > MaximumPower then powe = MaximumPower end
1075
Bar.Size = UD(powe/MaximumPower, 0, 1, 0)
1076
local sped = 16-((powe/MaximumPower)*9) if Selected == false then sped = 16 end
1077
Hum.WalkSpeed = sped
1078
until shoot
1079
Main.Visible = false
1080
Notime(function()
1081
for i = 0.5, 1, 0.5 do
1082
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-30+30*i), 0, 0)
1083
SUW.C1 = CN(0, -0.25+0.25*i, 0) * ORSU
1084
SUM.Scale = Vector3.new(0.4, 2.8-0.4*i, 0.4)
1085
SDW.C0 = CN(0, -0.15, 0) * CA(MR(30-30*i), 0, 0)
1086
SDM.Scale = Vector3.new(0.4, 2.8-0.4*i, 0.4)
1087
SDW.C1 = CN(0, 0.25-0.25*i, 0) * ORSD
1088
wait()
1089
end
1090
end)
1091
local pos = mouse.Hit.p
1092
ArrowOn = false
1093
Arrow.Transparency = 1
1094
Notime(function()
1095
Play(Sounds.Shoot)
1096
ShootArrow(pos, powe, mouse.Target)
1097
end)
1098
for i = 0.2, 1, 0.2 do
1099
FWeld.C0 = CA(0, MR(-90+25*i), 0)
1100
LAW.C0 = CA(MR(90+25*i), 0, MR(-60-15*i)) * CN(0.3-0.3*i, 0.4-0.4*i, -0.1+0.1*i)
1101
RAW.C0 = CA(MR(90+60*i), 0, MR(-75+55*i)) * CN(0.7-0.5*i, -0.1*i, 0)
1102
HW.C0 = CA(MR(180), 0, MR(215-65*i))
1103
wait()
1104
end
1105
Hum.WalkSpeed = 16
1106
for i = 0.25, 1, 0.25 do
1107
FWeld.C0 = CA(0, MR(-65+5*i), 0)
1108
LAW.C0 = CA(MR(115+5*i), 0, MR(-75-5*i))
1109
RAW.C0 = CA(MR(150+10*i), 0, MR(-20+5*i)) * CN(0.2-0.1*i, -0.1-0.05*i, 0)
1110
HW.C0 = CA(MR(180), 0, MR(150))
1111
wait()
1112
end
1113
for i = 0.14, 1, 0.14 do
1114
FWeld.C0 = CA(0, MR(-60+55*i), 0)
1115
LAW.C0 = CA(MR(120-110*i), 0, MR(-80+45*i))
1116
RAW.C0 = CA(MR(160-150*i), 0, MR(-15+10*i)) * CN(0.1-0.1*i, -0.15+0.15*i, 0)
1117
wait()
1118
end
1119
for i = 0.33, 1, 0.33 do
1120
FWeld.C0 = CA(0, MR(-5+5*i), 0)
1121
LAW.C0 = CA(MR(10-10*i), 0, MR(-35+5*i))
1122
RAW.C0 = CA(MR(10-10*i), 0, MR(-5+5*i))
1123
wait()
1124
end
1125
AW.C0 = CN()
1126
FWeld.C0 = CN()
1127
LAW.C0 = CA(0, 0, MR(-30))
1128
HW.C0 = CA(MR(180), 0, MR(150))
1129
FTorso.Transparency = 1
1130
torso.Transparency = 0
1131
Atch(torso)
1132
Shooting = false
1133
RAW.Part1 = nil
1134
RAW.C0 = CN()
1135
Spec.BorderColor3 = C3()
1136
omg = true
1137
end
1138
1139
function SpecialAtk(mouse)
1140
if Special < 50 then return end
1141
Shooting = true
1142
Spec.BorderColor3 = C3(0, 1, 0)
1143
RAW.Part1 = Rarm
1144
Atch(FTorso)
1145
FTorso.Transparency = 0
1146
torso.Transparency = 1
1147
local amg, omg = false, false
1148
Notime(function()
1149
repeat
1150
wait()
1151
until Selected == false or omg
1152
if omg == false then
1153
omg = true
1154
Shooting = false
1155
Reloading = false
1156
Hurt = false
1157
Slashing = false
1158
Normal()
1159
EE()
1160
return
1161
end
1162
end)
1163
local shoot = false
1164
Notime(function()
1165
mouse.Button1Up:wait()
1166
shoot = true
1167
end)
1168
for i = 0.2, 1, 0.2 do
1169
FWeld.C0 = CA(0, MR(-80*i), 0)
1170
LAW.C0 = CA(MR(85*i), 0, MR(-30-25*i)) * CN(0.3*i, 0.4*i, -0.1*i)
1171
RAW.C0 = CA(MR(85*i), 0, MR(-70*i)) * CN(0.65*i, -1.2*i, 0)
1172
HW.C0 = CA(MR(180), 0, MR(150+60*i))
1173
AW.C0 = CA(MR(85*i), 0, 0) * CN(0, 0, 2.1*i)
1174
wait()
1175
end
1176
for i = 0.5, 1, 0.5 do
1177
FWeld.C0 = CA(0, MR(-80-10*i), 0)
1178
LAW.C0 = CA(MR(85+5*i), 0, MR(-55-5*i)) * CN(0.3, 0.4, -0.1)
1179
RAW.C0 = CA(MR(85+5*i), 0, MR(-70-5*i)) * CN(0.65+0.05*i, -1.2-0.1*i, 0)
1180
HW.C0 = CA(MR(180), 0, MR(210+5*i))
1181
AW.C0 = CA(MR(85+5*i), MR(-15*i), 0) * CN(0, 0, 2.1+0.1*i)
1182
wait()
1183
end
1184
LAW.C0 = CA(MR(90), 0, MR(-60)) * CN(0.3, 0.4, 0)
1185
HW.C0 = CA(MR(180), 0, MR(215))
1186
FWeld.C0 = CA(0, MR(-90), 0)
1187
AW.C0 = CA(MR(90), MR(-15), 0) * CN(0, 0, 2.2)
1188
for i = 0.33, 1, 0.33 do
1189
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, -1.3+1.2*i, 0)
1190
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-26*i), 0, 0)
1191
SUW.C1 = CN(0, -0.22*i, 0) * ORSU
1192
SUM.Scale = Vector3.new(0.4, 2.4+0.3*i, 0.4)
1193
SDW.C0 = CN(0, -0.15, 0) * CA(MR(26*i), 0, 0)
1194
SDM.Scale = Vector3.new(0.4, 2.4+0.3*i, 0.4)
1195
SDW.C1 = CN(0, 0.25*i, 0) * ORSD
1196
wait()
1197
end
1198
for i = 0.5, 1, 0.5 do
1199
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, -0.1+0.1*i, 0)
1200
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-26-4*i), 0, 0)
1201
SUW.C1 = CN(0, -0.22-0.03*i, 0) * ORSU
1202
SUM.Scale = Vector3.new(0.4, 2.7+0.1*i, 0.4)
1203
SDW.C0 = CN(0, -0.15, 0) * CA(MR(26+4*i), 0, 0)
1204
SDM.Scale = Vector3.new(0.4, 2.7+0.1*i, 0.4)
1205
SDW.C1 = CN(0, 0.22+0.04*i, 0) * ORSD
1206
wait()
1207
end
1208
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, 0, 0)
1209
local powe = 0
1210
Main.Visible = true
1211
Bar.Size = UD(powe/MaximumPower, 0, 1, 0)
1212
Notime(function()
1213
repeat wait() until powe >= MaximumPower or shoot
1214
if shoot == false then
1215
shoot = true
1216
end
1217
end)
1218
repeat
1219
wait()
1220
powe = powe + 5
1221
if powe > MaximumPower then powe = MaximumPower end
1222
Bar.Size = UD(powe/MaximumPower, 0, 1, 0)
1223
local sped = 16-((powe/MaximumPower)*9) if Selected == false then sped = 16 end
1224
Hum.WalkSpeed = sped
1225
until shoot
1226
Special = Special - 50
1227
Main.Visible = false
1228
local pos = mouse.Hit.p
1229
Notime(function()
1230
Play(Sounds.Shoot)
1231
ShootArrow(pos, powe/1.2, mouse.Target)
1232
end)
1233
SUW.C0 = CN(0, 0.15, 0) * CA(0, 0, 0)
1234
SUW.C1 = CN(0, 0, 0) * ORSU
1235
SUM.Scale = Vector3.new(0.4, 2.4, 0.4)
1236
SDW.C0 = CN(0, -0.15, 0) * CA(0, 0, 0)
1237
SDM.Scale = Vector3.new(0.4, 2.4, 0.4)
1238
SDW.C1 = CN(0, 0, 0) * ORSD
1239
for i = 0.33, 1, 0.33 do
1240
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, -1.3*i, 0)
1241
wait()
1242
end
1243
for i = 0.33, 1, 0.33 do
1244
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, -1.3+1.2*i, 0)
1245
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-26*i), 0, 0)
1246
SUW.C1 = CN(0, -0.22*i, 0) * ORSU
1247
SUM.Scale = Vector3.new(0.4, 2.4+0.3*i, 0.4)
1248
SDW.C0 = CN(0, -0.15, 0) * CA(MR(26*i), 0, 0)
1249
SDM.Scale = Vector3.new(0.4, 2.4+0.3*i, 0.4)
1250
SDW.C1 = CN(0, 0.25*i, 0) * ORSD
1251
wait()
1252
end
1253
for i = 0.5, 1, 0.5 do
1254
RAW.C0 = CA(MR(90), 0, MR(-75)) * CN(0.7, -0.1+0.1*i, 0)
1255
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-26-4*i), 0, 0)
1256
SUW.C1 = CN(0, -0.22-0.03*i, 0) * ORSU
1257
SUM.Scale = Vector3.new(0.4, 2.7+0.1*i, 0.4)
1258
SDW.C0 = CN(0, -0.15, 0) * CA(MR(26+4*i), 0, 0)
1259
SDM.Scale = Vector3.new(0.4, 2.7+0.1*i, 0.4)
1260
SDW.C1 = CN(0, 0.22+0.04*i, 0) * ORSD
1261
wait()
1262
end
1263
Notime(function()
1264
Arrow.Transparency = 1
1265
ArrowOn = false
1266
Play(Sounds.Shoot)
1267
ShootArrow(pos, powe/1.2, mouse.Target)
1268
end)
1269
Notime(function()
1270
for i = 0.5, 1, 0.5 do
1271
SUW.C0 = CN(0, 0.15, 0) * CA(MR(-30+30*i), 0, 0)
1272
SUW.C1 = CN(0, -0.25+0.25*i, 0) * ORSU
1273
SUM.Scale = Vector3.new(0.4, 2.9-0.5*i, 0.4)
1274
SDW.C0 = CN(0, -0.15, 0) * CA(MR(30-30*i), 0, 0)
1275
SDM.Scale = Vector3.new(0.4, 2.9-0.5*i, 0.4)
1276
SDW.C1 = CN(0, 0.25-0.25*i, 0) * ORSD
1277
wait()
1278
end
1279
end)
1280
for i = 0.25, 1, 0.25 do
1281
FWeld.C0 = CA(0, MR(-90+25*i), 0)
1282
LAW.C0 = CA(MR(90+25*i), 0, MR(-60-15*i)) * CN(0.3-0.3*i, 0.4-0.4*i, -0.1+0.1*i)
1283
RAW.C0 = CA(MR(90+60*i), 0, MR(-75+55*i)) * CN(0.7-0.5*i, -0.1*i, 0)
1284
HW.C0 = CA(MR(180), 0, MR(215-65*i))
1285
wait()
1286
end
1287
Hum.WalkSpeed = 16
1288
for i = 0.33, 1, 0.33 do
1289
FWeld.C0 = CA(0, MR(-65+5*i), 0)
1290
LAW.C0 = CA(MR(115+5*i), 0, MR(-75-5*i))
1291
RAW.C0 = CA(MR(150+10*i), 0, MR(-20+5*i)) * CN(0.2-0.1*i, -0.1-0.05*i, 0)
1292
HW.C0 = CA(MR(180), 0, MR(150))
1293
wait()
1294
end
1295
for i = 0.16, 1, 0.16 do
1296
FWeld.C0 = CA(0, MR(-60+55*i), 0)
1297
LAW.C0 = CA(MR(120-110*i), 0, MR(-80+45*i))
1298
RAW.C0 = CA(MR(160-150*i), 0, MR(-15+10*i)) * CN(0.1-0.1*i, -0.15+0.15*i, 0)
1299
wait()
1300
end
1301
for i = 0.5, 1, 0.5 do
1302
FWeld.C0 = CA(0, MR(-5+5*i), 0)
1303
LAW.C0 = CA(MR(10-10*i), 0, MR(-35+5*i))
1304
RAW.C0 = CA(MR(10-10*i), 0, MR(-5+5*i))
1305
wait()
1306
end
1307
Spec.BorderColor3 = C3()
1308
AW.C0 = CN()
1309
FWeld.C0 = CN()
1310
LAW.C0 = CA(0, 0, MR(-30))
1311
HW.C0 = CA(MR(180), 0, MR(150))
1312
FTorso.Transparency = 1
1313
torso.Transparency = 0
1314
Atch(torso)
1315
Shooting = false
1316
RAW.Part1 = nil
1317
RAW.C0 = CN()
1318
omg = false
1319
end
1320
1321
function Sel(mouse)
1322
mouse.Icon = Icon
1323
SelectAnim()
1324
Selected = true
1325
mouse.KeyDown:connect(function(key)
1326
key = key:lower()
1327
if Reloading == false and Slashing == false and Shooting == false then
1328
if key == "f" then
1329
Reload()
1330
end
1331
end
1332
if Shooting == false then
1333
if key == "e" then
1334
Keys.e = true
1335
local k
1336
Spec.BorderColor3 = C3(1, 1, 0.4)
1337
repeat
1338
wait()
1339
k = mouse.KeyUp:wait()
1340
until k == "e"
1341
Keys.e = false
1342
if Shooting == false then
1343
Spec.BorderColor3 = C3()
1344
end
1345
end
1346
end
1347
end)
1348
mouse.Button1Down:connect(function()
1349
if Reloading == false and Slashing == false and Shooting == false then
1350
if ArrowOn == false then
1351
local yesh = true
1352
Notime(function()
1353
mouse.Button1Up:wait()
1354
yesh = false
1355
end)
1356
local ah = Keys.e
1357
Reload()
1358
if yesh then
1359
local mm = Special >= 50
1360
if ah and mm or Keys.e and mm then
1361
SpecialAtk(mouse)
1362
else
1363
Shoot(mouse)
1364
end
1365
end
1366
else
1367
local mm = Special >= 50
1368
if Keys.e and mm then
1369
SpecialAtk(mouse)
1370
else
1371
Shoot(mouse)
1372
end
1373
end
1374
end
1375
end)
1376
end
1377
1378
function Desel(mouse)
1379
Selected = false
1380
Main.Visible = false
1381
Hum.WalkSpeed = 16
1382
DeselectAnim()
1383
end
1384
1385
bin.Deselected:connect(Desel)
1386
bin.Selected:connect(Sel)
1387
1388
while Mo.Parent == char do
1389
wait()
1390
Special = Special + 0.07
1391
if Special > MaxSpecial then Special = MaxSpecial end 
1392
SpecialBar.Size = UDim2.new(Special/MaxSpecial, 0, 1, 0)
1393
end