View difference between Paste ID: nYQG8CjZ and vsRDhuwz
SHOW: | | - or go back to the newest paste.
1
local ply = game.Players.LocalPlayer
2
char = ply.Character
3
torso = char.Torso
4
head = char.Head
5
holding = false
6
RS = game:service'RunService'
7
larm,rarm = char['Left Arm'],char['Right Arm']
8
Debris = game:service'Debris'
9
floatforce = 196.25
10
attacking = false
11
lh,rh = torso['Left Hip'],torso['Right Hip']
12
curcam = Workspace.CurrentCamera
13
mouse = ply:GetMouse()
14
FFS = function(A,B) return A:FindFirstChild(B) end ---- FindFirstChild Shortcut
15
function genNew(ClassName, Parent, Properties)
16
        local nObj = Instance.new(ClassName, Parent)
17
        if Properties["FormFactor"] then
18
                nObj["FormFactor"] = Properties["FormFactor"]
19
        end
20
        for Prop, Value in pairs(Properties) do
21
                nObj[Prop] = Value
22
        end
23
        return nObj
24
end
25
pcall(function() char.Sole:Destroy() end) --- Destroys Physical Tool
26
Weapon = Instance.new("Model",char) Weapon.Name = 'Sole'
27
cfn,ang,md,mr = CFrame.new,CFrame.Angles,math.rad,math.random --- Some Shortcuts
28
udim = function(a,b)
29
if type(a) ~= 'string' then
30
return UDim2.new(a,0,b,0)
31
else
32
local x,y = a:match('(%.*%d+)%,(%.*%d+)')
33
return UDim2.new(x,0,y,0)
34
end
35
end
36
for i,v in pairs(head:children()) do
37
        if v.Name == 'MugSound' then v:Destroy() end
38
end
39
Name = 'Seokinji'
40
pcall(function() ply.Backpack[Name]:Destroy() end) --- Destroys Tool
41
hop = Instance.new('HopperBin',ply.Backpack)
42
hop.Name = Name
43
rw,lw = _,_
44
Col3 = function(r,g,b) return Color3.new(r/255,g/255,b/255) end
45
udim = function(x,y) return UDim2.new(x,0,y,0) end
46
bcol = BrickColor.new
47
---TOOLS---
48
Add ={ --- Array for handy functions
49-
BG = function(parent)
49+
50-
        local bg = Instance.new("BodyGyro",parent)
50+
51-
        bg.P = 20e+003
51+
52-
        bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
52+
53-
        return bg
53+
54-
end;
54+
55-
BP = function(parent,position)
55+
56-
        local bp = Instance.new("BodyPosition",parent)
56+
57-
        bp.maxForce = Vector3.new()*math.huge
57+
58-
        bp.position = position or parent.Position
58+
59-
        return bp
59+
60-
end;
60+
61-
BV = function(parent,force)
61+
62-
        local bv = Instance.new("BodyVelocity",parent)
62+
63-
        bv.maxForce = Vector3.new()*math.huge
63+
64-
        bv.velocity = force or Vector3.new(0,0,0)
64+
65-
        return bv
65+
66-
end;
66+
67-
Sound = function(id,pitch,parent)
67+
68-
        local tab = {}
68+
69-
        local snd = Instance.new("Sound",char.Head)
69+
70-
        snd.Name = 'MugSound'
70+
71-
        snd.SoundId = id
71+
72-
        snd.Pitch = pitch or 1
72+
73-
        tab.Sound = snd
73+
74-
        function tab:Play()
74+
75-
                self.Sound:Play()
75+
76
                        tipw.Parent = ydin
77-
        function tab:Stop()
77+
78-
                self.Sound:Stop()
78+
79
                end
80-
        function tab:Pitch(a)
80+
81-
                self.Sound.Pitch = a
81+
82
                hurt = true
83-
        setmetatable(tab,{
83+
84-
                 __call = function(t,param) local cl = t.Sound:Clone() cl.Parent = param return cl end;
84+
85
        for i = 0,1,.1 do wait() --Morph
86-
        return tab
86+
87-
end;
87+
88-
Fire = function(parent,size,heat,color,color2)
88+
89-
local f = Instance.new("Fire",parent)
89+
90-
f.Size = size
90+
91-
f.Heat = heat
91+
92-
f.Color = BrickColor.new(color).Color
92+
93-
if color2 then
93+
94-
f.SecondaryColor = BrickColor.new(color2).Color
94+
95
        tw(rw,equip,.1,'') --Back
96-
return f
96+
97-
end;
97+
98
                tipw.Parent = ydin
99-
function l(a,x,y,z,xx,yy,zz)
99+
100-
if string.find(tostring(a),',') == _ then
100+
101-
return (a.CFrame * cfn(x,y,z))*ang(xx or 0,yy or 0,zz or 0)
101+
102
        Synth:Pitch(1) con:disconnect()
103-
return (a * cfn(x,y,z))*ang(xx or 0,yy or 0,zz or 0)
103+
104
Whoosh = Add.Sound("http://www.roblox.com/Asset/?id=18426149",1)
105
function trip()
106-
Cur_Parent = _
106+
107-
Part = function(x,y,z,color,tr,cc,an,parent)
107+
108-
local p = Instance.new('Part',parent or Cur_Parent or Weapon)
108+
109-
p.formFactor = 'Custom'
109+
110-
p.Locked = true
110+
111-
p.Size = Vector3.new(x,y,z)
111+
112-
p.BrickColor = BrickColor.new(color or 'Black')
112+
113-
p.CanCollide = cc or false
113+
114-
p.Anchored = an or false
114+
115-
p.Transparency = tr or 0
115+
116-
p.TopSurface,p.BottomSurface = 0,0
116+
117-
return p
117+
118
function sit()
119-
Wedge = function(x,y,z,color,tr,cc,an,parent)
119+
120-
local p = Instance.new('WedgePart',parent or Weapon)
120+
121-
p.formFactor = 'Custom'
121+
122-
p.Size = Vector3.new(x,y,z)
122+
123-
p.BrickColor = BrickColor.new(color or 'Black')
123+
124-
p.CanCollide = cc or false
124+
125-
p.Anchored = an or false
125+
126-
p.Transparency = tr or 0
126+
127-
p.TopSurface,p.BottomSurface = 0,0
127+
128-
return p
128+
129
cf = torso.CFrame
130-
Meshes = {Diamond = 'rbxassetid://9756362'; Spikeball = 'rbxassetid://9982590'; Table = 'rbxassetid://111868131'; --- MeshIds
130+
131-
Egg = 'rbxassetid://1527559'; Ring = 'rbxassetid://3270017'; Bullet = 'rbxassetid://2697549'; Grass = 'rbxassetid://1080954';
131+
132-
Shark = 'rbxassetid://82821384';Sword = 'rbxassetid://12221720'}
132+
133-
Mesh = function(par,num,x,y,z,tex)
133+
134-
local msh = _
134+
135-
if num == 1 then msh = Instance.new("CylinderMesh",par)
135+
136-
elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
136+
137-
elseif num == 3 then msh = Instance.new("BlockMesh",par)
137+
138-
elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
138+
139-
msh.MeshId = string.find(num,'://') == _ and Meshes[num] or num
139+
140-
msh.TextureId = tex and tex or ''
140+
141
        sitbg.cframe = cf*cfn(-i,-i,-i)
142-
msh.Scale = Vector3.new(x or 1,y or 1,z or 1)
142+
143-
return msh
143+
144
sitbp:Remove() sitbg:Destroy() sitbp = nil sitbg = _
145-
Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
145+
146-
p0.Position = p1.Position
146+
147-
local w = Instance.new('Motor',par or p0)
147+
148-
w.Part0 = p1
148+
149-
w.Part1 = p0
149+
150-
w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
150+
151-
w.MaxVelocity = .1
151+
152-
return w
152+
        met = Part(1,1,1,'White',0,1,1)
153
        holding = true
154-
GetGround = function(position,radius) local result = _ --- Check's height from nearest object
154+
155-
        local r = Ray.new(position,Vector3.FromNormalId(Enum.NormalId.Bottom)*radius)
155+
156-
        local o,p = Workspace:FindPartOnRay(r,char)
156+
157-
        if o and p then result = {}
157+
158-
                result.obj = o
158+
159-
                result.pos = p
159+
160-
                result.mag = (position-p).magnitude
160+
161
                tcf = torso.CFrame
162-
        return result
162+
163
                local ground = GetGround(l(tcf,0,0,-7-y*7).p,300)
164-
gTorso = char.Torso
164+
165-
ftorso = _
165+
166
                end
167
                for i = 1,15 do local tab = {}
168
                        p = Part(1,1,1,i%2 == 0 and 'White' or 'Cyan',0,1,1)
169-
                        nObj["FormFactor"] = Properties["FormFactor"]
169+
170
                        tab.obj = p
171
                        tab.cf = p.CFrame
172-
                        nObj[Prop] = Value
172+
173
                        table.insert(list,tab)
174
                end
175
        end Crack:Play()
176-
--Anim
176+
177-
Lock = function(which) --- For using Animation
177+
178-
local torso = ftorso or gTorso
178+
179-
local result = {rw=false,lw=false}
179+
180-
if which == 'R' then
180+
181-
if not rw then
181+
182-
        rabr = Part(1,1,1,'White',0) rabr.Transparency = 1
182+
183-
        rabr.Position = torso.Position
183+
184-
        rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = Weapon rw.Name = 'rw'
184+
185-
        w = Instance.new("Weld",Weapon)
185+
186-
        w.Part0,w.Part1 = char['Right Arm'],rabr
186+
187-
        w.C1 = CFrame.new(0,-.5,0)
187+
188
        end
189-
        rabr:Destroy()
189+
190-
        rw = _
190+
191
        end end)
192-
elseif which == 'L' then
192+
193-
if not lw then
193+
194-
        labr = Part(1,1,1,'White',0) labr.Transparency = 1
194+
195-
        labr.Position = torso.Position
195+
196-
        lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = Weapon rw.Name = 'lw'
196+
197-
        w = Instance.new("Weld",Weapon)
197+
198-
        w.Part0,w.Part1 = char['Left Arm'],labr
198+
199-
        w.C1 = CFrame.new(0,-.5,0)
199+
200
        genNew('SelectionBox',p,{
201-
        labr:Destroy()
201+
202-
        lw = _
202+
                Color = bcol'Cyan';
203
        })
204-
elseif which == _ then
204+
205-
if b then
205+
206-
        local rw,lw = FFS(b,'rw') FFS(b,'lw')
206+
207-
        return rw,lw
207+
208
                p.Size = Vector3.new(a,a,a)
209-
        return rw,lw
209+
210
        end
211
        
212
        for i = 1,0,-.1 do
213-
Lock2 = function(which) --- For using Animation
213+
214-
local torso = ftorso or gTorso
214+
215-
local result = {rw2=false,lw2=false}
215+
216-
if which == 'R' then
216+
217-
if not rw2 then
217+
218-
        rlbr = Part(1,1,1,'White',0) rlbr.Transparency = 1
218+
219-
        rlbr.Position = torso.Position
219+
220-
        rw2 = Weld(rlbr,torso,.5,-1.5,0,0,0,0) rw2.Parent = Weapon rw2.Name = 'rw2'
220+
                        w = Part(1,a-1,a-1,'Cyan',.5,1,1)
221-
        w = Instance.new("Weld",Weapon)
221+
222-
        w.Part0,w.Part1 = char['Right Leg'],rlbr
222+
223-
        w.C1 = CFrame.new(0,-.5,0)
223+
224
        w = Part(1,a-1,a-1,'Cyan',.5,1,1)
225-
        rlbr:Destroy()
225+
226-
        rw2 = _
226+
        w = Part(1,a-1,a-1,'Cyan',.5,1,1)
227
        w.CFrame = l(p,0,-a/2,0,0,0,math.pi/2)
228-
elseif which == 'L' then
228+
229-
if not lw2 then
229+
230-
        llbr = Part(1,1,1,'White',0) llbr.Transparency = 1
230+
231-
        llbr.Position = torso.Position
231+
232-
        lw2 = Weld(llbr,torso,-.5,-1.5,0,0,0,0) lw2.Parent = Weapon lw2.Name = 'lw2'
232+
233-
        w = Instance.new("Weld",Weapon)
233+
234-
        w.Part0,w.Part1 = char['Left Leg'],llbr
234+
235-
        w.C1 = CFrame.new(0,-.5,0)
235+
236
        end
237-
        llbr:Destroy()
237+
238-
        lw2 = _
238+
239
for i,v in pairs(torso:children()) do if v:IsA'BodyGyro' or v:IsA'BodyPosition' or v:IsA'BodyVelocity' then v:Destroy() end end
240-
elseif which == _ then
240+
241-
if b then
241+
242-
        local rw2,lw2 = FFS(b,'rw2') FFS(b,'lw2')
242+
243-
        return rw2,lw2
243+
                local p = Part(5,5,5,a%2 == 0 and 'White' or 'Cyan',.5)
244
                p.CFrame = l(torso,0,0,0,mr(-10,10),mr(-10,10),mr(-10,10))
245-
        return rw2,lw2
245+
246
                until not loopi
247
        end)()
248
        tc(torso,cfn(mouse.hit.p)*cfn(0,5,0),.1)
249-
tw = function(Weld, Stop, Step,a) --- TweenWeld function
249+
250-
local func = function()
250+
251-
        local Start = Weld.C1
251+
252-
        local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
252+
253-
        local Stop = Stop
253+
254-
        local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
254+
255
                tipw.Parent = ydin
256-
        for i = 0, 1, Step or .1 do
256+
257-
                Weld.C1 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i), 
257+
258-
                                (Start.p.Y * (1 - i)) + (Stop.p.Y * i), 
258+
259-
                                (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
259+
260-
                                (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
260+
261-
                                (Z1 * (1 - i)) + (Z2 * i) )
261+
262
                local hum = FindHum(hit.Parent)
263
                if hum and hum.Parent ~= char then
264
                        hum.Health = hum.Health -(3)
265-
        Weld.C1 = Stop
265+
266
                        hum.Torso.Velocity = cfn(e.Position,Vector3.new(hum.Torso.Position.x,torso.Position.y,hum.Torso.Position.z)).lookVector*100
267-
if a then coroutine.wrap(function() func() end)() else func() end
267+
268
        end)
269-
tw2 = function(Weld, Stop, Step,a) --- TweenWeld function
269+
270-
local func = function()
270+
                local p = Part(1,1,1,'Cyan',.5,1,0)
271-
        local Start = Weld.C0
271+
272-
        local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
272+
273-
        local Stop = Stop
273+
274-
        local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
274+
275
                        p.Transparency = i/30
276-
        for i = 0, 1, Step or .1 do
276+
277-
                Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i), 
277+
278-
                                (Start.p.Y * (1 - i)) + (Stop.p.Y * i), 
278+
279-
                                (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
279+
280-
                                (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
280+
281-
                                (Z1 * (1 - i)) + (Z2 * i) )
281+
282
        for i = 1,0,-.1 do wait()
283
                tip.Size = Vector3.new(1+i*1,2-i*1.5,1+i*1)
284
                tipw.Parent = ydin
285-
        Weld.C0 = Stop
285+
286
        end
287-
if a then coroutine.wrap(function() func() end)() else func() end
287+
288
--/Attacks
289-
tc = function(Part, Stop, Step,a) --- TweenCFrame function
289+
290-
local func = function()
290+
291-
        local Start = Part.CFrame
291+
292-
        local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
292+
293-
        local Stop = Stop
293+
294-
        local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
294+
295
        f = slash;
296-
        for i = 0, 1, Step or .1 do
296+
297-
                Part.CFrame = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i), 
297+
298-
                                (Start.p.Y * (1 - i)) + (Stop.p.Y * i), 
298+
299-
                                (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
299+
300-
                                (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
300+
301-
                                (Z1 * (1 - i)) + (Z2 * i) )
301+
302
}
303
Keys = {}
304
function CheckKeys(key)
305-
        Part.CFrame = Stop
305+
306
        elseif not Keys[key] then Keys[key] = true
307-
if a then coroutine.wrap(function() func() end)() else func() end
307+
308
end
309-
--/Anim
309+
310-
--SFX
310+
311-
Sparks = function(part,position,radius,number,number2)
311+
312-
local part = part
312+
313-
part.Parent = _
313+
314-
        mode = Instance.new("Model",Weapon)
314+
315-
        for i = 1,number2 do
315+
316-
                local pos = position+Vector3.new(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
316+
317-
                local mag = (position-pos).magnitude
317+
318-
                local laz = part:Clone() laz.Parent = mode laz.Anchored = true
318+
319-
                laz.Size = Vector3.new(laz.Size.x,mag,laz.Size.z)
319+
320-
                --Mesh(laz,1,1,1,1)
320+