SHOW:
|
|
- or go back to the newest paste.
1 | - | --[[FN Five-SeveN Handgun. Developed by Fabrique National Herstal as a counterpart sidearm for |
1 | + | local Player, Character, Mouse = game:service("Players").LocalPlayer, game:GetService("Players").LocalPlayer.Character, game:GetService("Players").LocalPlayer:GetMouse(); |
2 | - | the FN P90. Uses the PDW 5.7x28mm round, which can still, when fired from a pistol, approach |
2 | + | local Torso = Character:FindFirstChild("Torso") |
3 | - | rifle speeds.--]] |
3 | + | local rootPart = Character:FindFirstChild("HumanoidRootPart") |
4 | - | if script == nil then return end |
4 | + | local Humanoid = Character:FindFirstChild("Humanoid") |
5 | - | Player = game.Players.LocalPlayer |
5 | + | local Head = Character:FindFirstChild("Head") |
6 | - | Char = Player.Character |
6 | + | local Right_Arm = Character:FindFirstChild("Right Arm") |
7 | - | animate = Char:findFirstChild("Animate") |
7 | + | local Left_Arm = Character:FindFirstChild("Left Arm") |
8 | - | if animate then |
8 | + | local Right_Leg = Character:FindFirstChild("Right Leg") |
9 | - | animate:Destroy() |
9 | + | local Left_Leg = Character:FindFirstChild("Left Leg") |
10 | - | Name = "FN 5.7 FiveSeveN" |
10 | + | local Right_Shoulder = Torso:FindFirstChild("Right Shoulder") |
11 | - | MC = BrickColor.new("Really blue") |
11 | + | local Left_Shoulder = Torso:FindFirstChild("Left Shoulder") |
12 | - | GC = BrickColor.new("Bright orange") |
12 | + | local Right_Hip = Torso:FindFirstChild("Right Hip") |
13 | - | SC = BrickColor.new("Camo") |
13 | + | local Left_Hip = Torso:FindFirstChild("Left Hip") |
14 | - | Spread = 90000 |
14 | + | local Neck = Torso:FindFirstChild("Neck") |
15 | - | MR = 0.01 |
15 | + | local rootPart = Character:FindFirstChild("HumanoidRootPart") |
16 | - | MagSize = 10000 |
16 | + | local rootJoint = rootPart:FindFirstChild("RootJoint") |
17 | - | Chamber = 1 |
17 | + | local CurrentIdle = "Idling1" |
18 | - | canHit = false |
18 | + | local Degree = 0.0175438596491228 |
19 | - | melee = true |
19 | + | local canremove = false |
20 | - | selected = false |
20 | + | local debounce = false |
21 | - | canDual = true |
21 | + | local UIService=game:GetService'UserInputService' |
22 | - | dual = true |
22 | + | _G.SongName = math.random(1,9025232) |
23 | - | Button1Down = false |
23 | + | sin = math.sin |
24 | - | damage = 1 |
24 | + | Right_Leg.FormFactor = "Custom"; |
25 | - | canFire = true |
25 | + | Left_Leg.FormFactor = "Custom"; |
26 | - | canFire2 = false |
26 | + | rootPart.Archivable = true; |
27 | - | readyTime = 0.1 |
27 | + | rootJoint.Archivable = true; |
28 | - | automatic = false |
28 | + | c_new = CFrame.new; |
29 | - | burst = false |
29 | + | c_angles = CFrame.Angles; |
30 | - | burstCount = 3 |
30 | + | i_new = Instance.new |
31 | - | burstCountMax = 3 |
31 | + | Humanoid:ClearAllChildren(); |
32 | - | canSilence = true |
32 | + | local isAttacking = false |
33 | - | silenced = false |
33 | + | local isSprinting = false |
34 | - | canZoom = false |
34 | + | local Animations = false |
35 | - | zoom = false |
35 | + | local Angle = 0 |
36 | - | switchToSingle = true |
36 | + | local Axis = 0 |
37 | - | switchToBurst = false |
37 | + | local angleSpeed = 1 |
38 | - | switchToAutomatic = false |
38 | + | local axisSpeed = angleSpeed |
39 | - | ammoGui = Instance.new("ScreenGui") |
39 | + | local currentAnim |
40 | - | ammoGui.Name = Name |
40 | + | local levetatingheight = 3 |
41 | - | local frame = Instance.new("Frame") |
41 | + | local WalkType = "Ground" |
42 | - | frame.Name = "Frame" |
42 | + | |
43 | - | frame.Size = UDim2.new(0, 165, 0, 60) |
43 | + | function Sound(parent,loop,vol,id) |
44 | - | frame.Position = UDim2.new(0, 0, 1, -400) |
44 | + | local s = Instance.new('Sound',parent) |
45 | - | frame.BackgroundColor3 = Color3.new(1, 1, 1) |
45 | + | s.Looped = loop |
46 | - | frame.BorderColor3 = Color3.new(0, 0, 0) |
46 | + | s.Volume = vol |
47 | - | frame.Parent = ammoGui |
47 | + | s.MaxDistance=200 |
48 | - | local label = Instance.new("TextLabel") |
48 | + | s.EmitterSize=20 |
49 | - | label.Name = "Weapon" |
49 | + | s.SoundId = 'rbxassetid://'..tostring(id) |
50 | - | label.Text = "Weapon: " ..Name |
50 | + | s:Play() |
51 | - | label.Size = UDim2.new(1, 0, 0, 20) |
51 | + | if loop == false then |
52 | - | label.Position = UDim2.new(0, 0, 0, 0) |
52 | + | wait(s.TimeLength) |
53 | - | label.BackgroundColor3 = Color3.new(1, 0, 0) |
53 | + | s:Destroy() |
54 | - | label.BorderColor3 = Color3.new(0, 0, 0) |
54 | + | end |
55 | - | label.Parent = frame |
55 | + | |
56 | - | local label = Instance.new("TextLabel") |
56 | + | |
57 | - | label.Name = "MagazinePrefix" |
57 | + | Sound(rootPart,true,1,1316241687) |
58 | - | label.Text = " Magazine:" |
58 | + | |
59 | - | label.TextXAlignment = "Left" |
59 | + | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) |
60 | - | label.Size = UDim2.new(1, 0, 0, 20) |
60 | + | wld = Instance.new("Weld", wp1) |
61 | - | label.Position = UDim2.new(0, 0, 0, 20) |
61 | + | wld.Part0 = wp0 |
62 | - | label.BackgroundColor3 = Color3.new(1, 1, 1) |
62 | + | wld.Part1 = wp1 |
63 | - | label.BorderColor3 = Color3.new(0, 0, 0) |
63 | + | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) |
64 | - | label.Parent = frame |
64 | + | return wld |
65 | - | local label = Instance.new("TextLabel") |
65 | + | |
66 | - | label.Name = "Magazine" |
66 | + | |
67 | - | label.Text = "0/0" |
67 | + | function noOutline(part) |
68 | - | label.TextXAlignment = "Right" |
68 | + | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 |
69 | - | label.Size = UDim2.new(1, 0, 0, 20) |
69 | + | |
70 | - | label.Position = UDim2.new(0, -10, 0, 20) |
70 | + | |
71 | - | label.BackgroundTransparency = 1 |
71 | + | local function Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent) |
72 | - | label.BorderSizePixel = 0 |
72 | + | local partie = i_new("Part",parent) |
73 | - | label.Parent = frame |
73 | + | partie.Name=Name |
74 | - | local label = Instance.new("TextLabel") |
74 | + | partie.BrickColor = BrickColor.new(Color) |
75 | - | label.Name = "AmmoPrefix" |
75 | + | partie.Material = Material |
76 | - | label.Text = " 5.7x28mm:" |
76 | + | partie.Shape = Shape |
77 | - | label.TextXAlignment = "Left" |
77 | + | partie.Transparency = Transparency |
78 | - | label.Size = UDim2.new(1, 0, 0, 20) |
78 | + | partie.Size = Size |
79 | - | label.Position = UDim2.new(0, 0, 0, 40) |
79 | + | partie.CFrame = CFrame |
80 | - | label.BackgroundColor3 = Color3.new(1, 1, 1) |
80 | + | partie.CanCollide = CanCollide |
81 | - | label.BorderColor3 = Color3.new(0, 0, 0) |
81 | + | partie.Anchored = Anchored |
82 | - | label.Parent = frame |
82 | + | return partie |
83 | - | local label = Instance.new("TextLabel") |
83 | + | |
84 | - | label.Name = "Ammo" |
84 | + | |
85 | - | label.Text = "0/0" |
85 | + | |
86 | - | label.TextXAlignment = "Right" |
86 | + | |
87 | - | label.Size = UDim2.new(1, 0, 0, 20) |
87 | + | function swait(num) |
88 | - | label.Position = UDim2.new(0, -10, 0, 40) |
88 | + | if num == 0 or num == nil then |
89 | - | label.BackgroundTransparency = 1 |
89 | + | game:GetService("RunService").Stepped:wait(0) |
90 | - | label.BorderSizePixel = 0 |
90 | + | else |
91 | - | label.Parent = frame |
91 | + | for i = 0, num do |
92 | - | function updateGui() |
92 | + | game:GetService("RunService").Stepped:wait(0) |
93 | - | if selected == false then return end |
93 | + | end |
94 | - | if Player:FindFirstChild("PlayerGui") == nil then Instance.new("PlayerGui").Parent = Player end |
94 | + | end |
95 | - | if Player.PlayerGui:FindFirstChild(Name) == nil then |
95 | + | |
96 | - | ammoGui:Clone().Parent = Player.PlayerGui |
96 | + | |
97 | - | end |
97 | + | function mesh(Mesh, part, meshtype, meshid, offset, scale) |
98 | - | Player.PlayerGui[Name].Frame.Magazine.Text = tostring(magazine.Value).. "/" ..tostring(magazineMax.Value) |
98 | + | local mesh = i_new(Mesh) |
99 | - | Player.PlayerGui[Name].Frame.Ammo.Text = tostring(ammo.Value).. "/" ..tostring(ammoMax.Value) |
99 | + | mesh.Parent = part |
100 | if Mesh == "SpecialMesh" then | |
101 | - | function makeParts(format) |
101 | + | mesh.MeshType = meshtype |
102 | - | local model = Instance.new("Model") |
102 | + | mesh.MeshId = meshid |
103 | - | model.Name = Name |
103 | + | end |
104 | - | local pm2 = Instance.new("Part") |
104 | + | mesh.Offset = offset |
105 | - | pm2.Name = "WeldPoint" |
105 | + | mesh.Scale = scale |
106 | - | pm2.formFactor = "Symmetric" |
106 | + | return mesh |
107 | - | pm2.Size = Vector3.new(1, 1, 1) |
107 | + | |
108 | - | pm2.BrickColor = MC |
108 | + | |
109 | - | pm2.Reflectance = MR |
109 | + | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position, Direction, MaxDistance, IgnoreDescendants |
110 | - | pm2.CanCollide = false |
110 | + | return game:GetService("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) |
111 | - | pm2.Transparency = 1 |
111 | + | |
112 | - | pm2.Locked = true |
112 | + | |
113 | - | pm2.TopSurface = 0 |
113 | + | function QuaternionFromCFrame(cf) |
114 | - | pm2.BottomSurface = 0 |
114 | + | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() |
115 | - | pm2.Parent = model |
115 | + | local trace = m00 + m11 + m22 |
116 | - | local m = Instance.new("SpecialMesh") |
116 | + | if trace > 0 then |
117 | - | m.MeshType = "Brick" |
117 | + | local s = math.sqrt(1 + trace) |
118 | - | m.Scale = Vector3.new(0.3, 0.8, 0.4) |
118 | + | local recip = 0.5/s |
119 | - | m.Parent = pm2 |
119 | + | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 |
120 | - | if format ~= nil then |
120 | + | else |
121 | - | local w = Instance.new("Weld") |
121 | + | local i = 0 |
122 | - | w.Part0 = pm2 |
122 | + | if m11 > m00 then |
123 | - | if format == "RightHand" then |
123 | + | i = 1 |
124 | - | w.Part1 = Player.Character:FindFirstChild("Right Arm") |
124 | + | end |
125 | - | w.C0 = CFrame.new(0, 0.9, 0.68) |
125 | + | if m22 > (i == 0 and m00 or m11) then |
126 | - | w.C1 = CFrame.new() |
126 | + | i = 2 |
127 | - | elseif format == "LeftHand" then |
127 | + | end |
128 | - | w.Part1 = Player.Character:FindFirstChild("Left Arm") |
128 | + | if i == 0 then |
129 | - | w.C0 = CFrame.new(0, 0.9, 0.68) |
129 | + | local s = math.sqrt(m00-m11-m22+1) |
130 | - | w.C1 = CFrame.new() |
130 | + | local recip = 0.5/s |
131 | - | model.Name = Name.. " (Left)" |
131 | + | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip |
132 | - | elseif format == "RightHolster" then |
132 | + | elseif i == 1 then |
133 | - | w.Part1 = Player.Character:FindFirstChild("Right Leg") |
133 | + | local s = math.sqrt(m11-m22-m00+1) |
134 | - | w.C0 = CFrame.new(-0.65, -0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0) |
134 | + | local recip = 0.5/s |
135 | - | w.C1 = CFrame.new() |
135 | + | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip |
136 | - | model.Name = Name.. " (Holstered)" |
136 | + | elseif i == 2 then |
137 | - | elseif format == "LeftHolster" then |
137 | + | local s = math.sqrt(m22-m00-m11+1) |
138 | - | w.Part1 = Player.Character:FindFirstChild("Left Leg") |
138 | + | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip |
139 | - | w.C0 = CFrame.new(0.65, -0.25, 0) * CFrame.fromEulerAnglesXYZ(math.rad(25), 0, 0) |
139 | + | end |
140 | - | w.C1 = CFrame.new() |
140 | + | end |
141 | - | model.Name = Name.. " (Holstered, Left)" |
141 | + | |
142 | - | end |
142 | + | |
143 | - | w.Parent = pm2 |
143 | + | function QuaternionToCFrame(px, py, pz, x, y, z, w) |
144 | - | model.Parent = Player.Character |
144 | + | local xs, ys, zs = x + x, y + y, z + z |
145 | - | end |
145 | + | local wx, wy, wz = w*xs, w*ys, w*zs |
146 | - | local pm = Instance.new("Part") |
146 | + | local xx = x*xs |
147 | - | pm.Name = "Handle" |
147 | + | local xy = x*ys |
148 | - | pm.formFactor = "Symmetric" |
148 | + | local xz = x*zs |
149 | - | pm.Size = Vector3.new(1, 1, 1) |
149 | + | local yy = y*ys |
150 | - | pm.CanCollide = false |
150 | + | local yz = y*zs |
151 | - | pm.Transparency = 1 |
151 | + | local zz = z*zs |
152 | - | pm.Locked = true |
152 | + | return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) |
153 | - | pm.TopSurface = 0 |
153 | + | |
154 | - | pm.BottomSurface = 0 |
154 | + | |
155 | - | pm.Parent = model |
155 | + | function QuaternionSlerp(a, b, t) |
156 | - | local w = Instance.new("Weld") |
156 | + | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] |
157 | - | w.Part0 = pm |
157 | + | local startInterp, finishInterp; |
158 | - | w.Part1 = pm2 |
158 | + | if cosTheta >= 0.0001 then |
159 | - | w.C0 = CFrame.new() |
159 | + | if (1 - cosTheta) > 0.0001 then |
160 | - | w.C1 = CFrame.new() |
160 | + | local theta = math.acos(cosTheta) |
161 | - | w.Parent = pm |
161 | + | local invSinTheta = 1/math.sin(theta) |
162 | - | local s = Instance.new("Sound") |
162 | + | startInterp = math.sin((1-t)*theta)*invSinTheta |
163 | - | s.Name = "Melee" |
163 | + | finishInterp = math.sin(t*theta)*invSinTheta |
164 | - | s.SoundId = "rbxasset://sounds/swordslash.wav" |
164 | + | else |
165 | - | s.Volume = 1 |
165 | + | startInterp = 1-t |
166 | - | s.Pitch = 2 |
166 | + | finishInterp = t |
167 | - | s.Looped = false |
167 | + | end |
168 | - | s.Parent = pm |
168 | + | else |
169 | - | local s = Instance.new("Sound") |
169 | + | if (1+cosTheta) > 0.0001 then |
170 | - | s.Name = "Impact" |
170 | + | local theta = math.acos(-cosTheta) |
171 | - | s.SoundId = "http://www.roblox.com/Asset/?id=46153268" |
171 | + | local invSinTheta = 1/math.sin(theta) |
172 | - | s.Volume = 0.5 |
172 | + | startInterp = math.sin((t-1)*theta)*invSinTheta |
173 | - | s.Pitch = 1 |
173 | + | finishInterp = math.sin(t*theta)*invSinTheta |
174 | - | s.Looped = false |
174 | + | else |
175 | - | s.Parent = pm |
175 | + | startInterp = t-1 |
176 | - | local s = Instance.new("Sound") |
176 | + | finishInterp = t |
177 | - | s.Name = "Fire" |
177 | + | end |
178 | - | s.SoundId = "http://www.roblox.com/Asset/?id=131139535" |
178 | + | end |
179 | - | s.Volume = 1 |
179 | + | return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp |
180 | - | s.Pitch = 3 |
180 | + | |
181 | - | s.Looped = false |
181 | + | |
182 | - | s.Parent = pm |
182 | + | function clerp(a, b, t) |
183 | - | local s = Instance.new("Sound") |
183 | + | local qa = {QuaternionFromCFrame(a)} |
184 | - | s.Name = "Fire2" |
184 | + | local qb = {QuaternionFromCFrame(b)} |
185 | - | s.SoundId = "http://roblox.com/asset/?id=131257506" |
185 | + | local ax, ay, az = a.x, a.y, a.z |
186 | - | s.Volume = 1 |
186 | + | local bx, by, bz = b.x, b.y, b.z |
187 | - | s.Pitch = 3 |
187 | + | local _t = 1-t |
188 | - | s.Looped = false |
188 | + | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) |
189 | - | s.Parent = pm |
189 | + | |
190 | - | local s = Instance.new("Sound") |
190 | + | |
191 | - | s.Name = "Reload" |
191 | + | swait() |
192 | - | s.SoundId = "http://www.roblox.com/Asset/?id=155729479" |
192 | + | LA_Weld = newWeld(Torso, Left_Arm, -1.5, 0.5, 0) |
193 | - | s.Volume = 1 |
193 | + | Left_Arm.Weld.C1 = CFrame.new(0, 0.5, 0) |
194 | - | s.Pitch = 3 |
194 | + | RA_Weld = newWeld(Torso, Right_Arm, 1.5, 0.5, 0) |
195 | - | s.Looped = false |
195 | + | Right_Arm.Weld.C1 = CFrame.new(0, 0.5, 0) |
196 | - | s.Parent = pm |
196 | + | LL_Weld = newWeld(Torso, Left_Leg, -0.5, -1, 0) |
197 | - | local s = Instance.new("Sound") |
197 | + | Left_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Left_Leg.Weld.C1 = CFrame.new(0, 1, 0.15) |
198 | - | s.Name = "Empty" |
198 | + | RL_Weld = newWeld(Torso, Right_Leg, 0.5, -1, 0) |
199 | - | s.SoundId = "http://www.roblox.com/asset/?id=132464034" |
199 | + | Right_Leg.Weld.C1 = CFrame.new(0, 1, 0) -- Right_Leg.Weld.C1 = CFrame.new(0, 1, 0.15) |
200 | - | s.Volume = 1 |
200 | + | Torso_Weld = newWeld(rootPart, Torso, 0, -1, 0) |
201 | - | s.Pitch = 5 |
201 | + | Torso.Weld.C1 = CFrame.new(0, -1, 0) |
202 | - | s.Looped = false |
202 | + | Head_Weld = newWeld(Torso, Head, 0, 1.5, 0) |
203 | - | s.Parent = pm |
203 | + | |
204 | - | local s = Instance.new("Sound") |
204 | + | for i,v in pairs(Character:GetChildren()) do |
205 | - | s.Name = "Lock" |
205 | + | if v:IsA('Accoutrement') or v:IsA('Shirt') or v:IsA('Pants') then |
206 | - | s.SoundId = "http://www.roblox.com/Asset/?id=132572980" |
206 | + | v:Destroy() |
207 | - | s.Volume = 1 |
207 | + | elseif v:IsA('Part') and v.Name=='Head' then |
208 | - | s.Pitch = 3 |
208 | + | v.face:Destroy() |
209 | - | s.Looped = false |
209 | + | end |
210 | - | s.Parent = pm |
210 | + | |
211 | - | local s = Instance.new("Sound") |
211 | + | |
212 | - | s.Name = "Release" |
212 | + | Character['Body Colors'].HeadColor=BrickColor.new('Really black') |
213 | - | s.SoundId = "http://www.roblox.com/Asset/?id=155729479" |
213 | + | Character['Body Colors'].TorsoColor=BrickColor.new('Really black') |
214 | - | s.Volume = 1 |
214 | + | Character['Body Colors'].RightArmColor=BrickColor.new('Really black') |
215 | - | s.Pitch = 4 |
215 | + | Character['Body Colors'].LeftArmColor=BrickColor.new('Really black') |
216 | - | s.Looped = false |
216 | + | Character['Body Colors'].RightLegColor=BrickColor.new('Really black') |
217 | - | s.Parent = pm |
217 | + | Character['Body Colors'].LeftLegColor=BrickColor.new('Really black') |
218 | - | local s = Instance.new("Sound") |
218 | + | |
219 | - | s.Name = "Switch" |
219 | + | Humanoid.DisplayDistanceType='None' |
220 | - | s.SoundId = "http://www.roblox.com/asset/?id=2697295" |
220 | + | |
221 | - | s.Volume = 1 |
221 | + | --Part(Name,Color, Material, Transparency,Shape, Size, CFrame,CanCollide,Anchored,parent) |
222 | - | s.Pitch = 10 |
222 | + | --newWeld(wp0, wp1, wc0x, wc0y, wc0z) |
223 | - | s.Looped = false |
223 | + | local REye=Part('REye','Royal purple','Neon',0,'Ball',Vector3.new(.1,.1,.1),CFrame.new(0,0,0),false,false,Character) |
224 | - | s.Parent = pm |
224 | + | newWeld(Head,REye,.2,.225,-.5) |
225 | - | local p = Instance.new("Part") |
225 | + | local REGlow=Instance.new('SurfaceLight') |
226 | - | p.Name = "ShellOut" |
226 | + | REGlow.Color=Color3.fromRGB(170,85,255) |
227 | - | p.formFactor = "Symmetric" |
227 | + | REGlow.Range=6 |
228 | - | p.Size = Vector3.new(1, 1, 1) |
228 | + | REGlow.Brightness=10 |
229 | - | p.Transparency = 1 |
229 | + | REGlow.Parent=REye |
230 | - | p.Locked = true |
230 | + | local Glow=Instance.new('ParticleEmitter') |
231 | - | p.CanCollide = false |
231 | + | Glow.Color=ColorSequence.new(Color3.fromRGB(170,85,255),Color3.fromRGB(170,85,255)) |
232 | - | p.TopSurface = 0 |
232 | + | Glow.Texture='rbxassetid://242292318' |
233 | - | p.BottomSurface = 0 |
233 | + | Glow.Transparency=NumberSequence.new(.9) |
234 | - | p.Parent = model |
234 | + | Glow.Size=NumberSequence.new(.225) |
235 | - | local w = Instance.new("Weld") |
235 | + | Glow.Acceleration=Vector3.new(45,30,0) |
236 | - | w.Part0 = p |
236 | + | Glow.LockedToPart=true |
237 | - | w.Part1 = pm |
237 | + | Glow.Lifetime=NumberRange.new(.25,.25) |
238 | - | w.C0 = CFrame.new(0.5, 0, 0.5) * CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0) |
238 | + | Glow.Rate=1000 |
239 | - | w.C1 = CFrame.new() |
239 | + | Glow.EmissionDirection='Bottom' |
240 | - | w.Parent = p |
240 | + | Glow.Speed=NumberRange.new(1,1) |
241 | - | local p = Instance.new("Part") |
241 | + | Glow.ZOffset=2 |
242 | - | p.Name = "Grip" |
242 | + | Glow.Parent=REye |
243 | - | p.formFactor = "Symmetric" |
243 | + | local LEye=Part('LEye','Royal purple','Neon',0,'Ball',Vector3.new(.1,.1,.1),CFrame.new(0,0,0),false,false,Character) |
244 | - | p.Size = Vector3.new(1, 1, 1) |
244 | + | newWeld(Head,LEye,-.2,.225,-.5) |
245 | - | p.BrickColor = GC |
245 | + | local LEGlow=Instance.new('SurfaceLight') |
246 | - | p.Reflectance = MR |
246 | + | LEGlow.Color=Color3.fromRGB(170,85,255) |
247 | - | p.CanCollide = false |
247 | + | LEGlow.Range=6 |
248 | - | p.Locked = true |
248 | + | LEGlow.Brightness=10 |
249 | - | p.TopSurface = 0 |
249 | + | LEGlow.Parent=LEye |
250 | - | p.BottomSurface = 0 |
250 | + | local Glow2=Instance.new('ParticleEmitter') |
251 | - | p.Parent = model |
251 | + | Glow2.Color=ColorSequence.new(Color3.fromRGB(0,0,0),Color3.fromRGB(0,0,0)) |
252 | - | local m = Instance.new("SpecialMesh") |
252 | + | Glow2.Texture='rbxassetid://242292318' |
253 | - | m.MeshType = "Brick" |
253 | + | Glow2.Transparency=NumberSequence.new(.988) |
254 | - | m.Scale = Vector3.new(0.261, 0.42, 0.7) |
254 | + | Glow2.Size=NumberSequence.new(5) |
255 | - | m.Parent = p |
255 | + | Glow2.LockedToPart=false |
256 | - | local w = Instance.new("Weld") |
256 | + | Glow2.Lifetime=NumberRange.new(.5,.5) |
257 | - | w.Part0 = p |
257 | + | Glow2.Rate=1000 |
258 | - | w.Part1 = pm |
258 | + | Glow2.EmissionDirection='Top' |
259 | - | w.C0 = CFrame.new(0, -0.022, -0.4) * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0) |
259 | + | Glow2.Speed=NumberRange.new(1,1) |
260 | - | w.C1 = CFrame.new() |
260 | + | Glow2.VelocitySpread=Vector3.new(0,0,60) |
261 | - | w.Parent = p |
261 | + | Glow2.ZOffset=1 |
262 | - | local p = Instance.new("Part") |
262 | + | Glow2.Parent=Torso |
263 | - | p.Name = "Magazine" |
263 | + | |
264 | - | p.formFactor = "Symmetric" |
264 | + | sine = 0 |
265 | - | p.Size = Vector3.new(1, 1, 1) |
265 | + | change = 1 |
266 | - | p.BrickColor = MC |
266 | + | sprint=false |
267 | - | p.Reflectance = MR |
267 | + | local punches={ |
268 | - | p.CanCollide = false |
268 | + | a=false, |
269 | - | p.Locked = true |
269 | + | b=false, |
270 | - | p.TopSurface = 0 |
270 | + | c=false |
271 | - | p.BottomSurface = 0 |
271 | + | } |
272 | - | p.Parent = model |
272 | + | |
273 | - | local m = Instance.new("SpecialMesh") |
273 | + | UIService.InputBegan:connect(function(Input,GUIProcessed) |
274 | - | m.MeshType = "Brick" |
274 | + | if not GUIProcessed and Input.UserInputType==Enum.UserInputType.MouseButton1 then |
275 | - | m.Scale = Vector3.new(0.24, 0.38, 0.74) |
275 | + | if punches.a==false then |
276 | - | m.Parent = p |
276 | + | punches.a=true wait(.4) punches.a=false |
277 | - | local w = Instance.new("Weld") |
277 | + | else |
278 | - | w.Part0 = p |
278 | + | punches.a=true |
279 | - | w.Part1 = pm |
279 | + | print('a ',punches.a) |
280 | - | w.C0 = CFrame.new(0, -0.02, -0.42) * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0) |
280 | + | if punches.b==false then |
281 | - | w.C1 = CFrame.new() |
281 | + | punches.b=true wait(.4) punches.b=false |
282 | - | w.Parent = p |
282 | + | else |
283 | - | local p = Instance.new("Part") |
283 | + | punches.b=true |
284 | - | p.Name = "Rail" |
284 | + | print('b ',punches.b) |
285 | - | p.CanCollide = false |
285 | + | if punches.c==false then |
286 | - | p.formFactor = "Symmetric" |
286 | + | punches.c=true wait(.4) punches.c=false |
287 | - | p.Size = Vector3.new(1, 1, 1) |
287 | + | else |
288 | - | p.BrickColor = GC |
288 | + | punches.c=true |
289 | - | p.Reflectance = MR |
289 | + | print('c ',punches.c) |
290 | - | p.Locked = true |
290 | + | print('a ',punches.a,'b ',punches.b,'c ',punches.c) |
291 | - | p.TopSurface = 0 |
291 | + | end |
292 | - | p.BottomSurface = 0 |
292 | + | end |
293 | - | p.Parent = model |
293 | + | end |
294 | - | local m = Instance.new("BlockMesh") |
294 | + | elseif not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then |
295 | - | m.Scale = Vector3.new(0.15, 0.05, 0.1) |
295 | + | sprint=true |
296 | - | m.Parent = p |
296 | + | end |
297 | - | local w = Instance.new("Weld") |
297 | + | end) |
298 | - | w.Part0 = p |
298 | + | |
299 | - | w.Part1 = pm |
299 | + | UIService.InputEnded:connect(function(Input,GUIProcessed) |
300 | - | w.C0 = CFrame.new(0, 0.55, -0.08) |
300 | + | if not GUIProcessed and Input.KeyCode==Enum.KeyCode.LeftShift then |
301 | - | w.C1 = CFrame.new() |
301 | + | sprint=false |
302 | - | w.Parent = p |
302 | + | end |
303 | - | local p = Instance.new("Part") |
303 | + | end) |
304 | - | p.Name = "Rail" |
304 | + | |
305 | - | p.CanCollide = false |
305 | + | game:GetService("RunService").RenderStepped:connect(function() |
306 | - | p.formFactor = "Symmetric" |
306 | + | Angle = (Angle % 100) + angleSpeed/10 |
307 | - | p.Size = Vector3.new(1, 1, 1) |
307 | + | Axis = (Axis % 100) + axisSpeed/10 |
308 | - | p.BrickColor = GC |
308 | + | walkingMagnitude = Vector3.new(rootPart.Velocity.X, 0, rootPart.Velocity.Z).magnitude |
309 | - | p.Reflectance = MR |
309 | + | jumpVel = Torso.Velocity.Y |
310 | - | p.Locked = true |
310 | + | sine = change + sine |
311 | - | p.TopSurface = 0 |
311 | + | |
312 | - | p.BottomSurface = 0 |
312 | + | if(Humanoid.Jump) and jumpVel > 1 then |
313 | - | p.Parent = model |
313 | + | currentAnim = "Jumping" |
314 | - | local m = Instance.new("BlockMesh") |
314 | + | elseif walkingMagnitude < 2 then |
315 | - | m.Scale = Vector3.new(0.15, 0.05, 0.1) |
315 | + | currentAnim = "Idling" |
316 | - | m.Parent = p |
316 | + | elseif isSprinting == true then |
317 | - | local w = Instance.new("Weld") |
317 | + | currentAnim = "Sprinting" |
318 | - | w.Part0 = p |
318 | + | elseif walkingMagnitude > 2 then |
319 | - | w.Part1 = pm |
319 | + | currentAnim = "Walking" |
320 | - | w.C0 = CFrame.new(0, 0.65, -0.08) |
320 | + | elseif isAttacking == true then |
321 | - | w.C1 = CFrame.new() |
321 | + | currentAnim = "Attacking" |
322 | - | w.Parent = p |
322 | + | end |
323 | - | local p = Instance.new("Part") |
323 | + | |
324 | - | p.Name = "Rail" |
324 | + | if currentAnim == "Jumping" and Animations == false then |
325 | - | p.CanCollide = false |
325 | + | angleSpeed = 2 |
326 | - | p.formFactor = "Symmetric" |
326 | + | axisSpeed = 2 |
327 | - | p.Size = Vector3.new(1, 1, 1) |
327 | + | RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) |
328 | - | p.BrickColor = GC |
328 | + | LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) |
329 | - | p.Reflectance = MR |
329 | + | LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) |
330 | - | p.Locked = true |
330 | + | RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) |
331 | - | p.TopSurface = 0 |
331 | + | Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) |
332 | - | p.BottomSurface = 0 |
332 | + | Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) |
333 | - | p.Parent = model |
333 | + | elseif currentAnim == "Idling" and Animations == false then |
334 | - | local m = Instance.new("BlockMesh") |
334 | + | angleSpeed = 1 |
335 | - | m.Scale = Vector3.new(0.15, 0.05, 0.1) |
335 | + | axisSpeed = 1 |
336 | - | m.Parent = p |
336 | + | change = 0.5 |
337 | - | local w = Instance.new("Weld") |
337 | + | RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, .5, 0) * c_angles(math.rad(45), math.rad(-3), math.rad(-10)), 0.15) |
338 | - | w.Part0 = p |
338 | + | LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(45), math.rad(5), math.rad(20)), 0.15) |
339 | - | w.Part1 = pm |
339 | + | LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.rad(85), math.rad(0), math.rad(-20)), 0.15) |
340 | - | w.C0 = CFrame.new(0, 0.75, -0.08) |
340 | + | RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(math.rad(85), math.rad(0), math.rad(30)), 0.15) |
341 | - | w.C1 = CFrame.new() |
341 | + | Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -2.5, 0) * c_angles(math.rad(10), math.rad(0), math.rad(0)), 0.15) |
342 | - | w.Parent = p |
342 | + | Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.rad(0), math.rad(0)), 0.15) |
343 | - | local p = Instance.new("Part") |
343 | + | elseif currentAnim == "Walking" and Animations == false then |
344 | - | p.Name = "Trigger" |
344 | + | if sprint==false then |
345 | - | p.formFactor = "Symmetric" |
345 | + | angleSpeed = 1 |
346 | - | p.Size = Vector3.new(1, 1, 1) |
346 | + | axisSpeed = 1 |
347 | - | p.BrickColor = BrickColor.new("Black") |
347 | + | Humanoid.WalkSpeed = 16 |
348 | - | p.Reflectance = MR |
348 | + | RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(0), -math.sin((rootPart.RotVelocity.X/5))/2, math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15) |
349 | - | p.CanCollide = false |
349 | + | LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.X/5))/2, -math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15) |
350 | - | p.Locked = true |
350 | + | LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/2)/1.5, math.sin((rootPart.RotVelocity.Y/5))/2, -math.sin((rootPart.RotVelocity.Y/5))/2), 0.15) |
351 | - | p.TopSurface = 0 |
351 | + | RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/2)/1.5, -math.sin((rootPart.RotVelocity.Y/5))/2, math.sin((-rootPart.RotVelocity.Y/5))/2), 0.15) |
352 | - | p.BottomSurface = 0 |
352 | + | Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(0), math.rad(0), math.sin((rootPart.RotVelocity.Y/30))/2), 0.15) |
353 | - | p.Parent = model |
353 | + | Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.Y/2.5))/2, math.rad(0)), 0.15) |
354 | - | local m = Instance.new("BlockMesh") |
354 | + | else |
355 | - | m.Scale = Vector3.new(0.1, 0.4, 0.16) |
355 | + | angleSpeed = 10 |
356 | - | m.Parent = p |
356 | + | axisSpeed = 10 |
357 | - | local w = Instance.new("Weld") |
357 | + | Humanoid.WalkSpeed = 60 |
358 | - | w.Part0 = p |
358 | + | RA_Weld.C0 = clerp(RA_Weld.C0, c_new(1.5, 0.5, 0) * c_angles(math.rad(-40)+(-math.sin(sine/20)/5), -math.sin((rootPart.RotVelocity.X/3))/2, math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15) |
359 | - | w.Part1 = pm |
359 | + | LA_Weld.C0 = clerp(LA_Weld.C0, c_new(-1.5, 0.5, 0) * c_angles(math.rad(-40)+(-math.sin(sine/20)/5), math.sin((rootPart.RotVelocity.X/3))/2, -math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15) |
360 | - | w.C0 = CFrame.new(0, 0.06, -0.25) |
360 | + | LL_Weld.C0 = clerp(LL_Weld.C0, c_new(-0.5, -1, 0) * c_angles(math.sin(sine/1)/1, math.sin((rootPart.RotVelocity.Y/3))/2, -math.sin((rootPart.RotVelocity.Y/3))/2), 0.15) |
361 | - | w.C1 = CFrame.new() |
361 | + | RL_Weld.C0 = clerp(RL_Weld.C0, c_new(0.5, -1, 0) * c_angles(-math.sin(sine/1)/1, -math.sin((rootPart.RotVelocity.Y/3))/2, math.sin((-rootPart.RotVelocity.Y/3))/2), 0.15) |
362 | - | w.Parent = p |
362 | + | Torso_Weld.C0 = clerp(Torso_Weld.C0, c_new(0, -1, 0) * c_angles(math.rad(-20), math.rad(0), math.sin((rootPart.RotVelocity.Y/15))/2), 0.15) |
363 | - | local p = Instance.new("Part") |
363 | + | Head_Weld.C0 = clerp(Head_Weld.C0, c_new(0, 1.5, 0) * c_angles(math.rad(0), math.sin((rootPart.RotVelocity.Y/1))/2, math.rad(0)), 0.15) |
364 | - | p.Name = "TriggerGuard" |
364 | + | end |
365 | - | p.formFactor = "Symmetric" |
365 | + | end |
366 | - | p.Size = Vector3.new(1, 1, 1) |
366 | + | end) |
367 | - | p.BrickColor = GC |
367 | + | function chatfunc(text) |
368 | - | p.CanCollide = false |
368 | + | local chat = coroutine.wrap(function() |
369 | - | p.Locked = true |
369 | + | if chara:FindFirstChild("TalkingBillBoard")~= nil then |
370 | - | p.TopSurface = 0 |
370 | + | chara:FindFirstChild("TalkingBillBoard"):destroy() |
371 | - | p.BottomSurface = 0 |
371 | + | |
372 | - | p.Parent = model |
372 | + | local naeeym2 = Instance.new("BillboardGui",chara) |
373 | - | local m = Instance.new("SpecialMesh") |
373 | + | naeeym2.Size = UDim2.new(0,100,0,40) |
374 | - | m.MeshType = "FileMesh" |
374 | + | naeeym2.StudsOffset = Vector3.new(0,3,0) |
375 | - | m.MeshId = "http://www.roblox.com/asset/?id=3270017" |
375 | + | naeeym2.Adornee = chara.Head |
376 | - | m.Scale = Vector3.new(0.34, 0.34, 0.8) |
376 | + | naeeym2.Name = "TalkingBillBoard" |
377 | - | m.Parent = p |
377 | + | local tecks2 = Instance.new("TextLabel",naeeym2) |
378 | - | local w = Instance.new("Weld") |
378 | + | tecks2.BackgroundTransparency = 1 |
379 | - | w.Part0 = p |
379 | + | tecks2.BorderSizePixel = 0 |
380 | - | w.Part1 = pm |
380 | + | tecks2.Text = "" |
381 | - | w.C0 = CFrame.new(-0.25, 0.18, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0) |
381 | + | tecks2.Font = "Fantasy" |
382 | - | w.C1 = CFrame.new() |
382 | + | tecks2.FontSize = "Size24" |
383 | - | w.Parent = p |
383 | + | tecks2.TextStrokeTransparency = 0 |
384 | - | local p = Instance.new("Part") |
384 | + | tecks2.TextColor3 = Color3.new(.6,0,0) |
385 | - | p.Name = "Base" |
385 | + | tecks2.TextStrokeColor3 = Color3.new(0,0,0) |
386 | - | p.CanCollide = false |
386 | + | tecks2.Size = UDim2.new(1,0,0.5,0) |
387 | - | p.formFactor = "Symmetric" |
387 | + | local shk = coroutine.wrap(function() |
388 | - | p.Size = Vector3.new(1, 1, 1) |
388 | + | while tecks2 ~= nil do |
389 | - | p.BrickColor = GC |
389 | + | wait(.05) |
390 | - | p.Reflectance = MR |
390 | + | tecks2.Position = UDim2.new(0,math.random(-3,3),0,math.random(-3,3)) |
391 | - | p.Locked = true |
391 | + | |
392 | - | p.TopSurface = 0 |
392 | + | end) |
393 | - | p.BottomSurface = 0 |
393 | + | shk() |
394 | - | p.Parent = model |
394 | + | for i = 1,string.len(text),1 do |
395 | - | local m = Instance.new("SpecialMesh") |
395 | + | tecks2.Text = string.sub(text,1,i) |
396 | - | m.MeshType = "Brick" |
396 | + | wait(0.01) |
397 | - | m.Scale = Vector3.new(0.261, 0.9, 0.248) |
397 | + | |
398 | - | m.Parent = p |
398 | + | wait(1) |
399 | - | local w = Instance.new("Weld") |
399 | + | for i = 1, 5 do |
400 | - | w.Part0 = p |
400 | + | wait(.01) |
401 | - | w.Part1 = pm |
401 | + | tecks2.Position = tecks2.Position - UDim2.new(0,0,.05,0) |
402 | - | w.C0 = CFrame.new(0, 0.045, -0.066) |
402 | + | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.2 |
403 | - | w.C1 = CFrame.new() |
403 | + | tecks2.TextTransparency = tecks2.TextTransparency + .2 |
404 | - | w.Parent = p |
404 | + | |
405 | - | local p = Instance.new("Part") |
405 | + | naeeym2:Destroy() |
406 | - | p.Name = "Base" |
406 | + | end) |
407 | - | p.CanCollide = false |
407 | + | chat() |
408 | - | p.formFactor = "Symmetric" |
408 | + | |
409 | - | p.Size = Vector3.new(1, 1, 1) |
409 | + | |
410 | - | p.BrickColor = GC |
410 | + | function onChatted(msg) |
411 | - | p.Reflectance = MR |
411 | + | chatfunc(msg) |
412 | - | p.Locked = true |
412 | + | |
413 | - | p.TopSurface = 0 |
413 | + | player.Chatted:connect(onChatted) |