Advertisement
Mitko1223tm

hmm...?

Apr 21st, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.01 KB | None | 0 0
  1. local chatting = false
  2. local currentgui
  3. local currentline = 2
  4. BillboardGui0 = Instance.new("BillboardGui")
  5. TextLabel1 = Instance.new("TextLabel")
  6. TextLabel2 = Instance.new("TextLabel")
  7. BillboardGui0.LightInfluence = 0
  8. BillboardGui0.Size = UDim2.new(0, 200, 0, 50)
  9. BillboardGui0.ClipsDescendants = false
  10. BillboardGui0.ZIndexBehavior = Enum.ZIndexBehavior.Global
  11. BillboardGui0.AlwaysOnTop = true
  12. BillboardGui0.ExtentsOffset = Vector3.new(0, 2, 0)
  13. BillboardGui0.ExtentsOffsetWorldSpace = Vector3.new(0, 2, 0)
  14. BillboardGui0.MaxDistance = 50
  15. BillboardGui0.Enabled = false
  16. TextLabel1.Name = "Shadow"
  17. TextLabel1.Parent = BillboardGui0
  18. TextLabel1.Position = UDim2.new(0.055, 0, 0.1, 0)
  19. TextLabel1.Size = UDim2.new(0.9, 0, 0.871, 0)
  20. TextLabel1.BackgroundColor = BrickColor.new("Institutional white")
  21. TextLabel1.BackgroundColor3 = Color3.new(1, 1, 1)
  22. TextLabel1.BackgroundTransparency = 9
  23. TextLabel1.Font = Enum.Font.Arcade
  24. TextLabel1.FontSize = Enum.FontSize.Size24
  25. TextLabel1.Text = "* "
  26. TextLabel1.TextColor = BrickColor.new("Medium lilac")
  27. TextLabel1.TextSize = 35
  28. TextLabel1.TextStrokeColor3 = Color3.new(0.215686, 0.215686, 0.392157)
  29. TextLabel1.TextStrokeTransparency = 0.69999998807907
  30. TextLabel1.TextYAlignment = Enum.TextYAlignment.Top
  31. TextLabel1.TextWrapped = false
  32. TextLabel2.Name = "Msg"
  33. TextLabel2.Parent = BillboardGui0
  34. TextLabel2.Position = UDim2.new(0.0500000007, 0, 0.074000001, 0)
  35. TextLabel2.Size = UDim2.new(0.899999976, 0, 0.870999992, 0)
  36. TextLabel2.BackgroundColor = BrickColor.new("Institutional white")
  37. TextLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
  38. TextLabel2.BackgroundTransparency = 9
  39. TextLabel2.Font = Enum.Font.Arcade
  40. TextLabel2.FontSize = Enum.FontSize.Size24
  41. TextLabel2.Text = "* "
  42. TextLabel2.TextColor = BrickColor.new("Institutional white")
  43. TextLabel2.TextSize = 35
  44. TextLabel2.TextStrokeColor3 = Color3.new(0.215686, 0.215686, 0.392157)
  45. TextLabel2.TextStrokeTransparency = 0.69999998807907
  46. TextLabel2.TextYAlignment = Enum.TextYAlignment.Top
  47. TextLabel2.TextWrapped = false
  48. wait()
  49. function msg(plr,m,tof)
  50. if string.sub(m, 1,3) == "/e " or string.sub(m, 1,3) == "/w " then
  51. return
  52. end
  53. if chatting == true then
  54. chatting = false
  55. for i=1,1,0.1 do
  56. spawn(function()
  57. currentgui.ExtentsOffsetWorldSpace = Vector3.new(0, currentline-1+i, 0)
  58. wait(0.01)
  59. end)
  60. end
  61. end
  62. chatting = true
  63. currentline = currentline+1
  64. local text = "* "..game:GetService("Chat"):FilterStringAsync(m, plr, plr)
  65. local b = BillboardGui0:Clone()
  66. currentgui = b
  67. if plr.Character then
  68. b.Parent = plr.Character:WaitForChild("Head")
  69. end
  70. local msg = b["Msg"]
  71. local shd = b["Shadow"]
  72. b.Enabled = true
  73. for i = 1, #text do
  74. spawn(function()
  75. msg.Text = string.sub(text, 1, i)
  76. shd.Text = string.sub(text, 1, i)
  77. if string.sub(msg.Text, string.len(msg.Text) - 1) ~= " " and string.sub(msg.Text, string.len(msg.Text) - 1) ~= "," and string.sub(msg.Text, string.len(msg.Text) - 1) ~= "." and string.sub(msg.Text, string.len(msg.Text) - 1) ~= "*" then
  78. if tof == true then
  79. local sound = Instance.new("Sound")
  80. sound.SoundId = "rbxassetid://417464011"
  81. sound.Volume = 10
  82. sound.Looped = false
  83. sound.Parent = plr.Character
  84. sound:Play()
  85. wait(2)
  86. sound:Remove()
  87. end
  88. elseif string.sub(msg.Text, string.len(msg.Text) - 1) == "," or string.sub(msg.Text, string.len(msg.Text) - 1) == "."or string.sub(msg.Text, string.len(msg.Text) - 1) == "*" then
  89. wait(0.26)
  90. end
  91. end)
  92. wait(0.04)
  93. end
  94. wait(4)
  95. chatting = false
  96. currentline = currentline-1
  97. b:Remove()
  98. end
  99. local owner = game:GetService("Players"):WaitForChild("Mitko1223tm")
  100.  
  101.  
  102. function findplayer(speaker,plr)
  103. local plrs = {}
  104. if tostring(plr) then
  105. if plr == "me" then
  106. return speaker
  107. elseif plr == "random" then
  108. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  109. if v ~= speaker then
  110. table.insert(plrs,v)
  111. end
  112. end
  113. return plrs[math.random(1,#plrs)]
  114. end
  115. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  116. if string.sub(v.Name, 1, #plr) == plr then
  117. table.insert(plrs,v)
  118. end
  119. end
  120. return plrs[math.random(1,#plrs)]
  121. end
  122. end
  123.  
  124. owner.Chatted:Connect(function(m)
  125. msg(owner,m,true)
  126. if string.sub(m, 1,3) == "/e " then
  127. if string.sub(m, 4, 10) == "pacify:" then
  128. local a = findplayer(owner,string.sub(m,11))
  129. if not a or a == owner then return end
  130. msg(owner,owner.Name.." cast PACIFY!",false)
  131. pcall(function()
  132. a.Character:FindFirstChildOfClass("Humanoid").Health = 0
  133. end)
  134. elseif string.sub(m, 4, 8) == "bone:" then
  135. local a = findplayer(owner,string.sub(m,9))
  136. if not a then return end
  137.  
  138. --Converted with ttyyuu12345's model to script plugin v4
  139. function sandbox(var,func)
  140. local env = getfenv(func)
  141. local newenv = setmetatable({},{
  142. __index = function(self,k)
  143. if k=="script" then
  144. return var
  145. else
  146. return env[k]
  147. end
  148. end,
  149. })
  150. setfenv(func,newenv)
  151. return func
  152. end
  153. cors = {}
  154. mas = Instance.new("Model",game:GetService("Lighting"))
  155. Tool0 = Instance.new("Tool")
  156. Script1 = Instance.new("Script")
  157. LocalScript2 = Instance.new("LocalScript")
  158. RemoteEvent3 = Instance.new("RemoteEvent")
  159. Animation4 = Instance.new("Animation")
  160. Part5 = Instance.new("Part")
  161. Sound6 = Instance.new("Sound")
  162. SpecialMesh7 = Instance.new("SpecialMesh")
  163. Sound8 = Instance.new("Sound")
  164. Script9 = Instance.new("Script")
  165. Camera10 = Instance.new("Camera")
  166. Tool0.Name = "bones"
  167. Tool0.Parent = mas
  168. Tool0.TextureId = "rbxgameasset://Images/Truth abou me."
  169. Tool0.Grip = CFrame.new(0, -0.300000012, 0.699999988, 1, 0, 0, -0, 0.707106769, 0.707106769, 0, -0.707106769, 0.707106769)
  170. Tool0.GripForward = Vector3.new(-0, -0.707106769, -0.707106769)
  171. Tool0.GripPos = Vector3.new(0, -0.300000012, 0.699999988)
  172. Tool0.GripUp = Vector3.new(0, 0.707106769, -0.707106769)
  173. Script1.Name = "Server"
  174. Script1.Parent = Tool0
  175. table.insert(cors,sandbox(Script1,function()
  176. local Tool = script.Parent
  177. local Remote = Tool:WaitForChild("Remote")
  178. local Handle = Tool:WaitForChild("Handle")
  179.  
  180. local FriendlyFire = true
  181.  
  182. local AttackPower = 1
  183. local AttackDamage = 9
  184. local AtackRechargeTime = 0
  185. local AttackRecharge = 1/AtackRechargeTime
  186. local AttackSpeed = 200
  187. local Equipped = false
  188. local Heartbeat = game:GetService("RunService").Heartbeat
  189.  
  190. local Knives = {}
  191.  
  192. --returns the wielding player of this tool
  193. function getPlayer()
  194. local char = Tool.Parent
  195. return game:GetService("Players"):GetPlayerFromCharacter(char)
  196. end
  197.  
  198. --helpfully checks a table for a specific value
  199. function contains(t, v)
  200. for _, val in pairs(t) do
  201. if val == v then
  202. return true
  203. end
  204. end
  205. return false
  206. end
  207.  
  208. --tags a human for the ROBLOX KO system
  209. function tagHuman(human)
  210. local tag = Instance.new("ObjectValue")
  211. tag.Value = getPlayer()
  212. tag.Name = "creator"
  213. tag.Parent = human
  214. game:GetService("Debris"):AddItem(tag)
  215. end
  216.  
  217. --used by checkTeams
  218. function sameTeam(otherHuman)
  219. local player = getPlayer()
  220. local otherPlayer = game:GetService("Players"):GetPlayerFromCharacter(otherHuman.Parent)
  221. if player and otherPlayer then
  222. return player.TeamColor == otherPlayer.TeamColor
  223. end
  224. return false
  225. end
  226.  
  227. --use this to determine if you want this human to be harmed or not, returns boolean
  228. function checkTeams(otherHuman)
  229. return not (sameTeam(otherHuman) and not FriendlyFire)
  230. end
  231.  
  232. function getKnife()
  233. local knife = Handle:clone()
  234. knife.Transparency = 0
  235. knife.Hit.Pitch = math.random(90, 110)/100
  236.  
  237. local lift = Instance.new("BodyForce")
  238. lift.force = Vector3.new(0, 196.2, 0) * knife:GetMass() * 0.8
  239. lift.Parent = knife
  240.  
  241. local proj = Tool.Projectile:Clone()
  242. proj.Disabled = false
  243. proj.Parent = knife
  244.  
  245. return knife
  246. end
  247.  
  248. function equippedLoop()
  249. while Equipped do
  250. local dt = Heartbeat:wait()
  251.  
  252. if AttackPower < 1 then
  253. AttackPower = AttackPower + dt * AttackRecharge
  254. if AttackPower > 1 then
  255. AttackPower = 1
  256. end
  257. end
  258.  
  259. Handle.Transparency = 1 - AttackPower
  260. end
  261. end
  262.  
  263. function onLeftDown(mousePos)
  264. local knife = getKnife()
  265. knife.CFrame = CFrame.new(Handle.Position, mousePos)
  266. knife.Velocity = knife.CFrame.lookVector * AttackSpeed * AttackPower
  267. local damage = AttackDamage * AttackPower
  268. local touched
  269. touched = knife.Touched:connect(function(part)
  270. if part:IsDescendantOf(Tool.Parent) then return end
  271. if contains(Knives, part) then return end
  272.  
  273. if part.Parent and part.Parent:FindFirstChild("Humanoid") then
  274. local human = part.Parent.Humanoid
  275. if checkTeams(human) then
  276. tagHuman(human)
  277. human:TakeDamage(damage)
  278. knife.Hit:Play()
  279. end
  280. end
  281.  
  282. knife.Projectile:Destroy()
  283.  
  284. local w = Instance.new("Weld")
  285. w.Part0 = part
  286. w.Part1 = knife
  287. w.C0 = part.CFrame:toObjectSpace(knife.CFrame)
  288. w.Parent = w.Part0
  289.  
  290. touched:disconnect()
  291. end)
  292. table.insert(Knives, knife)
  293. knife.Parent = workspace
  294.  
  295. game:GetService("Debris"):AddItem(knife, 3.5)
  296. delay(2, function()
  297. knife.Transparency = 1
  298. end)
  299.  
  300. Remote:FireClient(getPlayer(), "PlayAnimation", "Throw")
  301.  
  302. Handle.Throw.Pitch = 0.8 + 0.4 * AttackPower
  303. Handle.Throw:Play()
  304.  
  305. AttackPower = 0
  306. end
  307.  
  308. function onRemote(player, func, ...)
  309. if player ~= getPlayer() then return end
  310.  
  311. if func == "LeftDown" then
  312. onLeftDown(...)
  313. end
  314. end
  315.  
  316. function onEquip()
  317. Equipped = true
  318. equippedLoop()
  319. end
  320.  
  321. function onUnequip()
  322. Equipped = false
  323. end
  324.  
  325. Remote.OnServerEvent:connect(onRemote)
  326. Tool.Equipped:connect(onEquip)
  327. Tool.Unequipped:connect(onUnequip)
  328. end))
  329. LocalScript2.Name = "Client"
  330. LocalScript2.Parent = Tool0
  331. table.insert(cors,sandbox(LocalScript2,function()
  332. local Player = game:GetService("Players").Mitko1223tm
  333. local UIS = game:GetService("UserInputService")
  334. local Mouse = Player:GetMouse()
  335. local Tool = script.Parent
  336. local Remote = Tool:WaitForChild("Remote")
  337. local Tracks = {}
  338. local InputType = Enum.UserInputType
  339.  
  340. local BeganConnection, EndedConnection
  341.  
  342. function playAnimation(animName, ...)
  343. if Tracks[animName] then
  344. Tracks[animName]:Play()
  345. else
  346. local anim = Tool:FindFirstChild(animName)
  347. if anim and Tool.Parent and Tool.Parent:FindFirstChild("Humanoid") then
  348. Tracks[animName] = Tool.Parent.Humanoid:LoadAnimation(anim)
  349. playAnimation(animName, ...)
  350. end
  351. end
  352. end
  353.  
  354. function stopAnimation(animName)
  355. if Tracks[animName] then
  356. Tracks[animName]:Stop()
  357. end
  358. end
  359.  
  360. function inputBegan(input)
  361. if input.UserInputType == InputType.MouseButton1 then
  362. Remote:FireServer("LeftDown", Mouse.Hit.p)
  363. end
  364. end
  365.  
  366. function inputEnded(input)
  367. if input.UserInputType == InputType.MouseButton1 then
  368. Remote:FireServer("LeftUp")
  369. end
  370. end
  371.  
  372. function onRemote(func, ...)
  373. if func == "PlayAnimation" then
  374. playAnimation(...)
  375. elseif func == "StopAnimation" then
  376. stopAnimation(...)
  377. end
  378. end
  379.  
  380. function onEquip()
  381. BeganConnection = UIS.InputBegan:connect(inputBegan)
  382. EndedConnection = UIS.InputEnded:connect(inputEnded)
  383. end
  384.  
  385. function onUnequip()
  386. if BeganConnection then
  387. BeganConnection:disconnect()
  388. BeganConnection = nil
  389. end
  390.  
  391. if EndedConnection then
  392. EndedConnection:disconnect()
  393. EndedConnection = nil
  394. end
  395. end
  396.  
  397. Tool.Equipped:connect(onEquip)
  398. Tool.Unequipped:connect(onUnequip)
  399. Remote.OnClientEvent:connect(onRemote)
  400. end))
  401. RemoteEvent3.Name = "Remote"
  402. RemoteEvent3.Parent = Tool0
  403. Animation4.Name = "Throw"
  404. Animation4.Parent = Tool0
  405. Animation4.AnimationId = "rbxassetid://1186623783"
  406. Part5.Name = "Handle"
  407. Part5.Parent = Tool0
  408. Part5.CFrame = CFrame.new(30.0000057, 0.700012088, -2.025002, 0.99999994, 0, 0, 0, 2.98023224e-08, -0.999999881, 0, 0.999999881, 2.98023224e-08)
  409. Part5.Orientation = Vector3.new(89.9700012, 0, 0)
  410. Part5.Position = Vector3.new(30.0000057, 0.700012088, -2.025002)
  411. Part5.Rotation = Vector3.new(90, 0, 0)
  412. Part5.Size = Vector3.new(0.400000006, 0.850000024, 1.39999998)
  413. Part5.BottomSurface = Enum.SurfaceType.Smooth
  414. Part5.CanCollide = false
  415. Part5.TopSurface = Enum.SurfaceType.Smooth
  416. Part5.FormFactor = Enum.FormFactor.Custom
  417. Part5.formFactor = Enum.FormFactor.Custom
  418. Sound6.Name = "Throw"
  419. Sound6.Parent = Part5
  420. Sound6.SoundId = "rbxassetid://357417055"
  421. SpecialMesh7.Parent = Part5
  422. SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=305829157"
  423. SpecialMesh7.Scale = Vector3.new(1.26600003, 1.26600003, 1.26600003)
  424. SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=305829282"
  425. SpecialMesh7.MeshType = Enum.MeshType.FileMesh
  426. Sound8.Name = "Hit"
  427. Sound8.Parent = Part5
  428. Sound8.SoundId = "http://www.roblox.com/asset/?id=10730819"
  429. Sound8.Volume = 1
  430. Script9.Name = "Projectile"
  431. Script9.Parent = Tool0
  432. table.insert(cors,sandbox(Script9,function()
  433. local Projectile = script.Parent
  434. local Heartbeat = game:GetService("RunService").Heartbeat
  435.  
  436. while Heartbeat:wait() do
  437. Projectile.CFrame = CFrame.new(Projectile.Position, Projectile.Position + Projectile.Velocity)
  438. end
  439.  
  440. end))
  441. Script9.Disabled = true
  442. Camera10.Name = "ThumbnailCamera"
  443. Camera10.Parent = Tool0
  444. Camera10.CFrame = CFrame.new(32.7350883, 0.723361313, -2.38149405, -0.097589232, -0.0201426353, 0.995023012, 2.32830644e-10, 0.999795377, 0.0202392396, -0.99522686, 0.00197513215, -0.0975692496)
  445. Camera10.CoordinateFrame = CFrame.new(32.7350883, 0.723361313, -2.38149405, -0.097589232, -0.0201426353, 0.995023012, 2.32830644e-10, 0.999795377, 0.0202392396, -0.99522686, 0.00197513215, -0.0975692496)
  446. Camera10.FieldOfView = 40
  447. Camera10.Focus = CFrame.new(30.7450428, 0.682882845, -2.18635559, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  448. Camera10.focus = CFrame.new(30.7450428, 0.682882845, -2.18635559, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  449. for i,v in pairs(mas:GetChildren()) do
  450. v.Parent = game:GetService("Players").Mitko1223tm.Backpack
  451. pcall(function() v:MakeJoints() end)
  452. end
  453. mas:Destroy()
  454. for i,v in pairs(cors) do
  455. spawn(function()
  456. pcall(v)
  457. end)
  458. end
  459.  
  460. pcall(function()
  461. a.Character:FindFirstChildOfClass("Humanoid").Health = a.Character:FindFirstChildOfClass("Humanoid").MaxHealth
  462. end)
  463. end
  464. end
  465. end)
  466.  
  467.  
  468. owner.CharacterAdded:Connect(function()
  469. wait(0.5)
  470. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement