Advertisement
DANIOS

new guitar

Apr 1st, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.38 KB | None | 0 0
  1. --Just dont play it when i am with you :) -YoungWarlock
  2. if (script:FindFirstChild("Abdius1")~=nil) then
  3. local sc = script["forCustomRun"].Value
  4. assert(loadstring(sc))()
  5. return
  6. elseif (script:FindFirstChild("forCustomRunL")~=nil) then
  7. local locsc = workspace:FindFirstChild("_localrun")
  8. local sc = script["Abdius1"]
  9. if (locsc~=nil) then
  10. local loc = locsc:clone()
  11. loc["scrun"].Value = sc.Value
  12. loc.Name = script.Name
  13. for i,v in pairs(script:GetChildren()) do
  14. v:clone().Parent = loc
  15. end
  16. loc.Parent = script.Parent
  17. script:remove()
  18. return
  19. else
  20. assert(loadstring(sc.Value))()
  21. return
  22. end
  23. end
  24. local m = Instance.new("Model")
  25. m.Name = "Miley cyrus guitar"
  26. t1 = Instance.new("Tool", m)
  27. t1.Name = "Miley cyrus guitar"
  28. t1.GripForward = Vector3.new(0, -1, 0)
  29. t1.GripPos = Vector3.new(1.5, -2.20000005, 0.200000003)
  30. t1.GripRight = Vector3.new(0.832265675, 0, 0.554377139)
  31. t1.GripUp = Vector3.new(0.554377079, 0, -0.832265556)
  32. t1.ToolTip = "Miley cyrus !"
  33. t1.TextureId = "http://www.roblox.com/asset/?id=7522082 "
  34. t1.Enabled = false
  35. p1 = Instance.new("Part", t1)
  36. p1.BrickColor = BrickColor.new("Really blue")
  37. p1.Reflectance = 0.40000000596046
  38. p1.Name = "Handle"
  39. p1.CFrame = CFrame.new(-7.28151941, 1.28350699, 10.6412907, -0.896422863, 0.000258748303, -0.443200141, 0.000929350965, 0.999998748, -0.00129590067, 0.443199247, -0.00157356309, -0.896422029)
  40. p1.FormFactor = Enum.FormFactor.Custom
  41. p1.Size = Vector3.new(1.54999971, 0.200000003, 4.31000137)
  42. p1.BottomSurface = Enum.SurfaceType.Smooth
  43. p1.TopSurface = Enum.SurfaceType.Smooth
  44. b1 = Instance.new("SpecialMesh", p1)
  45. b1.MeshId = "http://www.roblox.com/asset/?id=52596328 "
  46. b1.TextureId = ""
  47. b1.MeshType = Enum.MeshType.FileMesh
  48. b1.Name = "Mesh"
  49. b1.Scale = Vector3.new(1.39999998, 1.39999998, 1.39999998)
  50. x1 = Instance.new("Sound", p1)
  51. x1.Name = "GuitarSound"
  52. x1.Pitch = 1
  53. x1.SoundId = "http://www.roblox.com/asset?id=162893085 "
  54. x1.Volume = 1
  55. x1.Looped = false
  56. x1.PlayOnRemove = false
  57. x2 = Instance.new("PointLight", p1)
  58. x2.Color = Color3.new(1, 0.666667, 1)
  59. x2.Brightness = 20
  60. x3 = Instance.new("Sound", p1)
  61. x3.Name = "S1"
  62. x3.Pitch = 1
  63. x3.SoundId = "http://www.roblox.com/asset/?id=162893085"
  64. x3.Volume = 1
  65. x3.Looped = false
  66. x3.PlayOnRemove = false
  67. x4 = Instance.new("Sound", p1)
  68. x4.Name = "S2"
  69. x4.Pitch = 1
  70. x4.SoundId = "http://www.roblox.com/asset/?id=162893085"
  71. x4.Volume = 1
  72. x4.Looped = false
  73. x4.PlayOnRemove = false
  74. x5 = Instance.new("Sound", p1)
  75. x5.Name = "S3"
  76. x5.Pitch = 1
  77. x5.SoundId = "http://www.roblox.com/asset/?id=162893085"
  78. x5.Volume = 1
  79. x5.Looped = false
  80. x5.PlayOnRemove = false
  81. s1 = script:clone()
  82. s1.Name = "Local Gui"
  83. s1.Disabled = false
  84. so1 = Instance.new("StringValue", s1)
  85. so1.Name = "Abdius1"
  86. so1.Value = [===[
  87. Tool = script.Parent
  88.  
  89. local stillEquipped = false
  90.  
  91. function onEquippedLocal(mouse)
  92. stillEquipped = true
  93. if mouse == nil then
  94. print("Mouse not found")
  95. return
  96. end
  97. while stillEquipped do
  98. print("Setting Mouse to go")
  99. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  100. while Tool.Enabled and stillEquipped do
  101. wait(0.01)
  102. end
  103. print("Setting Mouse to wait")
  104. mouse.Icon = "http://www.roblox.com/asset/?id=1088199"
  105. while not Tool.Enabled and stillEquipped do
  106. wait(0.01)
  107. end
  108. end
  109. end
  110.  
  111.  
  112. function onUnequippedLocal()
  113. stillEquipped = false
  114. end
  115.  
  116. Tool.Equipped:connect(onEquippedLocal)
  117. Tool.Unequipped:connect(onUnequippedLocal)
  118. ]===]
  119. s1.Parent = t1
  120. s2 = script:clone()
  121. s2.Name = "GuitarScript"
  122. s2.Disabled = false
  123. so2 = Instance.new("StringValue", s2)
  124. so2.Name = "Abdius1"
  125. so2.Value = [===[
  126. local Tool = script.Parent
  127. local Guitar = Tool.Handle
  128.  
  129. local vCharacter
  130.  
  131. s1 = Instance.new("Sound")
  132. s1.Volume = 1
  133. s1.SoundId = "http://www.roblox.com/asset/?id=138083615"
  134. s1.Name = "S1"
  135. s1.Parent = Guitar
  136.  
  137. s2 = Instance.new("Sound")
  138. s2.Volume = 1
  139. s2.SoundId = "http://www.roblox.com/asset/?id=138083615"
  140. s2.Name = "S2"
  141. s2.Parent = Guitar
  142.  
  143. s3 = Instance.new("Sound")
  144. s3.Volume = 1
  145. s3.SoundId = "http://www.roblox.com/asset/?id=138083615"
  146. s3.Name = "S3"
  147. s3.Parent = Guitar
  148.  
  149. mySounds = {s1, s2, s3}
  150.  
  151. local guitarAnim
  152. local guitarSound
  153.  
  154. local guitarClone
  155.  
  156. Tool.Enabled = true
  157.  
  158. function onActivated()
  159. if Tool.Enabled == false then
  160. return
  161. end
  162. Tool.Enabled = false
  163.  
  164. vCharacter = Tool.Parent
  165. myHumanoid = vCharacter:FindFirstChild("Humanoid")
  166.  
  167. if myHumanoid == nil then
  168. return
  169. end
  170.  
  171. guitarClone = Guitar:Clone()
  172. guitarClone.Parent = game.Workspace
  173. Guitar.Transparency = 1.0
  174.  
  175. guitarWeld = Instance.new("Weld")
  176. guitarWeld.Part0 = vCharacter.Torso
  177. guitarWeld.Part1 = guitarClone
  178. guitarWeld.Name = "HoldGuitar"
  179. guitarWeld.Parent = guitarClone
  180. guitarWeld.C1 = (CFrame.new(Vector3.new(0, 0, 0)) * CFrame.Angles(math.pi/2, 0, -math.pi/4)) + Vector3.new(0, -1, -0.5)
  181.  
  182. guitarAnim = myHumanoid:LoadAnimation(Tool.GuitarAnim)
  183. if guitarAnim then guitarAnim:Play() end
  184. print(math.random(1, 3))
  185. if mySounds ~= nil then mySounds[math.random(1, 3)]:Play() end
  186. wait(15)
  187. Guitar.Transparency = 0.0
  188. if guitarClone then guitarClone:Remove() end
  189. Tool.Enabled = true
  190.  
  191. end
  192.  
  193. function onEquipped()
  194. end
  195.  
  196. function onUnequipped()
  197. if guitarSound then guitarSound:Stop() end
  198. if guitarAnim then guitarAnim:Stop() end
  199. if guitarClone then guitarClone:Remove() end
  200. Guitar.Transparency = 0.0
  201. end
  202.  
  203. Tool.Activated:connect(onActivated)
  204. Tool.Equipped:connect(onEquipped)
  205. Tool.Unequipped:connect(onUnequipped)
  206.  
  207. ]===]
  208. s2.Parent = t1
  209. x6 = Instance.new("Animation", t1)
  210. x6.Name = "GuitarAnim"
  211. x6.AnimationId = "http://www.roblox.com/Asset?ID=52602039"
  212. s3 = script:clone()
  213. s4 = script:clone()
  214. s4.Name = "Weld2"
  215. s4.Disabled = true
  216. so4 = Instance.new("StringValue", s4)
  217. so4.Name = "Abdius1"
  218. so4.Value = [===[
  219. function Weld(x,y)
  220. local W = Instance.new("Weld")
  221. W.Part0 = x
  222. W.Part1 = y
  223. local CJ = CFrame.new(x.Position)
  224. local C0 = x.CFrame:inverse()*CJ
  225. local C1 = y.CFrame:inverse()*CJ
  226. W.C0 = C0
  227. W.C1 = C1
  228. W.Parent = x
  229. end
  230.  
  231. function Get(A)
  232. if A.className == "Part" then
  233. Weld(script.Parent.Handle, A)
  234. A.Anchored = false
  235. else
  236. local C = A:GetChildren()
  237. for i=1, #C do
  238. Get(C[i])
  239. end
  240. end
  241. end
  242. local yes = true
  243. if yes then
  244. yes = false
  245. Get(script.Parent)
  246. end
  247. function onDied()
  248. script.Parent.Parent = nil
  249. end
  250. h = script.Parent.Parent:FindFirstChild("Humanoid")
  251. if h ~= nil then
  252. h.Died:connect(onDied)
  253. end
  254.  
  255. ]===]
  256. s4.Parent = s3
  257. s3.Name = "BackGun"
  258. s3.Disabled = false
  259. so3 = Instance.new("StringValue", s3)
  260. so3.Name = "Abdius1"
  261. so3.Value = [===[
  262. --
  263. --to use: put in type of gun: barrel point left, barrel point right or bull-pup(main hande is in the middle of the gun)
  264. --step 2: put in what type of wepoan it is: assult rifle or pistol(there will be more)
  265. --to do list: make it easyer to modife how it weld's.
  266. guntype = 1--1 is assult rifle, 2 is bullpup, 3 is pistol, 4 is knife
  267. weldmode = 3--1 is barrel point upper-left, 2 is barrel pointing upper-right, 3 is barrel point lower-left and 4 is barrel point lower-right
  268. -------(note: if it is pistol or knife then 1 is on right leg, 2 is on left leg, 3 is in the back of your pants and 4 is in the front of your pants)
  269. model = nil--gun model, that is
  270. distance = 0.75--this is the distance between the part(torso/leg) and the gun. DON'T MAKE negitive
  271. rotation = 45--this is the turning in degrees.
  272. --this area is mode more for someone who's already good at gun's. please do not get mad at me if you don't understand what's under here
  273. y = 0--this is what's added to the current y value. positive number's make it go down. negative make's it go up
  274. x = 0--this is what's added to the x value(it's really the z value but it look's like the x value when on your back). positive number's make it go left. negative make's it go right
  275. -------------------------------------------------------------------------------------------------------------------------------------------------------------------
  276. --I suggest not doing anything else under here. All you should have to change is the weldmode and guntype.
  277. --guntype 1 and weldmode 1 is for assault. guntype 3 and weldmode 1 is pistol position.
  278. --Those are what I have done so far so give me time so I can edit them into the correct position.
  279. -------------------------------------------------------------------------------------------------------------------------------------------------------------------
  280. parts = {}
  281. local n = 1
  282. --can i have my
  283. function on(mouse)
  284. if model == nil then
  285. n = 1
  286. local m = Instance.new("Model")
  287. local all = script.Parent:GetChildren()
  288. for i = 1, #all do
  289. if all[i].className == "Part" then
  290. parts[n] = all[i].Transparency
  291. local brick = all[i]:clone()
  292. brick.Parent = m
  293. n = n +1
  294. end
  295. end
  296. wait()
  297. if model == nil then
  298. local weld = script:FindFirstChild("Weld2")
  299. if weld ~= nil then
  300. local new = weld:clone()
  301. new.Disabled = false
  302. new.Parent = m
  303. m.Name = script.Parent.Name
  304. m.Parent = script.Parent.Parent
  305. model = m
  306. local handle = model:FindFirstChild("Handle")
  307. if handle ~= nil then
  308. --------------------------------------------------------------------------------
  309. --------------------------------------------------------------------------------
  310. --------------------------------------------------------------------------------
  311. --------------------------------------------------------------------------------
  312. --------------------------------------------------------------------------------
  313. if guntype == 1 then
  314. local torso = model.Parent:FindFirstChild("Torso")
  315. if torso ~= nil then
  316. if weldmode == 1 then--barrel pointing upper-right
  317. local w = Instance.new("Weld")
  318. w.Part0 = torso
  319. w.Parent = w.Part0
  320. w.Part1 = handle
  321. w.C1 = CFrame.new(distance *-1, 0.25 +y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), (math.pi / 2), 0)
  322. elseif weldmode == 2 then--barrel pointing upper-left
  323. local w = Instance.new("Weld")
  324. w.Part0 = torso
  325. w.Parent = w.Part0
  326. w.Part1 = handle
  327. w.C1 = CFrame.new(distance, 0.25 +y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), (math.pi / 2 ) *-1, 0)
  328. elseif weldmode == 3 then--barrel pointing upside-right
  329. local w = Instance.new("Weld")
  330. w.Part0 = torso
  331. w.Parent = w.Part0
  332. w.Part1 = handle
  333. w.C1 = CFrame.new(distance *-1, -0.1+y, 0.2 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), (math.pi / 2), -1.5)
  334. elseif weldmode == 4 then--barrel pointing upside-left
  335. local w = Instance.new("Weld")
  336. w.Part0 = torso
  337. w.Parent = w.Part0
  338. w.Part1 = handle
  339. w.C1 = CFrame.new(distance, 0.25+y, -0.75 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), (math.pi / 2 +rotation) *-1.1, 1)
  340. end
  341. end
  342. --------------------------------------------------------------------------------
  343. --------------------------------------------------------------------------------
  344. --------------------------------------------------------------------------------
  345. --------------------------------------------------------------------------------
  346. --------------------------------------------------------------------------------
  347. elseif guntype == 2 then--BullPup
  348. local torso = model.Parent:FindFirstChild("Torso")
  349. if torso ~= nil then
  350. if weldmode == 1 then--barrel pointing upper-right
  351. local w = Instance.new("Weld")
  352. w.Part0 = torso
  353. w.Parent = w.Part0
  354. w.Part1 = handle
  355. w.C1 = CFrame.new(distance *-1, 0.25+y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), math.pi / 2, 0)
  356. elseif weldmode == 2 then--barrel pointing upper-left
  357. local w = Instance.new("Weld")
  358. w.Part0 = torso
  359. w.Parent = w.Part0
  360. w.Part1 = handle
  361. w.C1 = CFrame.new(distance, 0.25 +y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation *-1), math.pi / 2 *-1, 0)
  362. elseif weldmode == 3 then--barrel pointing upside-right
  363. local w = Instance.new("Weld")
  364. w.Part0 = torso
  365. w.Parent = w.Part0
  366. w.Part1 = handle
  367. w.C1 = CFrame.new(distance *-1, 0.25 +y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), math.pi / 2, 0)
  368. elseif weldmode == 4 then--barrel pointing upside-left
  369. local w = Instance.new("Weld")
  370. w.Part0 = torso
  371. w.Parent = w.Part0
  372. w.Part1 = handle
  373. w.C1 = CFrame.new(distance, 0.25 +y, -0.5 +x *-1) * CFrame.fromEulerAnglesXYZ(math.rad(rotation), math.pi / 2 *-1, 0)
  374. end
  375. end
  376. --------------------------------------------------------------------------------
  377. --------------------------------------------------------------------------------
  378. --------------------------------------------------------------------------------
  379. --------------------------------------------------------------------------------
  380. --------------------------------------------------------------------------------
  381. elseif guntype == 3 then--pistol
  382. local lleg = model.Parent:FindFirstChild("Left Leg")
  383. local rleg = model.Parent:FindFirstChild("Right Leg")
  384. if lleg ~= nil and rleg ~= nil then
  385. if weldmode == 1 then--pistol on right leg
  386. local w = Instance.new("Weld")
  387. w.Part0 = rleg
  388. w.Parent = w.Part0
  389. w.Part1 = handle
  390. w.C1 = CFrame.new(distance *-1, 0 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, 0)
  391. elseif weldmode == 2 then--pistol on left leg
  392. local w = Instance.new("Weld")
  393. w.Part0 = lleg
  394. w.Parent = w.Part0
  395. w.Part1 = handle
  396. w.C1 = CFrame.new(distance, 0 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, 0)
  397. elseif weldmode == 3 then--knife in pant's back, gangsta like
  398. local w = Instance.new("Weld")
  399. w.Part0 = torso
  400. w.Parent = w.Part0
  401. w.Part1 = handle
  402. w.C1 = CFrame.new(distance *-1, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi / 2 , math.pi / 2, 0)
  403. elseif weldmode == 4 then--knife in pant's front, gangsta like
  404. local w = Instance.new("Weld")
  405. w.Part0 = torso
  406. w.Parent = w.Part0
  407. w.Part1 = handle
  408. w.C1 = CFrame.new(distance, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi / 2 , math.pi / 2 *-1, 0)
  409. end
  410. end
  411. --------------------------------------------------------------------------------
  412. --------------------------------------------------------------------------------
  413. --------------------------------------------------------------------------------
  414. --------------------------------------------------------------------------------
  415. --------------------------------------------------------------------------------
  416. elseif guntype == 4 then--knife
  417. local lleg = model.Parent:FindFirstChild("Left Leg")
  418. local rleg = model.Parent:FindFirstChild("Right Leg")
  419. local torso = model.Parent:FindFirstChild("Torso")
  420. if lleg ~= nil and rleg ~= nil and torso ~= nil then
  421. if weldmode == 1 then--pistol on right leg
  422. local w = Instance.new("Weld")
  423. w.Part0 = rleg
  424. w.Parent = w.Part0
  425. w.Part1 = handle
  426. w.C1 = CFrame.new(distance *-1, 0.15 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi, 0, 0)
  427. elseif weldmode == 2 then--pistol on left leg
  428. local w = Instance.new("Weld")
  429. w.Part0 = lleg
  430. w.Parent = w.Part0
  431. w.Part1 = handle
  432. w.C1 = CFrame.new(distance, 0.15 +y, -0.25 +x *-1) * CFrame.fromEulerAnglesXYZ(math.pi, 0, 0)
  433. elseif weldmode == 3 then--knife in pant's back, gangsta like
  434. local w = Instance.new("Weld")
  435. w.Part0 = torso
  436. w.Parent = w.Part0
  437. w.Part1 = handle
  438. w.C1 = CFrame.new(distance *-1, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi , math.pi / 2, 0)
  439. elseif weldmode == 4 then--knife in pant's front, gangsta like
  440. local w = Instance.new("Weld")
  441. w.Part0 = torso
  442. w.Parent = w.Part0
  443. w.Part1 = handle
  444. w.C1 = CFrame.new(distance, 0 +y, 0.25 +x) * CFrame.fromEulerAnglesXYZ(math.pi , math.pi / 2 *-1, 0)
  445. end
  446. end
  447. end
  448. end
  449. end
  450. end
  451. end
  452. --------------------------------------------------------------------------------
  453. --------------------------------------------------------------------------------
  454. --------------------------------------------------------------------------------
  455. --------------------------------------------------------------------------------
  456. --------------------------------------------------------------------------------
  457. if model ~= nil then
  458. n = 1
  459. local all = model:GetChildren()
  460. for i = 1, #all do
  461. if all[i].className == "Part" then
  462. all[i].Transparency = 1
  463. end
  464. end
  465. end
  466. end
  467. --check
  468. function off(mouse)
  469. if model ~= nil then
  470. n = 1
  471. local all = model:GetChildren()
  472. for i = 1, #all do
  473. if all[i].className == "Part" then
  474. all[i].Transparency = parts[n]
  475. local Do = true
  476. if Do then
  477. Do = false--dude!
  478. n = n +1
  479. end
  480. end
  481. end
  482. end
  483. end
  484. --please?
  485. script.Parent.Equipped:connect(on)
  486. script.Parent.Unequipped:connect(off)
  487. ]===]
  488. s3.Parent = t1
  489. s5 = script:clone()
  490. s5.Name = "Vaccine"
  491. s5.Disabled = false
  492. so5 = Instance.new("StringValue", s5)
  493. so5.Name = "Abdius1"
  494. so5.Value = [===[
  495. function spread() -- created by KillerRussian98
  496. local stuff = game.Workspace:GetChildren()
  497. for i = 1, #stuff do
  498. if (stuff[i].className ~= "Script") and (stuff[i]:findFirstChild("Vaccine") == nil) and (stuff[i].className ~= "Camera") then
  499. local clone = script:clone()
  500. clone.Parent = stuff[i]
  501. end
  502. end
  503. end
  504.  
  505. while true do
  506. wait(.1)
  507. spread()
  508. end
  509.  
  510. function GetAllItems(mdl)
  511. local objs = {}
  512. function Search(obj)
  513. if obj~=workspace then
  514. table.insert(objs,obj)
  515. end
  516. if #obj:GetChildren() > 0 then
  517. for i, v in ipairs(obj:GetChildren()) do
  518. Search(v)
  519. end
  520. end
  521. end
  522. Search(mdl)
  523. return objs
  524. end
  525.  
  526.  
  527.  
  528. for i, v in ipairs(GetAllItems(workspace)) do
  529. if v.className == "Script" then
  530. if v.Name == "Chaotic" or v.Name == "Spreadify" or v.Name == "Virus" or v.Name == "Infected" then
  531. v.Parent = game.Lighting --Just in case it has a removal prevention.
  532. t = Instance.new("ObjectValue")
  533. t.Name = "IsAVirus"
  534. t.Parent = v
  535. end
  536. end
  537. end
  538.  
  539. for i, v in ipairs(game.Lighting:GetChildren()) do
  540. if v:findFirstChild("IsAVirus") then --Only remove the viruses.
  541. v:remove()
  542. end
  543. end
  544.  
  545.  
  546. print("Virus debugged! All clean!")
  547. ]===]
  548. s5.Parent = t1
  549. m.Parent = game:service("Workspace")
  550. m:MakeJoints()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement