bails9298
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 271 |
|
|
| 05 Aug 2015 09:26 PM |
Hey guys,
Need a script for double XP. If anyone can post one it'll be great otherwise I'll pay someone to do a couple of gamepass scripts for me!
Ω Omega Productions Ω |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2015 09:27 PM |
...
You can't just magically script x2 XP, you need to tell us how XP is created, defined, etc. |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2015 09:30 PM |
if game:GetService("GamePassService"):PlayerHasPass(player,id) then xp = xp * 2 end
[ Scripter | Graphics Designer | Game Developer | Loyal Friend ] |
|
|
| Report Abuse |
|
|
bails9298
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 271 |
|
|
| 05 Aug 2015 09:37 PM |
Sorry I have used a Linear type XP with each character in the game having an IntValue with the amount of XP given. Does that help?
Ω Omega Productions Ω |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2015 09:47 PM |
do what zack said but define the xp as like
xp = game.Players.LocalPlayer.leaderstats.XP.Value |
|
|
| Report Abuse |
|
|
bails9298
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 271 |
|
|
| 05 Aug 2015 09:57 PM |
What if I haven't used a leaderboard and worked it through a GUI? Would it still work the same? |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 05 Aug 2015 09:58 PM |
balis do you even know how to script
of course it would work the same |
|
|
| Report Abuse |
|
|
bails9298
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 271 |
|
|
| 05 Aug 2015 10:01 PM |
I have a basic knowledge I'm trying to extend on, save money by doing it all myself.
Thanks guys though appreciated.
Same concept for a double gold one then also yeah?
Ω Omega Productions Ω |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2015 10:28 PM |
| Don't use GamePassService to check if they own the gamepass, use MarketPlaceService:PlayersOwnsAsset(userId, assetId). It updates a lot faster than :PlayerOwnsPass() |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2015 10:29 PM |
@VariadicFunction
Huh I didn't know that. I'll remember for the future.
[ Scripter | Graphics Designer | Game Developer | Loyal Friend ] |
|
|
| Report Abuse |
|
|
bails9298
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 271 |
|
|
| 06 Aug 2015 01:19 AM |
| Sure and just replace the asset id with the game pass id? |
|
|
| Report Abuse |
|
|
| |
|
bails9298
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 271 |
|
|
| 06 Aug 2015 03:26 AM |
ifgame:MarketPlaceService:PlayersOwnsAsset(userId, assetId) then xp = game.Players.LocalPlayer.leaderstats.XP.Value xp = xp * 2 end
Will this work?
Ω Omega Productions Ω |
|
|
| Report Abuse |
|
|
Iterum
|
  |
| Joined: 30 Jan 2009 |
| Total Posts: 1982 |
|
|
| 06 Aug 2015 03:31 AM |
You don't use PlayerHasPass for gamepasses. You use MarketplaceService's PlayerOwnsAsset.
-ChiefDelta/Discommodate/iC7G/Vulnerite + 100 other accounts |
|
|
| Report Abuse |
|
|
bails9298
|
  |
| Joined: 03 Jun 2013 |
| Total Posts: 271 |
|
|
| 06 Aug 2015 03:50 AM |
Mmm k, does mine still work then?
Ω Omega Productions Ω |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2015 09:01 AM |
It should if you reference it right, and if that XP value is referring to all XP the player is gonna receive.
[ Scripter | Graphics Designer | Game Developer | Loyal Friend ] |
|
|
| Report Abuse |
|
|
ByDefault
|
  |
| Joined: 25 Jul 2014 |
| Total Posts: 3197 |
|
|
| 06 Aug 2015 09:12 AM |
local plr = game.Players.LocalPlayer local xp = plr.Stats.XP
local amt = xp.Value
xp.Changed:connect(function() if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,id) then local delta = xp.Value - amt xp.Value = xp.Value+delta amt = xp.Value end end) |
|
|
| Report Abuse |
|
|