SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,game,owner = owner,game | |
3 | local RealPlayer = Player | |
4 | do | |
5 | local rp = RealPlayer | |
6 | script.Parent = rp.Character | |
7 | ||
8 | --RemoteEvent for communicating | |
9 | local Event = Instance.new("RemoteEvent") | |
10 | Event.Name = "UserInput_Event" | |
11 | ||
12 | --Fake event to make stuff like Mouse.KeyDown work | |
13 | local function fakeEvent() | |
14 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
15 | t.connect = t.Connect | |
16 | return t | |
17 | end | |
18 | ||
19 | --Creating fake input objects with fake variables | |
20 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
21 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
22 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
23 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
24 | end} | |
25 | --Merged 2 functions into one by checking amount of arguments | |
26 | CAS.UnbindAction = CAS.BindAction | |
27 | ||
28 | --This function will trigger the events that have been :Connect()'ed | |
29 | local function te(self,ev,...) | |
30 | local t = m[ev] | |
31 | if t and t._fakeEvent then | |
32 | for _,f in pairs(t.Functions) do | |
33 | f(...) | |
34 | end | |
35 | end | |
36 | end | |
37 | m.TrigEvent = te | |
38 | UIS.TrigEvent = te | |
39 | ||
40 | Event.OnServerEvent:Connect(function(plr,io) | |
41 | if plr~=rp then return end | |
42 | m.Target = io.Target | |
43 | m.Hit = io.Hit | |
44 | if not io.isMouse then | |
45 | local b = io.UserInputState == Enum.UserInputState.Begin | |
46 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
47 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
48 | end | |
49 | for _,t in pairs(CAS.Actions) do | |
50 | for _,k in pairs(t.Keys) do | |
51 | if k==io.KeyCode then | |
52 | t.Function(t.Name,io.UserInputState,io) | |
53 | end | |
54 | end | |
55 | end | |
56 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
57 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
58 | end | |
59 | end) | |
60 | Event.Parent = NLS([==[ | |
61 | local Player = game:GetService("Players").LocalPlayer | |
62 | local Event = script:WaitForChild("UserInput_Event") | |
63 | ||
64 | local Mouse = Player:GetMouse() | |
65 | local UIS = game:GetService("UserInputService") | |
66 | local input = function(io,a) | |
67 | if a then return end | |
68 | --Since InputObject is a client-side instance, we create and pass table instead | |
69 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
70 | end | |
71 | UIS.InputBegan:Connect(input) | |
72 | UIS.InputEnded:Connect(input) | |
73 | ||
74 | local h,t | |
75 | --Give the server mouse data 30 times every second, but only if the values changed | |
76 | --If player is not moving their mouse, client won't fire events | |
77 | while wait(1/30) do | |
78 | if h~=Mouse.Hit or t~=Mouse.Target then | |
79 | h,t=Mouse.Hit,Mouse.Target | |
80 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
81 | end | |
82 | end]==],Player.Character) | |
83 | ||
84 | ----Sandboxed game object that allows the usage of client-side methods and services | |
85 | --Real game object | |
86 | local _rg = game | |
87 | ||
88 | --Metatable for fake service | |
89 | local fsmt = { | |
90 | __index = function(self,k) | |
91 | local s = rawget(self,"_RealService") | |
92 | if s then return s[k] end | |
93 | end, | |
94 | __newindex = function(self,k,v) | |
95 | local s = rawget(self,"_RealService") | |
96 | if s then s[k]=v end | |
97 | end, | |
98 | __call = function(self,...) | |
99 | local s = rawget(self,"_RealService") | |
100 | if s then return s(...) end | |
101 | end | |
102 | } | |
103 | local function FakeService(t,RealService) | |
104 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
105 | return setmetatable(t,fsmt) | |
106 | end | |
107 | ||
108 | --Fake game object | |
109 | local g = { | |
110 | GetService = function(self,s) | |
111 | return self[s] | |
112 | end, | |
113 | Players = FakeService({ | |
114 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
115 | },"Players"), | |
116 | UserInputService = FakeService(UIS,"UserInputService"), | |
117 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
118 | } | |
119 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
120 | g.service = g.GetService | |
121 | ||
122 | g.RunService = FakeService({ | |
123 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
124 | BindToRenderStep = function(self,name,_,fun) | |
125 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
126 | end, | |
127 | UnbindFromRenderStep = function(self,name) | |
128 | self._btrs[name]:Disconnect() | |
129 | end, | |
130 | },"RunService") | |
131 | ||
132 | setmetatable(g,{ | |
133 | __index=function(self,s) | |
134 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
135 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
136 | end, | |
137 | __newindex = fsmt.__newindex, | |
138 | __call = fsmt.__call | |
139 | }) | |
140 | --Changing owner to fake player object to support owner:GetMouse() | |
141 | game,owner = g,g.Players.LocalPlayer | |
142 | end | |
143 | ||
144 | Player = owner | |
145 | PlayerGui = Player.PlayerGui | |
146 | Cam = workspace.CurrentCamera | |
147 | Backpack = Player.Backpack | |
148 | - | Character = Player.Character |
148 | + | |
149 | - | Humanoid = Character.Humanoid |
149 | + | Humanoid = char.Humanoid |
150 | Mouse = Player:GetMouse() | |
151 | - | RootPart = Character["HumanoidRootPart"] |
151 | + | --------------------------------------------------- |
152 | - | Torso = Character["Torso"] |
152 | + | local LeftUpperArm = char.LeftUpperArm |
153 | - | Head = Character["Head"] |
153 | + | local LeftShoulder = char.LeftUpperArm.LeftShoulder |
154 | - | RightArm = Character["Right Arm"] |
154 | + | local LeftLowerArm = char.LeftLowerArm |
155 | - | LeftArm = Character["Left Arm"] |
155 | + | local LeftElbow = char.LeftLowerArm.LeftElbow |
156 | - | RightLeg = Character["Right Leg"] |
156 | + | -------------------------------------------------------- |
157 | - | LeftLeg = Character["Left Leg"] |
157 | + | local LeftUpperLeg = char.LeftUpperLeg |
158 | - | RootJoint = RootPart["RootJoint"] |
158 | + | local LeftHip = char.LeftUpperLeg.LeftHip |
159 | - | Neck = Torso["Neck"] |
159 | + | local LeftLowerLeg = char.LeftLowerLeg |
160 | - | RightShoulder = Torso["Right Shoulder"] |
160 | + | local LeftKnee = char.LeftLowerLeg.LeftKnee |
161 | - | LeftShoulder = Torso["Left Shoulder"] |
161 | + | ---------------------------------------------------------- |
162 | - | RightHip = Torso["Right Hip"] |
162 | + | local RightUpperArm = char.RightUpperArm |
163 | - | LeftHip = Torso["Left Hip"] |
163 | + | local RightShoulder = char.RightUpperArm.RightShoulder |
164 | local RightLowerArm = char.RightLowerArm | |
165 | local RightElbow = char.RightLowerArm.RightElbow | |
166 | ---------------------------------------------------------- | |
167 | local RightUpperLeg = char.RightUpperLeg | |
168 | - | Character = Player.Character |
168 | + | local RightHip = char.RightUpperLeg.RightHip |
169 | - | Humanoid = Character.Humanoid |
169 | + | local RightLowerLeg = char.RightLowerLeg |
170 | local RightKnee = char.RightLowerLeg.RightKnee | |
171 | ---------------------------------------------------------- | |
172 | - | chara = plr.Character |
172 | + | local UpperTorso = char.UpperTorso |
173 | local LowerTorso = char.LowerTorso | |
174 | local Root = char.LowerTorso.Root | |
175 | local RootPart = char.HumanoidRootPart | |
176 | local LeftHand = char.LeftHand | |
177 | - | Player = game:GetService("Players").LocalPlayer |
177 | + | local RightHand = char.RightHand |
178 | local LeftFoot = char.LeftFoot | |
179 | local RightFoot = char.RightFoot | |
180 | -------------------------------------------- | |
181 | - | Character = Player.Character |
181 | + | local Head = char.Head |
182 | local Neck = char.Head.Neck | |
183 | - | Humanoid = Character.Humanoid |
183 | + | local oldAnim = currentAnim |
184 | ||
185 | - | RootPart = Character["HumanoidRootPart"] |
185 | + | |
186 | - | Torso = Character["Torso"] |
186 | + | |
187 | - | Head = Character["Head"] |
187 | + | |
188 | - | RightArm = Character["Right Arm"] |
188 | + | |
189 | - | LeftArm = Character["Left Arm"] |
189 | + | Humanoid = char.Humanoid |
190 | - | RightLeg = Character["Right Leg"] |
190 | + | |
191 | - | LeftLeg = Character["Left Leg"] |
191 | + | |
192 | - | RootJoint = RootPart["RootJoint"] |
192 | + | |
193 | - | Neck = Torso["Neck"] |
193 | + | |
194 | - | RightShoulder = Torso["Right Shoulder"] |
194 | + | |
195 | - | LeftShoulder = Torso["Left Shoulder"] |
195 | + | |
196 | - | RightHip = Torso["Right Hip"] |
196 | + | |
197 | - | LeftHip = Torso["Left Hip"] |
197 | + | |
198 | local Orin = "http://www.roblox.com/asset/?id=1065951398" | |
199 | Head.face.Texture = Orin | |
200 | function weld(a, b, acf) | |
201 | local w = Instance.new("Weld", a) | |
202 | w.Part0 = a | |
203 | w.Part1 = b | |
204 | w.C0 = acf | |
205 | end | |
206 | -------------------------------- | |
207 | char.Head.face.Texture = "rbxassetid://0" | |
208 | -------------------------------- | |
209 | local naeeym2 = Instance.new("BillboardGui",char) | |
210 | naeeym2.AlwaysOnTop = true | |
211 | naeeym2.Size = UDim2.new(5,35,2,35) | |
212 | naeeym2.StudsOffset = Vector3.new(0,2,0) | |
213 | naeeym2.Adornee = hed | |
214 | naeeym2.Name = "Name" | |
215 | ||
216 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
217 | tecks2.BackgroundTransparency = 1 | |
218 | tecks2.TextScaled = true | |
219 | tecks2.BorderSizePixel = 0 | |
220 | tecks2.Text = "" | |
221 | tecks2.Font = "Fantasy" | |
222 | tecks2.TextSize = 30 | |
223 | tecks2.TextStrokeTransparency = 0 | |
224 | tecks2.TextColor3 = BrickColor.new('Really red').Color | |
225 | tecks2.TextStrokeColor3 = BrickColor.new('Really black').Color | |
226 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
227 | tecks2.Parent = naeeym2 | |
228 | textfag = tecks2 | |
229 | tecks2.Text = "" | |
230 | tecks2.Text = "script by xdielivex" | |
231 | wait(1) | |
232 | tecks2.Text = "Oii the teapot" | |
233 | wait(1) | |
234 | tecks2.Text = "" | |
235 | coroutine.resume(coroutine.create(function() | |
236 | while textfag ~= nil do | |
237 | swait() | |
238 | textfag.Position = UDim2.new(math.random(-.2,.2),math.random(-3,3),.05,math.random(-3,3)) | |
239 | textfag.Rotation = math.random(-3,3) | |
240 | end | |
241 | end)) | |
242 | ------------------------------------------------------- | |
243 | wait(0.2) | |
244 | local plr = game:service'Players'.LocalPlayer | |
245 | local char = plr.Character | |
246 | local hum = char.Humanoid | |
247 | local hed = char.Head | |
248 | local root = char.HumanoidRootPart | |
249 | local rootj = root.RootJoint | |
250 | local tors = char.UpperTorso | |
251 | - | local tors = char.Torso |
251 | + | |
252 | local la = char["Left Arm"] | |
253 | local rl = char["Right Leg"] | |
254 | local ll = char["Left Leg"] | |
255 | local neck = tors["Neck"] | |
256 | local mouse = plr:GetMouse() | |
257 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
258 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
259 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
260 | local maincolor = BrickColor.new("Plum") | |
261 | ||
262 | ------------------------------------------------------- | |
263 | --Start Good Stuff-- | |
264 | ------------------------------------------------------- | |
265 | cam = game.Workspace.CurrentCamera | |
266 | CF = CFrame.new | |
267 | angles = CFrame.Angles | |
268 | attack = false | |
269 | Euler = CFrame.fromEulerAnglesXYZ | |
270 | Rad = math.rad | |
271 | IT = Instance.new | |
272 | BrickC = BrickColor.new | |
273 | Cos = math.cos | |
274 | Acos = math.acos | |
275 | Sin = math.sin | |
276 | Asin = math.asin | |
277 | Abs = math.abs | |
278 | Mrandom = math.random | |
279 | Floor = math.floor | |
280 | ------------------------------------------------------- | |
281 | --End Good Stuff-- | |
282 | ------------------------------------------------------- | |
283 | ------------------------------------------------------- | |
284 | --Start HeartBeat-- | |
285 | ------------------------------------------------------- | |
286 | ArtificialHB = Instance.new("BindableEvent", script) | |
287 | ArtificialHB.Name = "Heartbeat" | |
288 | script:WaitForChild("Heartbeat") | |
289 | ||
290 | frame = 1 / 60 | |
291 | tf = 0 | |
292 | allowframeloss = false | |
293 | tossremainder = false | |
294 | ||
295 | ||
296 | lastframe = tick() | |
297 | script.Heartbeat:Fire() | |
298 | ||
299 | ||
300 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
301 | tf = tf + s | |
302 | if tf >= frame then | |
303 | if allowframeloss then | |
304 | script.Heartbeat:Fire() | |
305 | lastframe = tick() | |
306 | else | |
307 | for i = 1, math.floor(tf / frame) do | |
308 | script.Heartbeat:Fire() | |
309 | end | |
310 | lastframe = tick() | |
311 | end | |
312 | if tossremainder then | |
313 | tf = 0 | |
314 | else | |
315 | tf = tf - frame * math.floor(tf / frame) | |
316 | end | |
317 | end | |
318 | end) | |
319 | ------------------------------------------------------- | |
320 | --End HeartBeat-- | |
321 | ------------------------------------------------------- | |
322 | ||
323 | ------------------------------------------------------- | |
324 | --Start Important Functions-- | |
325 | ------------------------------------------------------- | |
326 | function swait(num) | |
327 | if num == 0 or num == nil then | |
328 | game:service("RunService").Stepped:wait(0) | |
329 | else | |
330 | for i = 0, num do | |
331 | game:service("RunService").Stepped:wait(0) | |
332 | end | |
333 | end | |
334 | end | |
335 | function thread(f) | |
336 | coroutine.resume(coroutine.create(f)) | |
337 | end | |
338 | function clerp(a, b, t) | |
339 | local qa = { | |
340 | QuaternionFromCFrame(a) | |
341 | } | |
342 | local qb = { | |
343 | QuaternionFromCFrame(b) | |
344 | } | |
345 | local ax, ay, az = a.x, a.y, a.z | |
346 | local bx, by, bz = b.x, b.y, b.z | |
347 | local _t = 1 - t | |
348 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
349 | end | |
350 | function QuaternionFromCFrame(cf) | |
351 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
352 | local trace = m00 + m11 + m22 | |
353 | if trace > 0 then | |
354 | local s = math.sqrt(1 + trace) | |
355 | local recip = 0.5 / s | |
356 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
357 | else | |
358 | local i = 0 | |
359 | if m00 < m11 then | |
360 | i = 1 | |
361 | end | |
362 | if m22 > (i == 0 and m00 or m11) then | |
363 | i = 2 | |
364 | end | |
365 | if i == 0 then | |
366 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
367 | local recip = 0.5 / s | |
368 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
369 | elseif i == 1 then | |
370 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
371 | local recip = 0.5 / s | |
372 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
373 | elseif i == 2 then | |
374 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
375 | local recip = 0.5 / s | |
376 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
377 | end | |
378 | end | |
379 | end | |
380 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
381 | local xs, ys, zs = x + x, y + y, z + z | |
382 | local wx, wy, wz = w * xs, w * ys, w * zs | |
383 | local xx = x * xs | |
384 | local xy = x * ys | |
385 | local xz = x * zs | |
386 | local yy = y * ys | |
387 | local yz = y * zs | |
388 | local zz = z * zs | |
389 | 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)) | |
390 | end | |
391 | function QuaternionSlerp(a, b, t) | |
392 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
393 | local startInterp, finishInterp | |
394 | if cosTheta >= 1.0E-4 then | |
395 | if 1 - cosTheta > 1.0E-4 then | |
396 | local theta = math.acos(cosTheta) | |
397 | local invSinTheta = 1 / Sin(theta) | |
398 | startInterp = Sin((1 - t) * theta) * invSinTheta | |
399 | finishInterp = Sin(t * theta) * invSinTheta | |
400 | else | |
401 | startInterp = 1 - t | |
402 | finishInterp = t | |
403 | end | |
404 | elseif 1 + cosTheta > 1.0E-4 then | |
405 | local theta = math.acos(-cosTheta) | |
406 | local invSinTheta = 1 / Sin(theta) | |
407 | startInterp = Sin((t - 1) * theta) * invSinTheta | |
408 | finishInterp = Sin(t * theta) * invSinTheta | |
409 | else | |
410 | startInterp = t - 1 | |
411 | finishInterp = t | |
412 | end | |
413 | 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 | |
414 | end | |
415 | function rayCast(Position, Direction, Range, Ignore) | |
416 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
417 | end | |
418 | local RbxUtility = LoadLibrary("RbxUtility") | |
419 | local Create = RbxUtility.Create | |
420 | ||
421 | ------------------------------------------------------- | |
422 | --Start Damage Function-- | |
423 | ------------------------------------------------------- | |
424 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
425 | if hit.Parent == nil then | |
426 | return | |
427 | end | |
428 | local h = hit.Parent:FindFirstChildOfClass("Humanoid") | |
429 | for _, v in pairs(hit.Parent:children()) do | |
430 | if v:IsA("Humanoid") then | |
431 | h = v | |
432 | end | |
433 | end | |
434 | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then | |
435 | if hit.Parent:findFirstChild("DebounceHit") ~= nil then | |
436 | if hit.Parent.DebounceHit.Value == true then | |
437 | return | |
438 | end | |
439 | end | |
440 | - | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then |
440 | + | |
441 | hit.Parent:FindFirstChild("Head"):BreakJoints() | |
442 | end | |
443 | local c = Create("ObjectValue"){ | |
444 | Name = "creator", | |
445 | Value = game:service("Players").LocalPlayer, | |
446 | Parent = h, | |
447 | } | |
448 | game:GetService("Debris"):AddItem(c, .5) | |
449 | if HitSound ~= nil and HitPitch ~= nil then | |
450 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
451 | end | |
452 | local Damage = math.random(minim, maxim) | |
453 | local blocked = false | |
454 | local block = hit.Parent:findFirstChild("Block") | |
455 | if block ~= nil then | |
456 | if block.className == "IntValue" then | |
457 | if block.Value > 0 then | |
458 | blocked = true | |
459 | block.Value = block.Value - 1 | |
460 | print(block.Value) | |
461 | end | |
462 | end | |
463 | end | |
464 | if blocked == false then | |
465 | h.Health = h.Health - Damage | |
466 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
467 | else | |
468 | h.Health = h.Health - (Damage / 2) | |
469 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
470 | end | |
471 | if Type == "Knockdown" then | |
472 | local hum = hit.Parent.Humanoid | |
473 | hum.PlatformStand = true | |
474 | coroutine.resume(coroutine.create(function(HHumanoid) | |
475 | swait(1) | |
476 | HHumanoid.PlatformStand = false | |
477 | end), hum) | |
478 | local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit | |
479 | local bodvol = Create("BodyVelocity"){ | |
480 | velocity = angle * knockback, | |
481 | P = 5000, | |
482 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
483 | Parent = hit, | |
484 | } | |
485 | local rl = Create("BodyAngularVelocity"){ | |
486 | P = 3000, | |
487 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
488 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
489 | Parent = hit, | |
490 | } | |
491 | game:GetService("Debris"):AddItem(bodvol, .5) | |
492 | game:GetService("Debris"):AddItem(rl, .5) | |
493 | elseif Type == "Normal" then | |
494 | local vp = Create("BodyVelocity"){ | |
495 | P = 500, | |
496 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
497 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05, | |
498 | } | |
499 | if knockback > 0 then | |
500 | vp.Parent = hit.Parent.Torso | |
501 | end | |
502 | game:GetService("Debris"):AddItem(vp, .5) | |
503 | elseif Type == "Up" then | |
504 | local bodyVelocity = Create("BodyVelocity"){ | |
505 | velocity = Vector3.new(0, 20, 0), | |
506 | P = 5000, | |
507 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
508 | Parent = hit, | |
509 | } | |
510 | game:GetService("Debris"):AddItem(bodyVelocity, .5) | |
511 | elseif Type == "DarkUp" then | |
512 | coroutine.resume(coroutine.create(function() | |
513 | for i = 0, 1, 0.1 do | |
514 | swait() | |
515 | Effects.Block.Create(BrickColor.new("Really red"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1) | |
516 | end | |
517 | end)) | |
518 | local bodyVelocity = Create("BodyVelocity"){ | |
519 | velocity = Vector3.new(0, 20, 0), | |
520 | P = 5000, | |
521 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
522 | Parent = hit, | |
523 | } | |
524 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
525 | elseif Type == "Snare" then | |
526 | local bp = Create("BodyPosition"){ | |
527 | P = 2000, | |
528 | D = 100, | |
529 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
530 | position = hit.Parent.Torso.Position, | |
531 | Parent = hit.Parent.Torso, | |
532 | } | |
533 | game:GetService("Debris"):AddItem(bp, 1) | |
534 | elseif Type == "Freeze" then | |
535 | local BodPos = Create("BodyPosition"){ | |
536 | P = 50000, | |
537 | D = 1000, | |
538 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
539 | position = hit.Parent.Torso.Position, | |
540 | Parent = hit.Parent.Torso, | |
541 | } | |
542 | local BodGy = Create("BodyGyro") { | |
543 | maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge , | |
544 | P = 20e+003, | |
545 | Parent = hit.Parent.Torso, | |
546 | cframe = hit.Parent.Torso.CFrame, | |
547 | } | |
548 | hit.Parent.Torso.Anchored = true | |
549 | coroutine.resume(coroutine.create(function(Part) | |
550 | swait(1.5) | |
551 | Part.Anchored = false | |
552 | end), hit.Parent.Torso) | |
553 | game:GetService("Debris"):AddItem(BodPos, 3) | |
554 | game:GetService("Debris"):AddItem(BodGy, 3) | |
555 | end | |
556 | local debounce = Create("BoolValue"){ | |
557 | Name = "DebounceHit", | |
558 | Parent = hit.Parent, | |
559 | Value = true, | |
560 | } | |
561 | game:GetService("Debris"):AddItem(debounce, Delay) | |
562 | c = Create("ObjectValue"){ | |
563 | Name = "creator", | |
564 | Value = Player, | |
565 | Parent = h, | |
566 | } | |
567 | game:GetService("Debris"):AddItem(c, .5) | |
568 | end | |
569 | end | |
570 | ------------------------------------------------------- | |
571 | --End Damage Function-- | |
572 | ------------------------------------------------------- | |
573 | ||
574 | ------------------------------------------------------- | |
575 | --Start Damage Function Customization-- | |
576 | ------------------------------------------------------- | |
577 | function ShowDamage(Pos, Text, Time, Color) | |
578 | local Rate = (1 / 30) | |
579 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
580 | local Text = (Text or "") | |
581 | local Time = (Time or 2) | |
582 | local Color = (Color or Color3.new(255, 255, 1)) | |
583 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
584 | EffectPart.Anchored = true | |
585 | local BillboardGui = Create("BillboardGui"){ | |
586 | Size = UDim2.new(3, 0, 3, 0), | |
587 | Adornee = EffectPart, | |
588 | Parent = EffectPart, | |
589 | } | |
590 | local TextLabel = Create("TextLabel"){ | |
591 | BackgroundTransparency = 1, | |
592 | Size = UDim2.new(1, 0, 1, 0), | |
593 | Text = Text, | |
594 | Font = "Bodoni", | |
595 | TextColor3 = Color, | |
596 | TextScaled = true, | |
597 | TextStrokeColor3 = Color3.fromRGB(220, 188, 129), | |
598 | Parent = BillboardGui, | |
599 | } | |
600 | game.Debris:AddItem(EffectPart, (Time)) | |
601 | EffectPart.Parent = game:GetService("Workspace") | |
602 | delay(0, function() | |
603 | local Frames = (Time / Rate) | |
604 | for Frame = 1, Frames do | |
605 | wait(Rate) | |
606 | local Percent = (Frame / Frames) | |
607 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
608 | TextLabel.TextTransparency = Percent | |
609 | end | |
610 | if EffectPart and EffectPart.Parent then | |
611 | EffectPart:Destroy() | |
612 | end | |
613 | end) | |
614 | end | |
615 | ------------------------------------------------------- | |
616 | --End Damage Function Customization-- | |
617 | ------------------------------------------------------- | |
618 | ||
619 | function MagniDamage(Part, magni, mindam, maxdam, knock, Type) | |
620 | for _, c in pairs(workspace:children()) do | |
621 | local hum = c:findFirstChild("Humanoid") | |
622 | if hum ~= nil then | |
623 | local head = c:findFirstChild("Head") | |
624 | if head ~= nil then | |
625 | local targ = head.Position - Part.Position | |
626 | local mag = targ.magnitude | |
627 | if magni >= mag and c.Name ~= plr.Name then | |
628 | Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2) | |
629 | end | |
630 | end | |
631 | end | |
632 | end | |
633 | end | |
634 | ||
635 | ||
636 | CFuncs = { | |
637 | Part = { | |
638 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
639 | local Part = Create("Part")({ | |
640 | Parent = Parent, | |
641 | Reflectance = Reflectance, | |
642 | Transparency = Transparency, | |
643 | CanCollide = false, | |
644 | Locked = true, | |
645 | BrickColor = BrickColor.new(tostring(BColor)), | |
646 | Name = Name, | |
647 | Size = Size, | |
648 | Material = Material | |
649 | }) | |
650 | RemoveOutlines(Part) | |
651 | return Part | |
652 | end | |
653 | }, | |
654 | Mesh = { | |
655 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
656 | local Msh = Create(Mesh)({ | |
657 | Parent = Part, | |
658 | Offset = OffSet, | |
659 | Scale = Scale | |
660 | }) | |
661 | if Mesh == "SpecialMesh" then | |
662 | Msh.MeshType = MeshType | |
663 | Msh.MeshId = MeshId | |
664 | end | |
665 | return Msh | |
666 | end | |
667 | }, | |
668 | Mesh = { | |
669 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
670 | local Msh = Create(Mesh)({ | |
671 | Parent = Part, | |
672 | Offset = OffSet, | |
673 | Scale = Scale | |
674 | }) | |
675 | if Mesh == "SpecialMesh" then | |
676 | Msh.MeshType = MeshType | |
677 | Msh.MeshId = MeshId | |
678 | end | |
679 | return Msh | |
680 | end | |
681 | }, | |
682 | Weld = { | |
683 | Create = function(Parent, Part0, Part1, C0, C1) | |
684 | local Weld = Create("Weld")({ | |
685 | Parent = Parent, | |
686 | Part0 = Part0, | |
687 | Part1 = Part1, | |
688 | C0 = C0, | |
689 | C1 = C1 | |
690 | }) | |
691 | return Weld | |
692 | end | |
693 | }, | |
694 | Sound = { | |
695 | Create = function(id, par, vol, pit) | |
696 | coroutine.resume(coroutine.create(function() | |
697 | local S = Create("Sound")({ | |
698 | Volume = vol, | |
699 | Pitch = pit or 1, | |
700 | SoundId = id, | |
701 | Parent = par or workspace | |
702 | }) | |
703 | wait() | |
704 | S:play() | |
705 | game:GetService("Debris"):AddItem(S, 6) | |
706 | end)) | |
707 | end | |
708 | }, | |
709 | ParticleEmitter = { | |
710 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
711 | local fp = Create("ParticleEmitter")({ | |
712 | Parent = Parent, | |
713 | Color = ColorSequence.new(Color1, Color2), | |
714 | LightEmission = LightEmission, | |
715 | Size = Size, | |
716 | Texture = Texture, | |
717 | Transparency = Transparency, | |
718 | ZOffset = ZOffset, | |
719 | Acceleration = Accel, | |
720 | Drag = Drag, | |
721 | LockedToPart = LockedToPart, | |
722 | VelocityInheritance = VelocityInheritance, | |
723 | EmissionDirection = EmissionDirection, | |
724 | Enabled = Enabled, | |
725 | Lifetime = LifeTime, | |
726 | Rate = Rate, | |
727 | Rotation = Rotation, | |
728 | RotSpeed = RotSpeed, | |
729 | Speed = Speed, | |
730 | VelocitySpread = VelocitySpread | |
731 | }) | |
732 | return fp | |
733 | end | |
734 | } | |
735 | } | |
736 | function RemoveOutlines(part) | |
737 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
738 | end | |
739 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
740 | local Part = Create("Part")({ | |
741 | formFactor = FormFactor, | |
742 | Parent = Parent, | |
743 | Reflectance = Reflectance, | |
744 | Transparency = Transparency, | |
745 | CanCollide = false, | |
746 | Locked = true, | |
747 | BrickColor = BrickColor.new(tostring(BColor)), | |
748 | Name = Name, | |
749 | Size = Size, | |
750 | Material = Material | |
751 | }) | |
752 | RemoveOutlines(Part) | |
753 | return Part | |
754 | end | |
755 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
756 | local Msh = Create(Mesh)({ | |
757 | Parent = Part, | |
758 | Offset = OffSet, | |
759 | Scale = Scale | |
760 | }) | |
761 | if Mesh == "SpecialMesh" then | |
762 | Msh.MeshType = MeshType | |
763 | Msh.MeshId = MeshId | |
764 | end | |
765 | return Msh | |
766 | end | |
767 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
768 | local Weld = Create("Weld")({ | |
769 | Parent = Parent, | |
770 | Part0 = Part0, | |
771 | Part1 = Part1, | |
772 | C0 = C0, | |
773 | C1 = C1 | |
774 | }) | |
775 | return Weld | |
776 | end | |
777 | ||
778 | ||
779 | ||
780 | ------------------------------------------------------- | |
781 | --End Effect Function-- | |
782 | ------------------------------------------------------- | |
783 | function Cso(ID, PARENT, VOLUME, PITCH) | |
784 | local NSound = nil | |
785 | coroutine.resume(coroutine.create(function() | |
786 | NSound = IT("Sound", PARENT) | |
787 | NSound.Volume = VOLUME | |
788 | NSound.Pitch = PITCH | |
789 | NSound.SoundId = "http://www.roblox.com/asset/?id="..ID | |
790 | swait() | |
791 | NSound:play() | |
792 | game:GetService("Debris"):AddItem(NSound, 50) | |
793 | end)) | |
794 | return NSound | |
795 | end | |
796 | function CameraEnshaking(Length, Intensity) | |
797 | coroutine.resume(coroutine.create(function() | |
798 | local intensity = 1 * Intensity | |
799 | local rotM = 0.01 * Intensity | |
800 | for i = 0, Length, 0.1 do | |
801 | swait() | |
802 | intensity = intensity - 0.05 * Intensity / Length | |
803 | rotM = rotM - 5.0E-4 * Intensity / Length | |
804 | hum.CameraOffset = Vector3.new(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity))) | |
805 | cam.CFrame = cam.CFrame * CF(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity))) * Euler(Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM) | |
806 | end | |
807 | hum.CameraOffset = Vector3.new(0, 0, 0) | |
808 | end)) | |
809 | end | |
810 | ------------------------------------------------------- | |
811 | --End Important Functions-- | |
812 | ------------------------------------------------------- | |
813 | ||
814 | ---------------------------------------------------------------------------------- | |
815 | hum.WalkSpeed = 20 | |
816 | hum.JumpPower = 60 | |
817 | ---------------------------------------------------------------------------------- | |
818 | local AddInstance = function(Object, ...) | |
819 | local Obj = Instance.new(Object) | |
820 | for i,v in next,(...) do | |
821 | Obj[i] = v | |
822 | end | |
823 | return Obj | |
824 | end | |
825 | ---------------------------------------------------- | |
826 | ||
827 | ||
828 | local Reaper = AddInstance("Part",{ | |
829 | Parent = hed, | |
830 | CFrame = hed.CFrame, | |
831 | formFactor = "Symmetric", | |
832 | Size = Vector3.new(1, 1, 1), | |
833 | CanCollide = false, | |
834 | TopSurface = "Smooth", | |
835 | BottomSurface = "Smooth", | |
836 | Locked = true, | |
837 | }) | |
838 | local Weld = AddInstance("Weld",{ | |
839 | Parent = Reaper, | |
840 | Part0 = hed, | |
841 | C0 = CFrame.new(0, 1.45, 0)*CFrame.Angles(0, 0, 0), | |
842 | Part1 = Reaper, | |
843 | }) | |
844 | local Mesh = AddInstance("SpecialMesh",{ | |
845 | Parent = Reaper, | |
846 | MeshId = "rbxassetid://0", | |
847 | TextureId = "rbxassetid://0", | |
848 | Scale = Vector3.new(0.85,0.85,0.85), | |
849 | VertexColor = Vector3.new(1, 1, 1), | |
850 | }) | |
851 | ||
852 | ------------------------------------------------------- | |
853 | IT = Instance.new | |
854 | CF = CFrame.new | |
855 | VT = Vector3.new | |
856 | RAD = math.rad | |
857 | C3 = Color3.new | |
858 | UD2 = UDim2.new | |
859 | BRICKC = BrickColor.new | |
860 | ANGLES = CFrame.Angles | |
861 | EULER = CFrame.fromEulerAnglesXYZ | |
862 | COS = math.cos | |
863 | ACOS = math.acos | |
864 | SIN = math.sin | |
865 | ASIN = math.asin | |
866 | ABS = math.abs | |
867 | MRANDOM = math.random | |
868 | FLOOR = math.floor | |
869 | ||
870 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
871 | local label = IT("TextLabel") | |
872 | label.BackgroundTransparency = 1 | |
873 | label.Size = UD2(1, 0, 1, 0) | |
874 | label.Position = UD2(0, 0, 0, 0) | |
875 | label.TextColor3 = TEXTCOLOR | |
876 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
877 | label.TextTransparency = TRANSPARENCY | |
878 | label.FontSize = TEXTFONTSIZE | |
879 | label.Font = TEXTFONT | |
880 | label.BorderSizePixel = BORDERSIZEPIXEL | |
881 | label.TextScaled = false | |
882 | label.Text = TEXT | |
883 | label.Name = NAME | |
884 | label.Parent = PARENT | |
885 | return label | |
886 | end | |
887 | ||
888 | function chatfunc(text) | |
889 | local chat = coroutine.wrap(function() | |
890 | if char:FindFirstChild("TalkingBillBoard")~= nil then | |
891 | char:FindFirstChild("TalkingBillBoard"):destroy() | |
892 | end | |
893 | local Bill = Instance.new("BillboardGui",char) | |
894 | Bill.Size = UDim2.new(0,100,0,40) | |
895 | Bill.StudsOffset = Vector3.new(0,3,0) | |
896 | - | if Character:FindFirstChild("TalkingBillBoard")~= nil then |
896 | + | Bill.Adornee = char.Head |
897 | - | Character:FindFirstChild("TalkingBillBoard"):destroy() |
897 | + | |
898 | local Hehe = Instance.new("TextLabel",Bill) | |
899 | - | local Bill = Instance.new("BillboardGui",Character) |
899 | + | |
900 | Hehe.BorderSizePixel = 0 | |
901 | Hehe.Text = "" | |
902 | - | Bill.Adornee = Character.Head |
902 | + | |
903 | Hehe.TextSize = 40 | |
904 | Hehe.TextStrokeTransparency = 0 | |
905 | Hehe.Size = UDim2.new(1,0,0.5,0) | |
906 | coroutine.resume(coroutine.create(function() | |
907 | while Hehe ~= nil do | |
908 | swait() | |
909 | Hehe.Position = UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
910 | Hehe.Rotation = math.random(-5,5) | |
911 | Hehe.TextColor3 = Color3.new(220, 188, 129) | |
912 | Hehe.TextStrokeColor3 = Color3.new(220, 188, 129) | |
913 | end | |
914 | end)) | |
915 | for i = 1,string.len(text),1 do | |
916 | swait() | |
917 | Hehe.Text = string.sub(text,1,i) | |
918 | end | |
919 | swait(90)--Re[math.random(1, 93)] | |
920 | for i = 0, 1, .025 do | |
921 | swait() | |
922 | Bill.ExtentsOffset = Vector3.new(math.random(-i, i), math.random(-i, i), math.random(-i, i)) | |
923 | Hehe.TextStrokeTransparency = i | |
924 | Hehe.TextTransparency = i | |
925 | end | |
926 | Bill:Destroy() | |
927 | end) | |
928 | chat() | |
929 | end | |
930 | ||
931 | function onChatted(msg) | |
932 | chatfunc(msg) | |
933 | end | |
934 | ||
935 | Player.Chatted:connect(onChatted) | |
936 | ||
937 | ||
938 | local Hair = AddInstance("Part",{ | |
939 | Parent = hed, | |
940 | CFrame = hed.CFrame, | |
941 | formFactor = "Symmetric", | |
942 | Size = Vector3.new(1, 1, 1), | |
943 | CanCollide = false, | |
944 | TopSurface = "Smooth", | |
945 | BottomSurface = "Smooth", | |
946 | Locked = true, | |
947 | }) | |
948 | local Weld = AddInstance("Weld",{ | |
949 | Parent = Hair, | |
950 | Part0 = hed, | |
951 | C0 = CFrame.new(0, 0, 0)*CFrame.Angles(0, 480.5, 0), | |
952 | Part1 = Hair, | |
953 | }) | |
954 | local Mesh = AddInstance("SpecialMesh",{ | |
955 | Parent = Hair, | |
956 | MeshId = "rbxassetid://553688034", | |
957 | TextureId = "rbxassetid://869796655", | |
958 | Scale = Vector3.new(2,2,2), | |
959 | VertexColor = Vector3.new(1, 1, 1), | |
960 | }) | |
961 | ||
962 | ||
963 | swait() | |
964 | plr = game.Players.LocalPlayer | |
965 | char = plr.Character | |
966 | mouse = plr:GetMouse() | |
967 | whitecolor = Color3.new(220, 188, 129) | |
968 | epicmode = false | |
969 | normal = true | |
970 | for i,v in pairs(char:GetChildren()) do | |
971 | if v.ClassName == "Hat" or v.ClassName == "Accessory" then | |
972 | v:Destroy() | |
973 | end | |
974 | end | |
975 | ||
976 | cam = game.Workspace.CurrentCamera | |
977 | CF = CFrame.new | |
978 | angles = CFrame.Angles | |
979 | attack = false | |
980 | Euler = CFrame.fromEulerAnglesXYZ | |
981 | Rad = math.rad | |
982 | IT = Instance.new | |
983 | BrickC = BrickColor.new | |
984 | Cos = math.cos | |
985 | Acos = math.acos | |
986 | Sin = math.sin | |
987 | Asin = math.asin | |
988 | Abs = math.abs | |
989 | Mrandom = math.random | |
990 | Floor = math.floor | |
991 | ||
992 | themee = Instance.new("Sound", Head) | |
993 | themee.Volume = 1 | |
994 | themee.Name = "themee" | |
995 | themee.Looped = true | |
996 | ||
997 | id = 1713855118 | |
998 | themee.SoundId = "rbxassetid://"..id | |
999 | themee:Play() | |
1000 | ||
1001 | ||
1002 | ||
1003 | function Eviscerate(dude) | |
1004 | if dude.Name ~= char then | |
1005 | local bgf = IT("BodyGyro", dude.Head) | |
1006 | bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0) | |
1007 | local val = IT("BoolValue", dude) | |
1008 | val.Name = "IsHit" | |
1009 | local ds = coroutine.wrap(function() | |
1010 | dude:WaitForChild("Head"):BreakJoints() | |
1011 | wait(0.5) | |
1012 | target = nil | |
1013 | coroutine.resume(coroutine.create(function() | |
1014 | for i, v in pairs(dude:GetChildren()) do | |
1015 | if v:IsA("Accessory") then | |
1016 | v:Destroy() | |
1017 | end | |
1018 | if v:IsA("Humanoid") then | |
1019 | v:Destroy() | |
1020 | end | |
1021 | if v:IsA("charMesh") then | |
1022 | v:Destroy() | |
1023 | end | |
1024 | if v:IsA("Model") then | |
1025 | v:Destroy() | |
1026 | end | |
1027 | - | if v:IsA("CharacterMesh") then |
1027 | + | |
1028 | for x, o in pairs(v:GetChildren()) do | |
1029 | if o:IsA("Decal") then | |
1030 | o:Destroy() | |
1031 | end | |
1032 | end | |
1033 | coroutine.resume(coroutine.create(function() | |
1034 | v.Material = "Neon" | |
1035 | v.CanCollide = false | |
1036 | local PartEmmit1 = IT("ParticleEmitter", v) | |
1037 | PartEmmit1.LightEmission = 1 | |
1038 | PartEmmit1.Texture = "rbxassetid://243160943" | |
1039 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
1040 | PartEmmit1.Rate = 150 | |
1041 | PartEmmit1.Lifetime = NumberRange.new(1) | |
1042 | PartEmmit1.Size = NumberSequence.new({ | |
1043 | NumberSequenceKeypoint.new(0, 0.75, 0), | |
1044 | NumberSequenceKeypoint.new(1, 0, 0) | |
1045 | }) | |
1046 | PartEmmit1.Transparency = NumberSequence.new({ | |
1047 | NumberSequenceKeypoint.new(0, 0, 0), | |
1048 | NumberSequenceKeypoint.new(1, 1, 0) | |
1049 | }) | |
1050 | PartEmmit1.Speed = NumberRange.new(0, 0) | |
1051 | PartEmmit1.VelocitySpread = 30000 | |
1052 | PartEmmit1.Rotation = NumberRange.new(-500, 500) | |
1053 | PartEmmit1.RotSpeed = NumberRange.new(-500, 500) | |
1054 | local BodPoss = IT("BodyPosition", v) | |
1055 | BodPoss.P = 3000 | |
1056 | BodPoss.D = 1000 | |
1057 | BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000) | |
1058 | BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15)) | |
1059 | v.Color = maincolor.Color | |
1060 | coroutine.resume(coroutine.create(function() | |
1061 | for i = 0, 49 do | |
1062 | swait(1) | |
1063 | v.Transparency = v.Transparency + 0.08 | |
1064 | end | |
1065 | wait(0.5) | |
1066 | PartEmmit1.Enabled = false | |
1067 | wait(3) | |
1068 | v:Destroy() | |
1069 | dude:Destroy() | |
1070 | end)) | |
1071 | end)) | |
1072 | end | |
1073 | end | |
1074 | end)) | |
1075 | end) | |
1076 | ds() | |
1077 | end | |
1078 | end | |
1079 | ||
1080 | function FindNearestHead(Position, Distance, SinglePlayer) | |
1081 | if SinglePlayer then | |
1082 | return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude | |
1083 | end | |
1084 | local List = {} | |
1085 | for i, v in pairs(workspace:GetChildren()) do | |
1086 | if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then | |
1087 | table.insert(List, v) | |
1088 | end | |
1089 | end | |
1090 | return List | |
1091 | end | |
1092 | ||
1093 | ||
1094 | function Ban() | |
1095 | Cso("2220756150", hed, 10, 1.1) | |
1096 | Cso("2847401943", hed, 10, 1.1) | |
1097 | for i, v in pairs(FindNearestHead(mouse.Hit.p, 14.5)) do | |
1098 | if v:FindFirstChild("Head") then | |
1099 | Eviscerate(v) | |
1100 | end | |
1101 | end | |
1102 | ||
1103 | end | |
1104 | ||
1105 | mouse.Button1Down:connect(function(key) | |
1106 | if attack == false then | |
1107 | Ban() | |
1108 | end | |
1109 | end) | |
1110 | ----------------------------------------------- | |
1111 | ||
1112 | ||
1113 | mouse.KeyDown:connect(function(Press) | |
1114 | Press=Press:lower() | |
1115 | if Press=='z' then | |
1116 | id = 0 | |
1117 | themee.SoundId = "rbxassetid://"..id | |
1118 | themee:Play() | |
1119 | end | |
1120 | end) | |
1121 | ||
1122 | mouse.KeyDown:connect(function(Press) | |
1123 | Press=Press:lower() | |
1124 | if Press=='f' then | |
1125 | dist = (tors.Position - mouse.Hit.p).magnitude | |
1126 | if dist <= 10000 then | |
1127 | tors.CFrame = CFrame.new(mouse.Hit.p) + Vector3.new(0,3,0) | |
1128 | end | |
1129 | end | |
1130 | end) |